- add more directories

- make /dev/null inside a chroot to install

svn path=/nixu/trunk/; revision=3366
This commit is contained in:
Armijn Hemel 2005-07-19 15:39:32 +00:00
parent 8122aebd19
commit 5c6d52dbd8
3 changed files with 24 additions and 5 deletions

@ -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

@ -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 -))

@ -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