Skip to content

Commit

Permalink
graalvm-oracle: init at 22 (NixOS#321026)
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada authored Dec 19, 2024
2 parents 1858008 + fb911fa commit 3a33ce7
Show file tree
Hide file tree
Showing 14 changed files with 100 additions and 43 deletions.
4 changes: 2 additions & 2 deletions pkgs/by-name/cl/clj-kondo/package.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
lib,
buildGraalvmNativeImage,
graalvmCEPackages,
graalvmPackages,
fetchurl,
}:

Expand All @@ -14,7 +14,7 @@ buildGraalvmNativeImage rec {
sha256 = "sha256-/pzRKx6fqcbVwp+Eif3a1mh/awmwhhLVtFldRYibp/g=";
};

graalvmDrv = graalvmCEPackages.graalvm-ce;
graalvmDrv = graalvmPackages.graalvm-ce;

extraNativeImageBuildArgs = [
"-H:+ReportExceptionStackTraces"
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/cq/cq/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
fetchFromGitHub,
fetchurl,
buildGraalvmNativeImage,
graalvmCEPackages,
graalvmPackages,
}:

buildGraalvmNativeImage rec {
Expand All @@ -24,7 +24,7 @@ buildGraalvmNativeImage rec {
hash = "sha256-yjAC2obipdmh+JlHzVUTMtTXN2VKe4WKkyJyu2Q93c8=";
};

graalvmDrv = graalvmCEPackages.graalvm-ce;
graalvmDrv = graalvmPackages.graalvm-ce;

executable = "cq";

Expand Down
22 changes: 0 additions & 22 deletions pkgs/development/compilers/graalvm/community-edition/default.nix

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
23 changes: 23 additions & 0 deletions pkgs/development/compilers/graalvm/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{ 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_17 = self.callPackage ./graalvm-oracle { version = "17"; };
graalvm-oracle = self.graalvm-oracle_22;
})
16 changes: 16 additions & 0 deletions pkgs/development/compilers/graalvm/graalvm-oracle/default.nix
Original file line number Diff line number Diff line change
@@ -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";
}
38 changes: 38 additions & 0 deletions pkgs/development/compilers/graalvm/graalvm-oracle/hashes.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"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";
};
};
"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";
};
};
}
4 changes: 2 additions & 2 deletions pkgs/development/interpreters/babashka/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ lib
, buildGraalvmNativeImage
, graalvmCEPackages
, graalvmPackages
, fetchurl
, writeScript
, installShellFiles
Expand All @@ -16,7 +16,7 @@ let
sha256 = "sha256-1bZaWg1AtStF1uuoY8Z0V4s0fMSchSTR/pTSWdEzcuw=";
};

graalvmDrv = graalvmCEPackages.graalvm-ce;
graalvmDrv = graalvmPackages.graalvm-ce;

executable = "bb";

Expand Down
3 changes: 3 additions & 0 deletions pkgs/top-level/aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 4 additions & 5 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]);
Expand Down Expand Up @@ -6521,10 +6521,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 {
Expand Down Expand Up @@ -7158,7 +7157,7 @@ with pkgs;

dbqn-native = dbqn.override {
buildNativeImage = true;
jdk = graalvm-ce;
jdk = graalvmPackages.graalvm-ce;
};

cliscord = callPackage ../misc/cliscord {
Expand Down

0 comments on commit 3a33ce7

Please sign in to comment.