mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-13 09:13:17 +00:00
graalvmCEPackages: reorganize each product in its own subdirectory
This commit is contained in:
parent
8374f4d793
commit
3e9ecc840b
@ -20,9 +20,10 @@ let
|
||||
"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}}
|
||||
hashes = product: (import (./. + "/${product}/hashes.nix"));
|
||||
version = product: (hashes product).version;
|
||||
source = product: (hashes product).${product}.${javaPlatform.${stdenv.system}}
|
||||
or (hashes product).${product}.${javaPlatformForProducts.${stdenv.system}}
|
||||
or (throw "Unsupported product combination: product=${product} system=${stdenv.system}");
|
||||
in
|
||||
rec {
|
||||
@ -34,22 +35,22 @@ rec {
|
||||
meta.platforms = builtins.attrNames javaPlatform;
|
||||
};
|
||||
|
||||
graaljs = callPackage ./graaljs.nix {
|
||||
graaljs = callPackage ./graaljs {
|
||||
version = version "graaljs";
|
||||
src = fetchurl (source "graaljs");
|
||||
};
|
||||
|
||||
graalnodejs = callPackage ./graalnodejs.nix {
|
||||
graalnodejs = callPackage ./graalnodejs {
|
||||
version = "21";
|
||||
src = fetchurl (source "graalnodejs");
|
||||
};
|
||||
|
||||
graalpy = callPackage ./graalpy.nix {
|
||||
graalpy = callPackage ./graalpy {
|
||||
version = version "graalpy";
|
||||
src = fetchurl (source "graalpy");
|
||||
};
|
||||
|
||||
truffleruby = callPackage ./truffleruby.nix {
|
||||
truffleruby = callPackage ./truffleruby {
|
||||
version = version "truffleruby";
|
||||
src = fetchurl (source "truffleruby");
|
||||
};
|
||||
|
@ -29,9 +29,11 @@ verlte() {
|
||||
}
|
||||
|
||||
readonly product="${1:-graalvm-ce}"
|
||||
readonly hashes_nix="hashes-$product.nix"
|
||||
readonly hashes_nix="$product/hashes.nix"
|
||||
readonly nixpkgs=../../../../..
|
||||
|
||||
mkdir -p "$product"
|
||||
|
||||
declare -r -A update_urls=(
|
||||
[graalvm-ce]="https://api.github.com/repos/graalvm/graalvm-ce-builds/releases/latest"
|
||||
[graaljs]="https://api.github.com/repos/oracle/graaljs/releases/latest"
|
||||
|
Loading…
Reference in New Issue
Block a user