From 57386c9baee78e50eb0c4a901ca9e1c147dc9777 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 10 Feb 2014 16:35:59 +0100 Subject: 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. --- release.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'release.nix') diff --git a/release.nix b/release.nix index e3758f5b2c6c..0547aeeeaf2c 100644 --- a/release.nix +++ b/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 ''); -- cgit 1.4.1