From 02959c41b1c1294a08a5f39bae5e9767d8308f92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Oko=C5=84ski?= Date: Sat, 7 Oct 2023 18:55:21 -0300 Subject: [PATCH 1/2] graalvm-oracle: init at 22.0.1 --- pkgs/by-name/cl/clj-kondo/package.nix | 4 ++-- pkgs/by-name/cq/cq/package.nix | 4 ++-- .../graalvm/community-edition/default.nix | 22 ------------------- .../community-edition/graaljs/default.nix | 4 ++-- .../community-edition/graalnodejs/default.nix | 4 ++-- .../community-edition/graalpy/default.nix | 4 ++-- .../community-edition/graalvm-ce/default.nix | 4 ++-- .../community-edition/truffleruby/default.nix | 4 ++-- .../development/compilers/graalvm/default.nix | 22 +++++++++++++++++++ .../graalvm/graalvm-oracle/default.nix | 16 ++++++++++++++ .../graalvm/graalvm-oracle/hashes.nix | 20 +++++++++++++++++ .../interpreters/babashka/default.nix | 4 ++-- pkgs/top-level/aliases.nix | 3 +++ pkgs/top-level/all-packages.nix | 9 ++++---- 14 files changed, 81 insertions(+), 43 deletions(-) delete mode 100644 pkgs/development/compilers/graalvm/community-edition/default.nix create mode 100644 pkgs/development/compilers/graalvm/default.nix create mode 100644 pkgs/development/compilers/graalvm/graalvm-oracle/default.nix create mode 100644 pkgs/development/compilers/graalvm/graalvm-oracle/hashes.nix diff --git a/pkgs/by-name/cl/clj-kondo/package.nix b/pkgs/by-name/cl/clj-kondo/package.nix index 6106e79c3ca26..fca35b688639f 100644 --- a/pkgs/by-name/cl/clj-kondo/package.nix +++ b/pkgs/by-name/cl/clj-kondo/package.nix @@ -1,7 +1,7 @@ { lib, buildGraalvmNativeImage, - graalvmCEPackages, + graalvmPackages, fetchurl, }: @@ -14,7 +14,7 @@ buildGraalvmNativeImage rec { sha256 = "sha256-/pzRKx6fqcbVwp+Eif3a1mh/awmwhhLVtFldRYibp/g="; }; - graalvmDrv = graalvmCEPackages.graalvm-ce; + graalvmDrv = graalvmPackages.graalvm-ce; extraNativeImageBuildArgs = [ "-H:+ReportExceptionStackTraces" diff --git a/pkgs/by-name/cq/cq/package.nix b/pkgs/by-name/cq/cq/package.nix index a993515af3969..59b7637022f7d 100644 --- a/pkgs/by-name/cq/cq/package.nix +++ b/pkgs/by-name/cq/cq/package.nix @@ -3,7 +3,7 @@ fetchFromGitHub, fetchurl, buildGraalvmNativeImage, - graalvmCEPackages, + graalvmPackages, }: buildGraalvmNativeImage rec { @@ -24,7 +24,7 @@ buildGraalvmNativeImage rec { hash = "sha256-yjAC2obipdmh+JlHzVUTMtTXN2VKe4WKkyJyu2Q93c8="; }; - graalvmDrv = graalvmCEPackages.graalvm-ce; + graalvmDrv = graalvmPackages.graalvm-ce; executable = "cq"; diff --git a/pkgs/development/compilers/graalvm/community-edition/default.nix b/pkgs/development/compilers/graalvm/community-edition/default.nix deleted file mode 100644 index c4fc958fa8fa1..0000000000000 --- a/pkgs/development/compilers/graalvm/community-edition/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ - lib, - pkgs, -}: - -lib.makeScope pkgs.newScope (self: { - buildGraalvm = self.callPackage ./buildGraalvm.nix; - - buildGraalvmProduct = self.callPackage ./buildGraalvmProduct.nix; - - graalvm-ce = self.callPackage ./graalvm-ce { }; - - graalvm-ce-musl = self.callPackage ./graalvm-ce { useMusl = true; }; - - graaljs = self.callPackage ./graaljs { }; - - graalnodejs = self.callPackage ./graalnodejs { }; - - graalpy = self.callPackage ./graalpy { }; - - truffleruby = self.callPackage ./truffleruby { }; -}) diff --git a/pkgs/development/compilers/graalvm/community-edition/graaljs/default.nix b/pkgs/development/compilers/graalvm/community-edition/graaljs/default.nix index 5813b1acf4781..67851dff7c2c4 100644 --- a/pkgs/development/compilers/graalvm/community-edition/graaljs/default.nix +++ b/pkgs/development/compilers/graalvm/community-edition/graaljs/default.nix @@ -1,10 +1,10 @@ { stdenv, fetchurl, - graalvmCEPackages, + graalvmPackages, }: -graalvmCEPackages.buildGraalvmProduct { +graalvmPackages.buildGraalvmProduct { src = fetchurl (import ./hashes.nix).hashes.${stdenv.system}; version = (import ./hashes.nix).version; diff --git a/pkgs/development/compilers/graalvm/community-edition/graalnodejs/default.nix b/pkgs/development/compilers/graalvm/community-edition/graalnodejs/default.nix index b0e225b8fff64..e1858b7a178e3 100644 --- a/pkgs/development/compilers/graalvm/community-edition/graalnodejs/default.nix +++ b/pkgs/development/compilers/graalvm/community-edition/graalnodejs/default.nix @@ -1,10 +1,10 @@ { stdenv, fetchurl, - graalvmCEPackages, + graalvmPackages, }: -graalvmCEPackages.buildGraalvmProduct { +graalvmPackages.buildGraalvmProduct { src = fetchurl (import ./hashes.nix).hashes.${stdenv.system}; version = (import ./hashes.nix).version; diff --git a/pkgs/development/compilers/graalvm/community-edition/graalpy/default.nix b/pkgs/development/compilers/graalvm/community-edition/graalpy/default.nix index e00cd1568c6e9..31d44beeee722 100644 --- a/pkgs/development/compilers/graalvm/community-edition/graalpy/default.nix +++ b/pkgs/development/compilers/graalvm/community-edition/graalpy/default.nix @@ -1,10 +1,10 @@ { stdenv, fetchurl, - graalvmCEPackages, + graalvmPackages, }: -graalvmCEPackages.buildGraalvmProduct { +graalvmPackages.buildGraalvmProduct { src = fetchurl (import ./hashes.nix).hashes.${stdenv.system}; version = (import ./hashes.nix).version; diff --git a/pkgs/development/compilers/graalvm/community-edition/graalvm-ce/default.nix b/pkgs/development/compilers/graalvm/community-edition/graalvm-ce/default.nix index c287da0d4092c..9b6c45884a355 100644 --- a/pkgs/development/compilers/graalvm/community-edition/graalvm-ce/default.nix +++ b/pkgs/development/compilers/graalvm/community-edition/graalvm-ce/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, - graalvmCEPackages, + graalvmPackages, useMusl ? false, }: -graalvmCEPackages.buildGraalvm { +graalvmPackages.buildGraalvm { inherit useMusl; src = fetchurl (import ./hashes.nix).hashes.${stdenv.system}; version = (import ./hashes.nix).version; diff --git a/pkgs/development/compilers/graalvm/community-edition/truffleruby/default.nix b/pkgs/development/compilers/graalvm/community-edition/truffleruby/default.nix index a26a633262e8e..659645be25515 100644 --- a/pkgs/development/compilers/graalvm/community-edition/truffleruby/default.nix +++ b/pkgs/development/compilers/graalvm/community-edition/truffleruby/default.nix @@ -2,12 +2,12 @@ lib, stdenv, fetchurl, - graalvmCEPackages, + graalvmPackages, libyaml, openssl, }: -graalvmCEPackages.buildGraalvmProduct { +graalvmPackages.buildGraalvmProduct { src = fetchurl (import ./hashes.nix).hashes.${stdenv.system}; version = (import ./hashes.nix).version; diff --git a/pkgs/development/compilers/graalvm/default.nix b/pkgs/development/compilers/graalvm/default.nix new file mode 100644 index 0000000000000..22b0bc9919c1f --- /dev/null +++ b/pkgs/development/compilers/graalvm/default.nix @@ -0,0 +1,22 @@ +{ lib, pkgs }: + +lib.makeScope pkgs.newScope (self: { + buildGraalvm = self.callPackage ./community-edition/buildGraalvm.nix; + + buildGraalvmProduct = self.callPackage ./community-edition/buildGraalvmProduct.nix; + + graalvm-ce = self.callPackage ./community-edition/graalvm-ce { }; + + graalvm-ce-musl = self.callPackage ./community-edition/graalvm-ce { useMusl = true; }; + + graaljs = self.callPackage ./community-edition/graaljs { }; + + graalnodejs = self.callPackage ./community-edition/graalnodejs { }; + + graalpy = self.callPackage ./community-edition/graalpy { }; + + truffleruby = self.callPackage ./community-edition/truffleruby { }; + + graalvm-oracle_22 = self.callPackage ./graalvm-oracle { version = "22"; }; + graalvm-oracle = self.graalvm-oracle_22; +}) diff --git a/pkgs/development/compilers/graalvm/graalvm-oracle/default.nix b/pkgs/development/compilers/graalvm/graalvm-oracle/default.nix new file mode 100644 index 0000000000000..d8a9f14e70e3f --- /dev/null +++ b/pkgs/development/compilers/graalvm/graalvm-oracle/default.nix @@ -0,0 +1,16 @@ +{ + lib, + stdenv, + fetchurl, + graalvmPackages, + useMusl ? false, + version ? "22", +}: + +graalvmPackages.buildGraalvm { + inherit useMusl version; + src = fetchurl (import ./hashes.nix).${version}.${stdenv.system}; + meta.platforms = builtins.attrNames (import ./hashes.nix).${version}; + meta.license = lib.licenses.unfree; + pname = "graalvm-oracle"; +} diff --git a/pkgs/development/compilers/graalvm/graalvm-oracle/hashes.nix b/pkgs/development/compilers/graalvm/graalvm-oracle/hashes.nix new file mode 100644 index 0000000000000..09feb93900e1f --- /dev/null +++ b/pkgs/development/compilers/graalvm/graalvm-oracle/hashes.nix @@ -0,0 +1,20 @@ +{ + "22" = { + "aarch64-linux" = { + hash = "sha256-E0Fm6mFB7o39pu7JVWOoXT9BdPWiSXBx2hPvlruD5ls="; + url = "https://download.oracle.com/graalvm/22/archive/graalvm-jdk-22.0.1_linux-aarch64_bin.tar.gz"; + }; + "x86_64-linux" = { + hash = "sha256-1YPNsBygI6N+7UXZ0YS2i3qNf1C1jd4TaQQfKUw09KM="; + url = "https://download.oracle.com/graalvm/22/archive/graalvm-jdk-22.0.1_linux-x64_bin.tar.gz"; + }; + "x86_64-darwin" = { + hash = "sha256-waR39L44Ew8wznRc67tYD3HGFZ2UUD4+ELerWnxNpms="; + url = "https://download.oracle.com/graalvm/22/archive/graalvm-jdk-22.0.1_macos-x64_bin.tar.gz"; + }; + "aarch64-darwin" = { + hash = "sha256-dzUVPih81jopuxAx8sAYdwonNOXHyyirUUOhvStK1F8="; + url = "https://download.oracle.com/graalvm/22/archive/graalvm-jdk-22.0.1_macos-aarch64_bin.tar.gz"; + }; + }; +} diff --git a/pkgs/development/interpreters/babashka/default.nix b/pkgs/development/interpreters/babashka/default.nix index 1f9490e2a90e4..416184cb2694f 100644 --- a/pkgs/development/interpreters/babashka/default.nix +++ b/pkgs/development/interpreters/babashka/default.nix @@ -1,6 +1,6 @@ { lib , buildGraalvmNativeImage -, graalvmCEPackages +, graalvmPackages , fetchurl , writeScript , installShellFiles @@ -16,7 +16,7 @@ let sha256 = "sha256-Dx3AANMpmCPH8Zaz8/9FRNRRhcEPnZHXQje47udwwRQ="; }; - graalvmDrv = graalvmCEPackages.graalvm-ce; + graalvmDrv = graalvmPackages.graalvm-ce; executable = "bb"; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 6107678de6754..c8e35bee5e766 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -509,6 +509,9 @@ mapAliases { gprbuild-boot = gnatPackages.gprbuild-boot; # Added 2024-02-25; gqview = throw "'gqview' has been removed due to lack of maintenance upstream and depending on gtk2. Consider using 'gthumb' instead"; + graalvmCEPackages = graalvmPackages; # Added 2024-08-10 + graalvm-ce = graalvmPackages.graalvm-ce; # Added 2024-08-10 + graalvm-oracle = graalvmPackages.graalvm-oracle; # Added 2024-12-17 grafana_reporter = grafana-reporter; # Added 2024-06-09 grapefruit = throw "'grapefruit' was removed due to being blocked by Roblox, rendering the package useless"; # Added 2024-08-23 graylog-3_3 = throw "graylog 3.x is EOL. Please consider downgrading nixpkgs if you need an upgrade from 3.x to latest series."; # Added 2023-10-09 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 236caece38745..55020b07e1283 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3524,7 +3524,7 @@ with pkgs; }; dapl-native = callPackage ../development/interpreters/dzaima-apl { buildNativeImage = true; - jdk = graalvm-ce; + jdk = graalvmPackages.graalvm-ce; }; gnucap-full = gnucap.withPlugins(p: [ p.verilog ]); @@ -6523,10 +6523,9 @@ with pkgs; openjdk = jdk; openjdk_headless = jdk_headless; - graalvmCEPackages = recurseIntoAttrs (callPackage ../development/compilers/graalvm/community-edition { }); - graalvm-ce = graalvmCEPackages.graalvm-ce; + graalvmPackages = recurseIntoAttrs (callPackage ../development/compilers/graalvm { }); buildGraalvmNativeImage = (callPackage ../build-support/build-graalvm-native-image { - graalvmDrv = graalvm-ce; + graalvmDrv = graalvmPackages.graalvm-ce; }).override; openshot-qt = libsForQt5.callPackage ../applications/video/openshot-qt { @@ -7160,7 +7159,7 @@ with pkgs; dbqn-native = dbqn.override { buildNativeImage = true; - jdk = graalvm-ce; + jdk = graalvmPackages.graalvm-ce; }; cliscord = callPackage ../misc/cliscord { From fb911fa0a52bc3d5b8c20a1de0b5c8f6bd5ddeff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Oko=C5=84ski?= Date: Tue, 17 Dec 2024 21:25:54 +0100 Subject: [PATCH 2/2] graalvm-oracle_17: init at 17.0.11 --- pkgs/development/compilers/graalvm/default.nix | 1 + .../graalvm/graalvm-oracle/hashes.nix | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/pkgs/development/compilers/graalvm/default.nix b/pkgs/development/compilers/graalvm/default.nix index 22b0bc9919c1f..9d95aae487fde 100644 --- a/pkgs/development/compilers/graalvm/default.nix +++ b/pkgs/development/compilers/graalvm/default.nix @@ -18,5 +18,6 @@ lib.makeScope pkgs.newScope (self: { truffleruby = self.callPackage ./community-edition/truffleruby { }; graalvm-oracle_22 = self.callPackage ./graalvm-oracle { version = "22"; }; + graalvm-oracle_17 = self.callPackage ./graalvm-oracle { version = "17"; }; graalvm-oracle = self.graalvm-oracle_22; }) diff --git a/pkgs/development/compilers/graalvm/graalvm-oracle/hashes.nix b/pkgs/development/compilers/graalvm/graalvm-oracle/hashes.nix index 09feb93900e1f..1df3f67dc3e4f 100644 --- a/pkgs/development/compilers/graalvm/graalvm-oracle/hashes.nix +++ b/pkgs/development/compilers/graalvm/graalvm-oracle/hashes.nix @@ -17,4 +17,22 @@ url = "https://download.oracle.com/graalvm/22/archive/graalvm-jdk-22.0.1_macos-aarch64_bin.tar.gz"; }; }; + "17" = { + "aarch64-linux" = { + hash = "sha256-0J/XaXGzNyBgxrW1HgUvtBCPPRfAvzwOx67p/QcY4u0="; + url = "https://download.oracle.com/graalvm/17/archive/graalvm-jdk-17.0.11_linux-aarch64_bin.tar.gz"; + }; + "x86_64-linux" = { + hash = "sha256-t0GHR7MGSZDSAGeX7bsI1ziugaP4euRcJq+covDBUYw="; + url = "https://download.oracle.com/graalvm/17/archive/graalvm-jdk-17.0.11_linux-x64_bin.tar.gz"; + }; + "x86_64-darwin" = { + hash = "sha256-q9b6I5hSVt67gkYzUtsJDSi4bPEkzpkoeC5ZyxfqJRc="; + url = "https://download.oracle.com/graalvm/17/archive/graalvm-jdk-17.0.11_macos-x64_bin.tar.gz"; + }; + "aarch64-darwin" = { + hash = "sha256-o4BGCfnD25AVYwG1Ol+2eDVCgiB+mk4I1JBIjyETK6s="; + url = "https://download.oracle.com/graalvm/17/archive/graalvm-jdk-17.0.11_macos-aarch64_bin.tar.gz"; + }; + }; }