diff --git a/nix/overlay.nix b/nix/overlay.nix index 3664e9847..513e21196 100644 --- a/nix/overlay.nix +++ b/nix/overlay.nix @@ -21,6 +21,7 @@ in buddy-mlir = final.callPackage ./pkgs/buddy-mlir.nix { }; fetchMillDeps = final.callPackage ./pkgs/mill-builder.nix { }; circt-full = final.callPackage ./pkgs/circt-full.nix { }; + graalvm-ce-21 = final.callPackage ./pkgs/graalvm { }; mill = let jre = final.graalvm-ce; in (prev.mill.override { inherit jre; }).overrideAttrs (_: { diff --git a/nix/pkgs/graalvm/default.nix b/nix/pkgs/graalvm/default.nix new file mode 100644 index 000000000..4970d5ca0 --- /dev/null +++ b/nix/pkgs/graalvm/default.nix @@ -0,0 +1,13 @@ +{ stdenv +, fetchurl +, graalvmCEPackages +, useMusl ? false +}: + +graalvmCEPackages.buildGraalvm { + inherit useMusl; + src = fetchurl (import ./hashes.nix).hashes.${stdenv.system}; + version = (import ./hashes.nix).version; + meta.platforms = builtins.attrNames (import ./hashes.nix).hashes; +} + diff --git a/nix/pkgs/graalvm/hashes.nix b/nix/pkgs/graalvm/hashes.nix new file mode 100644 index 000000000..45028f3d5 --- /dev/null +++ b/nix/pkgs/graalvm/hashes.nix @@ -0,0 +1,22 @@ +# Generated by update.sh script +{ + "version" = "21.0.2"; + "hashes" = { + "aarch64-linux" = { + sha256 = "0yndazvc4kyr9widfn8ql5vd57m4m5inqz2wcpsarw38rs8ycjx3"; + url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-21.0.2/graalvm-community-jdk-21.0.2_linux-aarch64_bin.tar.gz"; + }; + "x86_64-linux" = { + sha256 = "0j5ffszcaqv3fq159hyb611jm8w1q4n1cywmbd7vi69smad0cj5h"; + url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-21.0.2/graalvm-community-jdk-21.0.2_linux-x64_bin.tar.gz"; + }; + "x86_64-darwin" = { + sha256 = "1qfrn1068idnkzd6mdpw1x17sqrj59rz9avphj8225sxlhzsk2ks"; + url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-21.0.2/graalvm-community-jdk-21.0.2_macos-x64_bin.tar.gz"; + }; + "aarch64-darwin" = { + sha256 = "1dssa3nhix7bqygdkkfp0b9myjg5f91dlgm8mf6r7qf7mj9klpji"; + url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-21.0.2/graalvm-community-jdk-21.0.2_macos-aarch64_bin.tar.gz"; + }; + }; +}