From 85bbb5e447cc42e01f558bb9fe39c54471e11e23 Mon Sep 17 00:00:00 2001 From: Armijn Hemel Date: Fri, 6 Aug 2004 13:52:39 +0000 Subject: [PATCH] add a whole bunch of packages to make NixU a bit more useful: - ssh - shadowutils - ping - vim - less - strace - ... svn path=/nixu/trunk/; revision=1243 --- boot/builder.sh | 12 ++++++++++++ boot/default.nix | 6 ++++-- boot/env.sh | 2 +- make-disk.sh | 15 +++++++++------ pkgs.nix | 6 +++--- run.sh | 2 +- 6 files changed, 30 insertions(+), 13 deletions(-) diff --git a/boot/builder.sh b/boot/builder.sh index 8748d8875e5d..63dbe39c0810 100755 --- a/boot/builder.sh +++ b/boot/builder.sh @@ -16,6 +16,18 @@ for i in $boot $halt $login $env; do -e "s^@e2fsprogs\@^$e2fsprogs^g" \ -e "s^@nettools\@^$nettools^g" \ -e "s^@nix\@^$nix^g" \ + -e "s^@wget\@^$wget^g" \ + -e "s^@which\@^$which^g" \ + -e "s^@subversion\@^$subversion^g" \ + -e "s^@vim\@^$vim^g" \ + -e "s^@screen\@^$screen^g" \ + -e "s^@less\@^$less^g" \ + -e "s^@openssh\@^$openssh^g" \ + -e "s^@binutils\@^$binutils^g" \ + -e "s^@strace\@^$strace^g" \ + -e "s^@shadowutils\@^$shadowutils^g" \ + -e "s^@iputils\@^$iputils^g" \ + -e "s^@gnumake\@^$gnumake^g" \ -e "s^@out\@^$out^g" \ < $i > $dst chmod +x $dst diff --git a/boot/default.nix b/boot/default.nix index 6ecd30758b8a..84507a004ace 100644 --- a/boot/default.nix +++ b/boot/default.nix @@ -1,5 +1,6 @@ { stdenv, bash, coreutils, findutils, utillinux, sysvinit, e2fsprogs -, nettools, nix}: +, nettools, nix, subversion, gcc, wget, which, vim, less, screen, openssh +, binutils, strace, shadowutils, iputils, gnumake}: derivation { name = "boot"; @@ -10,5 +11,6 @@ derivation { login = ./login.sh; env = ./env.sh; inherit stdenv bash coreutils findutils utillinux sysvinit - e2fsprogs nettools nix; + e2fsprogs nettools nix subversion gcc wget which vim less screen + openssh binutils strace shadowutils iputils gnumake; } diff --git a/boot/env.sh b/boot/env.sh index 75504da38b7d..627305570f67 100644 --- a/boot/env.sh +++ b/boot/env.sh @@ -1 +1 @@ -export PATH=@nix@/bin:@bash@/bin:@coreutils@/bin:@findutils@/bin:@utillinux@/bin:@utillinux@/sbin:@sysvinit@/bin:@sysvinit@/sbin:@e2fsprogs@/bin:@e2fsprogs@/sbin:@nettools@/bin:@nettools@/sbin: +export PATH=@nix@/bin:@bash@/bin:@coreutils@/bin:@findutils@/bin:@utillinux@/bin:@utillinux@/sbin:@sysvinit@/bin:@sysvinit@/sbin:@e2fsprogs@/bin:@e2fsprogs@/sbin:@nettools@/bin:@nettools@/sbin:@gcc@/bin:@subversion@/bin:@which@/bin:@wget@/bin:@vim@/bin:@less@/bin:@screen@/bin:@openssh@/bin:@binutils@/bin:@strace@/bin:@shadowutils@/bin:@shadowutils@/sbin:@iputils@/bin:@gnumake@/bin diff --git a/make-disk.sh b/make-disk.sh index 00e3cb28de1d..3e55795a480e 100755 --- a/make-disk.sh +++ b/make-disk.sh @@ -17,21 +17,24 @@ if ! test -f $image; then fi # What to copy? -storeExpr=$(echo '(import ./pkgs.nix).everything' | nix-instantiate -) -nix-store -rB $storeExpr -nix-store -qn --requisites $storeExpr > $storePaths + +NIX_CMD_PATH=/nix/bin + +storeExpr=$(echo '(import ./pkgs.nix).everything' | $NIX_CMD_PATH/nix-instantiate -) +$NIX_CMD_PATH/nix-store -rB $storeExpr +$NIX_CMD_PATH/nix-store -qn --requisites $storeExpr > $storePaths (while read storepath; do - nix-store -q --predecessors $storepath | (while read predecessor; do + $NIX_CMD_PATH/nix-store -q --predecessors $storepath | (while read predecessor; do echo $predecessor $storepath done) done) < $storePaths > $successors # Location of sysvinit? -sysvinitPath=$(nix-store -qn $(echo '(import ./pkgs.nix).sysvinit' | nix-instantiate -)) +sysvinitPath=$($NIX_CMD_PATH/nix-store -qn $(echo '(import ./pkgs.nix).sysvinit' | $NIX_CMD_PATH/nix-instantiate -)) # Location of Nix boot scripts? -bootPath=$(nix-store -qn $(echo '(import ./pkgs.nix).boot' | nix-instantiate -)) +bootPath=$($NIX_CMD_PATH/nix-store -qn $(echo '(import ./pkgs.nix).boot' | $NIX_CMD_PATH/nix-instantiate -)) # Fill the disk with the minimal Nix store. if ! test -d /tmp/mnt; then mkdir /tmp/mnt; fi diff --git a/pkgs.nix b/pkgs.nix index 3b6fcb7646e1..1ffa835f5841 100644 --- a/pkgs.nix +++ b/pkgs.nix @@ -1,10 +1,10 @@ rec { - inherit (import pkgs/system/i686-linux.nix) + inherit (import /usr/home/nix/nixpkgs-0.6pre1121/pkgs/system/i686-linux.nix) stdenv bash coreutils findutils utillinux sysvinit e2fsprogs - nettools nix; + nettools nix subversion gcc wget which vim less screen openssh binutils strace shadowutils iputils gnumake; boot = (import ./boot) {inherit stdenv bash coreutils findutils - utillinux sysvinit e2fsprogs nettools nix;}; + utillinux sysvinit e2fsprogs nettools nix subversion gcc wget which vim less screen openssh binutils strace shadowutils iputils gnumake;}; everything = [boot sysvinit]; } diff --git a/run.sh b/run.sh index 9a51834e0d2f..50728feca254 100755 --- a/run.sh +++ b/run.sh @@ -3,5 +3,5 @@ image=/tmp/disk.img linux ubd0="$image" mem=256M \ - eth0=tuntap,tap4,,192.168.150.1 \ + eth0=tuntap,tap1,,192.168.150.3 \ init="/init"