diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2007-01-23 17:17:10 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2007-01-23 17:17:10 +0000 |
commit | 241b28d1014d94ba765e08a6e3209c24140570a8 (patch) | |
tree | 1c81bf9a87407aa9a76622175fc5dc93f811bef4 /installer/nixos-installer.sh | |
parent | c56d3a8ce40da5b103c8884bd8a6121f8f4ad514 (diff) | |
download | nixpkgs-241b28d1014d94ba765e08a6e3209c24140570a8.tar nixpkgs-241b28d1014d94ba765e08a6e3209c24140570a8.tar.gz nixpkgs-241b28d1014d94ba765e08a6e3209c24140570a8.tar.bz2 nixpkgs-241b28d1014d94ba765e08a6e3209c24140570a8.tar.lz nixpkgs-241b28d1014d94ba765e08a6e3209c24140570a8.tar.xz nixpkgs-241b28d1014d94ba765e08a6e3209c24140570a8.tar.zst nixpkgs-241b28d1014d94ba765e08a6e3209c24140570a8.zip |
* Register everything in the Nix store on the installation CD as a
substitute to speed up installation. svn path=/nixos/trunk/; revision=7783
Diffstat (limited to 'installer/nixos-installer.sh')
-rw-r--r-- | installer/nixos-installer.sh | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/installer/nixos-installer.sh b/installer/nixos-installer.sh index 16797ea6c32..0032cce3507 100644 --- a/installer/nixos-installer.sh +++ b/installer/nixos-installer.sh @@ -113,20 +113,24 @@ mkdir -m 0755 -p $mountPoint/etc cp /etc/resolv.conf $mountPoint/etc/ +# Pull the manifest on the CD so that everything in the Nix store on +# the CD can be copied directly. +echo "registering substitutes to speed up builds..." +chroot $mountPoint @nix@/bin/nix-store --clear-substitutes +chroot $mountPoint @nix@/bin/nix-pull /mnt/MANIFEST +rm -f $mountPoint/tmp/inst-store +ln -s /mnt/nix/store $mountPoint/tmp/inst-store + + # Do a nix-pull to speed up building. if test -n "@nixpkgsURL@"; then - chroot $mountPoint @nix@/bin/nix-pull @nixpkgsURL@/MANIFEST + chroot $mountPoint @nix@/bin/nix-pull @nixpkgsURL@/MANIFEST || true fi # Build the specified Nix expression in the target store and install # it into the system configuration profile. - -#rm -rf $mountPoint/scratch -#mkdir $mountPoint/scratch -#curl $nixpkgsURL/nixexprs.tar.bz2 | tar xj -C $mountPoint/scratch -#nixpkgsName=$(cd $mountPoint/scratch && ls) - +echo "building the system configuration..." chroot $mountPoint @nix@/bin/nix-env \ -p /nix/var/nix/profiles/system \ -f "/mnt$nixosDir/system/system.nix" \ |