3
0
Fork 0
forked from mirrors/nixpkgs

use tar for copying nixpkgs instead of cp to speed up installation process.

Commit 3700 :)

svn path=/nixu/trunk/; revision=3700
This commit is contained in:
Armijn Hemel 2005-08-26 16:06:52 +00:00
parent 3dce29bb92
commit 789f716808
2 changed files with 12 additions and 3 deletions

View file

@ -1,6 +1,6 @@
#! @bash@/bin/sh -e
export PATH=@bash@/bin:@coreutils@/bin:@findutils@/bin:@utillinux@/bin:@utillinux@/sbin:@e2fsprogs@/sbin:@grub@/sbin:@sysvinitPath@/sbin:@gnugrep@/bin:@which@/bin
export PATH=@bash@/bin:@coreutils@/bin:@findutils@/bin:@utillinux@/bin:@utillinux@/sbin:@e2fsprogs@/sbin:@grub@/sbin:@sysvinitPath@/sbin:@gnugrep@/bin:@which@/bin:@gnutar@/bin
kernel=@kernel@
@ -230,7 +230,8 @@ echo verifying Nix DB...
$NIX_CMD_PATH/nix-store --verify
echo copying nixpkgs...
cp -fLa /cdrom/pkgs $root/nixpkgs/trunk
#cp -fLa /cdrom/pkgs $root/nixpkgs/trunk
tar --directory=/cdrom -cf - pkgs | tar --directory=$root/nixpkgs/trunk -xvf -
make_dir 0755 /tmp/scripts
cp -fa /cdrom/scripts $root/tmp

View file

@ -22,7 +22,7 @@ rm -rf ${archivesDir}/*
NIX_CMD_PATH=/nix/bin
storeExpr=$(echo '(import ./pkgs.nix).everything' | $NIX_CMD_PATH/nix-instantiate -v -v -)
storeExpr=$($NIX_CMD_PATH/nix-store -qR $(echo '(import ./pkgs.nix).everything' | $NIX_CMD_PATH/nix-instantiate -))
#$NIX_CMD_PATH/nix-push --copy $archivesDir $manifest $(nix-store -r $storeExpr) $(nix-store -r $(echo '(import ./pkgs.nix).kernel' | $NIX_CMD_PATH/nix-instantiate -))
# Location of sysvinit?
@ -59,6 +59,11 @@ do
echo $i >> $storePaths
done
for i in $storeExpr
do
echo $i >> $archivesDir/store-expressions
done
utilLinux=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).utillinux' | $NIX_CMD_PATH/nix-instantiate -)))
coreUtils=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).coreutils' | $NIX_CMD_PATH/nix-instantiate -)))
e2fsProgs=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).e2fsprogs' | $NIX_CMD_PATH/nix-instantiate -)))
@ -83,6 +88,7 @@ dhcp=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).dhcpWrapper' | $NI
nano=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).nano' | $NIX_CMD_PATH/nix-instantiate -))
gnugrep=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).gnugrep' | $NIX_CMD_PATH/nix-instantiate -))
which=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).which' | $NIX_CMD_PATH/nix-instantiate -))
gnutar=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).gnutar' | $NIX_CMD_PATH/nix-instantiate -))
(while read storepath; do
cp -fa --parents ${storepath} ${archivesDir}
@ -137,6 +143,7 @@ cp -fvau --parents ${hotplug} ${archivesDir}
cp -fvau --parents ${udev} ${archivesDir}
cp -fvau --parents ${dhcp} ${archivesDir}
cp -fvau --parents ${nano} ${archivesDir}
cp -fvau --parents ${gnutar} ${archivesDir}
bashdeps=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).bash' | $NIX_CMD_PATH/nix-instantiate -)))
@ -158,6 +165,7 @@ sed -e "s^@sysvinitPath\@^$sysvinitPath^g" \
-e "s^@hotplug\@^$hotplug^g" \
-e "s^@gnugrep\@^$gnugrep^g" \
-e "s^@which\@^$which^g" \
-e "s^@gnutar\@^$gnutar^g" \
< $fill_disk > $fill_disk.tmp
mv $fill_disk.tmp $fill_disk