diff options
author | Artemis Tosini <me@artem.ist> | 2024-07-13 23:22:43 +0000 |
---|---|---|
committer | Artemis Tosini <me@artem.ist> | 2024-07-13 23:22:43 +0000 |
commit | 201e8b699432f75b1dc63875de1e8646ddb95094 (patch) | |
tree | cd98bfe0564fe83c20c7216ae313188ef0a260a9 /nix-support | |
parent | a8f443d96011c11ad726c2a28a37752bd56c12cc (diff) |
nix-support/binary-tarball.nix: Pass through root paths
Passing through root paths allows external programs to see
which nix and cacert are in a binary tarball,
e.g. to recreate it from substituters
Change-Id: I27431134df53bbc6623484f8a0822004b51f7c87
Diffstat (limited to 'nix-support')
-rw-r--r-- | nix-support/binary-tarball.nix | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/nix-support/binary-tarball.nix b/nix-support/binary-tarball.nix index 7b9bf5c2b..69ffb3d4c 100644 --- a/nix-support/binary-tarball.nix +++ b/nix-support/binary-tarball.nix @@ -5,29 +5,33 @@ system, }: let - installerClosureInfo = buildPackages.closureInfo { - rootPaths = [ - nix - cacert - ]; - }; + rootPaths = [ + nix + cacert + ]; + installerClosureInfo = buildPackages.closureInfo { inherit rootPaths; }; meta.description = "Distribution-independent Lix bootstrap binaries for ${system}"; in -buildPackages.runCommand "lix-binary-tarball-${nix.version}" { inherit meta; } '' - cp ${installerClosureInfo}/registration $TMPDIR/reginfo +buildPackages.runCommand "lix-binary-tarball-${nix.version}" + { + inherit meta; + passthru.rootPaths = rootPaths; + } + '' + cp ${installerClosureInfo}/registration $TMPDIR/reginfo - dir=lix-${nix.version}-${system} - fn=$out/$dir.tar.xz - mkdir -p $out/nix-support - echo "file binary-dist $fn" >> $out/nix-support/hydra-build-products - tar cvfJ $fn \ - --owner=0 --group=0 --mode=u+rw,uga+r \ - --mtime='1970-01-01' \ - --absolute-names \ - --hard-dereference \ - --transform "s,$TMPDIR/reginfo,$dir/.reginfo," \ - --transform "s,$NIX_STORE,$dir/store,S" \ - $TMPDIR/reginfo \ - $(cat ${installerClosureInfo}/store-paths) -'' + dir=lix-${nix.version}-${system} + fn=$out/$dir.tar.xz + mkdir -p $out/nix-support + echo "file binary-dist $fn" >> $out/nix-support/hydra-build-products + tar cvfJ $fn \ + --owner=0 --group=0 --mode=u+rw,uga+r \ + --mtime='1970-01-01' \ + --absolute-names \ + --hard-dereference \ + --transform "s,$TMPDIR/reginfo,$dir/.reginfo," \ + --transform "s,$NIX_STORE,$dir/store,S" \ + $TMPDIR/reginfo \ + $(cat ${installerClosureInfo}/store-paths) + '' |