copy the right packages into the diskimage, copy nixpkgs

svn path=/nixu/trunk/; revision=3313
This commit is contained in:
Armijn Hemel 2005-07-11 17:59:19 +00:00
parent 59456f9366
commit 5432cd148b
2 changed files with 15 additions and 2 deletions

View file

@ -33,6 +33,7 @@ make_dir 00755 /nix/var/nix
make_dir 00755 /nix/var/nix/db
make_dir 00755 /nix/var/log
make_dir 00755 /nix/var/log/nix
make_dir 00755 /nixpkgs
make_dir 00755 /mnt
make_dir 00755 /mnt/host
make_dir 00755 /home
@ -55,6 +56,12 @@ $NIX_CMD_PATH/nix-store --init
echo verifying Nix DB...
$NIX_CMD_PATH/nix-store --verify
echo copying nixpkgs...
cp -fa ../pkgs $root/nixpkgs
echo adding packages...
$NIX_CMD_PATH/nix-pull file:///$(manifest)
#echo registering valid paths...
#(while read storepath; do
# echo PATH $storepath

View file

@ -5,6 +5,7 @@ manifest=${archivesDir}/MANIFEST
nixpkgs=/nixpkgs2/trunk/pkgs
fill_disk=$archivesDir/scripts/fill-disk.sh
chmod -R +w ${archivesDir}/*
rm -rf ${archivesDir}/*
NIX_CMD_PATH=/nix/bin
@ -18,11 +19,16 @@ sysvinitPath=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).sysvinit'
# Location of Nix boot scripts?
bootPath=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).boot' | $NIX_CMD_PATH/nix-instantiate -))
#echo "bootPath: ${bootPath}"
nix=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).nix' | $NIX_CMD_PATH/nix-instantiate -))
#nixDeps=$($NIX_CMD_PATH/nix-store -qR $(echo '(import ./pkgs.nix).nix' | $NIX_CMD_PATH/nix-instantiate -))
nixDeps=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).nix' | $NIX_CMD_PATH/nix-instantiate -)))
echo $nixDeps
cp -fa ${nixpkgs} ${archivesDir}
cp -fa --parents ${nixDeps} ${archivesDir}
mkdir ${archivesDir}/scripts
cp -fa * ${archivesDir}/scripts
sed -e "s^@sysvinitPath\@^$sysvinitPath^g" \