Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
95 lines
1.8 KiB
Nix
95 lines
1.8 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
autoPatchelfHook,
|
|
graalvm-ce,
|
|
makeWrapper,
|
|
zlib,
|
|
libxcrypt-legacy,
|
|
# extra params
|
|
product,
|
|
extraBuildInputs ? [ ],
|
|
extraNativeBuildInputs ? [ ],
|
|
...
|
|
}@args:
|
|
|
|
let
|
|
extraArgs = removeAttrs args [
|
|
"lib"
|
|
"stdenv"
|
|
"autoPatchelfHook"
|
|
"darwin"
|
|
"graalvm-ce"
|
|
"libxcrypt-legacy"
|
|
"makeWrapper"
|
|
"zlib"
|
|
"product"
|
|
"extraBuildInputs"
|
|
"extraNativeBuildInputs"
|
|
"meta"
|
|
];
|
|
in
|
|
stdenv.mkDerivation (
|
|
{
|
|
pname = product;
|
|
|
|
nativeBuildInputs = [
|
|
makeWrapper
|
|
]
|
|
++ lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook
|
|
++ extraNativeBuildInputs;
|
|
|
|
buildInputs = [
|
|
(lib.getLib stdenv.cc.cc) # libstdc++.so.6
|
|
zlib
|
|
libxcrypt-legacy # libcrypt.so.1 (default is .2 now)
|
|
]
|
|
++ extraBuildInputs;
|
|
|
|
unpackPhase = ''
|
|
runHook preUnpack
|
|
|
|
mkdir -p "$out"
|
|
|
|
tar xf "$src" -C "$out" --strip-components=1
|
|
|
|
# Sanity check
|
|
if [ ! -d "$out/bin" ]; then
|
|
echo "The `bin` is directory missing after extracting the graalvm"
|
|
echo "tarball, please compare the directory structure of the"
|
|
echo "tarball with what happens in the unpackPhase (in particular"
|
|
echo "with regards to the `--strip-components` flag)."
|
|
exit 1
|
|
fi
|
|
|
|
runHook postUnpack
|
|
'';
|
|
|
|
dontStrip = true;
|
|
|
|
passthru = {
|
|
updateScript = [
|
|
./update.sh
|
|
product
|
|
];
|
|
}
|
|
// (args.passhtru or { });
|
|
|
|
meta = (
|
|
{
|
|
inherit (graalvm-ce.meta)
|
|
homepage
|
|
license
|
|
sourceProvenance
|
|
teams
|
|
platforms
|
|
;
|
|
description = "High-Performance Polyglot VM (Product: ${product})";
|
|
mainProgram = "js";
|
|
}
|
|
// (args.meta or { })
|
|
);
|
|
}
|
|
// extraArgs
|
|
)
|