mirror of
https://github.com/NixOS/nix
synced 2025-06-27 08:31:16 +02:00
-----BEGIN PGP SIGNATURE----- iQFHBAABCAAxFiEEtUHVUwEnDgvPFcpdgXC0cm1xmN4FAmetA5oTHGVkb2xzdHJh QGdtYWlsLmNvbQAKCRCBcLRybXGY3g2pB/9JAFyjmaXuccbMTO/6x9qwsWuuXNLk OQWzfbdUekvsihZZSFZg1r7KqqXHCi64f0nxLPsJ/0oeDWZktJ5KnbV630nuUlDj ulLCpKdvhWFa8dVx9LiziGwQw4KLx8PjOfwThtQ4DqCWxWEmu6lKkijag9cE+ai4 3mw9YtUjBRxlXyhYLzWz3whLbv37c/m+R8iGS8xm8W260pmei6D0beOIPdfXYBQF PzPlPORyI08A06uqyA3z7bTxzmSMnzvu0QInCPCKSHzFUnTZPHUYuYStFl28NrZS fXKK59L0G7QEfdTRAmqQkdHdtPj2RlYFiMN0kQiNLflvKfGGWdi/kvdx =rRix -----END PGP SIGNATURE----- Merge tag '2.26.2' into sync-2.26.2 Tagging release 2.26.2
42 lines
1.1 KiB
Nix
42 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
runCommand,
|
|
nix,
|
|
tarballs,
|
|
}:
|
|
|
|
runCommand "installer-script"
|
|
{
|
|
buildInputs = [ nix ];
|
|
}
|
|
''
|
|
mkdir -p $out/nix-support
|
|
|
|
# Converts /nix/store/50p3qk8k...-nix-2.4pre20201102_550e11f/bin/nix to 50p3qk8k.../bin/nix.
|
|
tarballPath() {
|
|
# Remove the store prefix
|
|
local path=''${1#${builtins.storeDir}/}
|
|
# Get the path relative to the derivation root
|
|
local rest=''${path#*/}
|
|
# Get the derivation hash
|
|
local drvHash=''${path%%-*}
|
|
echo "$drvHash/$rest"
|
|
}
|
|
|
|
substitute ${./install.in} $out/install \
|
|
${
|
|
lib.concatMapStrings (
|
|
tarball:
|
|
let
|
|
inherit (tarball.stdenv.hostPlatform) system;
|
|
in
|
|
''
|
|
\
|
|
--replace '@tarballHash_${system}@' $(nix hash-file --base16 --type sha256 ${tarball}/*.tar.xz) \
|
|
--replace '@tarballPath_${system}@' $(tarballPath ${tarball}/*.tar.xz) \
|
|
''
|
|
) tarballs
|
|
} --replace '@nixVersion@' ${nix.version}
|
|
|
|
echo "file installer $out/install" >> $out/nix-support/hydra-build-products
|
|
''
|