about summary refs log tree commit diff
path: root/release.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-02-10T15·35+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-02-10T15·35+0100
commit57386c9baee78e50eb0c4a901ca9e1c147dc9777 (patch)
tree10e355904bd189ed2ac886c6ac1a91a7095d4c78 /release.nix
parentc5839752b9d5099d4b5e7bcfc853581673e779f6 (diff)
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.
Diffstat (limited to 'release.nix')
-rw-r--r--release.nix14
1 files changed, 9 insertions, 5 deletions
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
         '');