diff --git a/make-disk.sh b/make-disk.sh index fc62a697deaa..6043b61fcb20 100755 --- a/make-disk.sh +++ b/make-disk.sh @@ -3,7 +3,13 @@ # deps is an array declare -a deps -archivesDir=$(mktemp -d) +# determine where we can find the Nix binaries +NIX=$(dirname $(which nix-store)) + +# make sure we use our own mktemp, because it is more pure +mktemp=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).mktemp' | $NIX/nix-instantiate -)) +archivesDir=$($mktemp/bin/mktemp -d) + manifest=${archivesDir}/MANIFEST nixpkgs=/nixpkgs/trunk/pkgs fill_disk=$archivesDir/scripts/fill-disk.sh @@ -15,8 +21,6 @@ initrd=/tmp/initram.img initdir=${archivesDir}/initdir initscript=$archivesDir/scripts/init.sh -# determine where we can find the Nix binaries -NIX=$(dirname $(which nix-store)) storeExpr=$($NIX/nix-store -qR $($NIX/nix-store -r $(echo '(import ./pkgs.nix).everything' | $NIX/nix-instantiate -))) #$NIX/nix-push --copy $archivesDir $manifest $($NIX/nix-store -r $storeExpr) $($NIX/nix-store -r $(echo '(import ./pkgs.nix).kernel' | $NIX/nix-instantiate -)) diff --git a/pkgs.nix b/pkgs.nix index f028a8e03d3a..66076370bc37 100644 --- a/pkgs.nix +++ b/pkgs.nix @@ -5,7 +5,7 @@ rec { nettools nixUnstable subversion gcc wget which vim less screen openssh binutils strace shadowutils iputils gnumake curl gnused gnutar gnugrep gzip mingettyWrapper grubWrapper syslinux parted module_init_tools module_init_toolsStatic udev - dhcpWrapper man nano eject sysklogd kudzu xawtv; + dhcpWrapper man nano eject sysklogd kudzu xawtv mktemp; boot = (import ./boot) {inherit stdenv bash bashStatic coreutils findutilsWrapper utillinux utillinuxStatic sysvinit e2fsprogs nettools subversion gcc wget which vim