From e76efef0d0d4fb53ab2081ec999704775f8e7044 Mon Sep 17 00:00:00 2001 From: Armijn Hemel Date: Sun, 2 Jul 2006 22:37:40 +0000 Subject: [PATCH] make sure we always have mktemp, by building our own version first using Nix. This makes it a bit more pure to build the NixOS iso. Still room for improvement though... svn path=/nixu/trunk/; revision=5559 --- make-disk.sh | 10 +++++++--- pkgs.nix | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) 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