mirror of
https://github.com/NixOS/nix
synced 2025-07-12 19:05:08 +02:00
Binary tarball: Automatically create /nix
The tarball can now be unpacked anywhere. The installation script uses "sudo" to create /nix if it doesn't exist. It also fetches the nixpkgs-unstable channel.
This commit is contained in:
parent
c5839752b9
commit
57386c9bae
3 changed files with 117 additions and 37 deletions
14
release.nix
14
release.nix
|
@ -124,15 +124,19 @@ let
|
|||
storePaths=$(perl ${pathsFromGraph} ./closure)
|
||||
printRegistration=1 perl ${pathsFromGraph} ./closure > $TMPDIR/reginfo
|
||||
substitute ${./scripts/install-nix-from-closure.sh} $TMPDIR/install \
|
||||
--subst-var-by nix ${toplevel} --subst-var-by regInfo /nix/store/reginfo
|
||||
--subst-var-by nix ${toplevel}
|
||||
chmod +x $TMPDIR/install
|
||||
fn=$out/nix-${version}-${system}.tar.bz2
|
||||
dir=nix-${version}-${system}
|
||||
fn=$out/$dir.tar.bz2
|
||||
mkdir -p $out/nix-support
|
||||
echo "file binary-dist $fn" >> $out/nix-support/hydra-build-products
|
||||
tar cvfj $fn \
|
||||
--owner=0 --group=0 --absolute-names \
|
||||
--transform "s,$TMPDIR/install,/usr/bin/nix-finish-install," \
|
||||
--transform "s,$TMPDIR/reginfo,/nix/store/reginfo," \
|
||||
--owner=0 --group=0 --mode=u+rw,uga+r \
|
||||
--absolute-names \
|
||||
--hard-dereference \
|
||||
--transform "s,$TMPDIR/install,$dir/install," \
|
||||
--transform "s,$TMPDIR/reginfo,$dir/.reginfo," \
|
||||
--transform "s,$NIX_STORE,$dir/store,S" \
|
||||
$TMPDIR/install $TMPDIR/reginfo $storePaths
|
||||
'');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue