diff --git a/fill-disk.sh b/fill-disk.sh index 2bb88f331422..57459727b9b6 100755 --- a/fill-disk.sh +++ b/fill-disk.sh @@ -43,11 +43,14 @@ make_dir 00755 /nix/var/nix/manifests make_dir 00755 /nix/var/log make_dir 00755 /nix/var/log/nix make_dir 00755 /nixpkgs +make_dir 00755 /nixpkgs/trunk make_dir 00755 /mnt make_dir 00755 /mnt/host make_dir 00755 /home make_dir 00755 /home/root +mknod $root/dev/null c 1 3 + touch_file /etc/passwd touch_file /etc/shadow touch_file /etc/group @@ -55,8 +58,10 @@ touch_file /etc/group rm -f $root/etc/mtab #ln -s /proc/mounts $root/etc/mtab -#export NIX_ROOT=$root +export NIX_DATA_DIR=$root/nix/share +export NIX_LOG_DIR=$root/nix/log/nix export NIX_STATE_DIR=$root/nix/var/nix +export NIX_CONF_DIR=$root/nix/etc NIX_CMD_PATH=@NIX_CMD_PATH@/bin echo initialising Nix DB... @@ -67,11 +72,24 @@ echo verifying Nix DB... $NIX_CMD_PATH/nix-store --verify echo copying nixpkgs... -cp -fa ../pkgs $root/nixpkgs +cp -fa ../pkgs $root/nixpkgs/trunk -echo adding packages... +make_dir 0755 /tmp/scripts +cp -fa ../scripts $/tmp/scripts + +echo adding manifest $NIX_CMD_PATH/nix-pull $manifest +echo adding packages +export NIX_ROOT=$root +unset NIX_DATA_DIR +unset NIX_LOG_DIR +unset NIX_STATE_DIR +unset NIX_CONF_DIR + +storeExpr=$(echo '(import ./pkgs.nix).everything' | $NIX_CMD_PATH/nix-instantiate -v -v -) +$NIX_CMD_PATH/nix-store -r $storeExpr + #echo registering valid paths... #(while read storepath; do # echo PATH $storepath diff --git a/make-disk.sh b/make-disk.sh index 2548f0e77889..71aa79394957 100755 --- a/make-disk.sh +++ b/make-disk.sh @@ -11,7 +11,8 @@ rm -rf ${archivesDir}/* NIX_CMD_PATH=/nix/bin storeExpr=$(echo '(import ./pkgs.nix).everything' | $NIX_CMD_PATH/nix-instantiate -v -v -) -$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 -)) +#$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 -)) +$NIX_CMD_PATH/nix-push --copy $archivesDir $manifest $storeExpr $(nix-store -r $(echo '(import ./pkgs.nix).kernel' | $NIX_CMD_PATH/nix-instantiate -)) # Location of sysvinit? sysvinitPath=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).sysvinit' | $NIX_CMD_PATH/nix-instantiate -)) diff --git a/pkgs.nix b/pkgs.nix index 42fbfef64760..c74ec7589a5f 100644 --- a/pkgs.nix +++ b/pkgs.nix @@ -1,5 +1,5 @@ rec { - inherit (import /nixpkgs2/trunk/pkgs/system/i686-linux.nix) + inherit (import /nixpkgs/trunk/pkgs/system/i686-linux.nix) stdenv kernel bash coreutils findutils utillinux sysvinit e2fsprogs nettools nix subversion gcc wget which vim less screen openssh binutils strace shadowutils iputils gnumake curl gnused gnutar gnugrep gzip