1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 22:11:15 +02:00

Merge remote-tracking branch 'upstream/master' into package-nix

This commit is contained in:
John Ericson 2023-12-11 15:26:12 -05:00
commit ff992f8b46
6 changed files with 46 additions and 39 deletions

View file

@ -1,7 +1,7 @@
{ lib
, runCommand
, nix
, systemTarballPairs
, tarballs
}:
runCommand "installer-script" {
@ -22,13 +22,14 @@ runCommand "installer-script" {
substitute ${./install.in} $out/install \
${lib.concatMapStrings
({ system, tarball }:
'' \
(tarball: let
inherit (tarball.stdenv.hostPlatform) system;
in '' \
--replace '@tarballHash_${system}@' $(nix --experimental-features nix-command hash-file --base16 --type sha256 ${tarball}/*.tar.xz) \
--replace '@tarballPath_${system}@' $(tarballPath ${tarball}/*.tar.xz) \
''
)
systemTarballPairs
tarballs
} --replace '@nixVersion@' ${nix.version}
echo "file installer $out/install" >> $out/nix-support/hydra-build-products