diff --git a/fill-disk.sh b/fill-disk.sh index 180676dd055..3bd450e3cb5 100755 --- a/fill-disk.sh +++ b/fill-disk.sh @@ -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 diff --git a/make-disk.sh b/make-disk.sh index 6c3843bb56e..7a0b04f23f3 100755 --- a/make-disk.sh +++ b/make-disk.sh @@ -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" \