blob: 9218391ee72302dbaf0a4714335a1ba9a98795d6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
{ lib
, stdenv
, callPackage
, fetchurl
}:
let
buildGraalvm = callPackage ./buildGraalvm.nix;
buildGraalvmProduct = callPackage ./buildGraalvmProduct.nix;
# Argh, this is really inconsistent...
javaPlatform = {
"aarch64-linux" = "linux-aarch64";
"x86_64-linux" = "linux-x64";
"aarch64-darwin" = "macos-aarch64";
"x86_64-darwin" = "macos-x64";
};
javaPlatformForProducts = {
"aarch64-linux" = "linux-aarch64";
"x86_64-linux" = "linux-amd64";
"aarch64-darwin" = "macos-aarch64";
"x86_64-darwin" = "macos-x64";
};
version = product: (import (./. + "/hashes-${product}.nix")).version;
source = product: (import (./. + "/hashes-${product}.nix")).${product}.${javaPlatform.${stdenv.system}}
or (import (./. + "/hashes-${product}.nix")).${product}.${javaPlatformForProducts.${stdenv.system}}
or (throw "Unsupported product combination: product=${product} system=${stdenv.system}");
in
rec {
inherit buildGraalvm buildGraalvmProduct;
graalvm-ce = buildGraalvm {
version = version "graalvm-ce";
src = fetchurl (source "graalvm-ce");
meta.platforms = builtins.attrNames javaPlatform;
};
graalpy = callPackage ./graalpy.nix {
version = version "graalpy";
src = fetchurl (source "graalpy");
};
}
|