summary refs log tree commit diff
path: root/pkgs/stdenv/generic
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2004-03-12 11:12:18 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2004-03-12 11:12:18 +0000
commit0fd59fd7a41a47478f241b4a27c39d39f42914b9 (patch)
tree08c4488a5118b997c2721c8f793fd55028df2c73 /pkgs/stdenv/generic
parentde13527000165c566e47d2146a1a6480fc67da59 (diff)
downloadnixlib-0fd59fd7a41a47478f241b4a27c39d39f42914b9.tar
nixlib-0fd59fd7a41a47478f241b4a27c39d39f42914b9.tar.gz
nixlib-0fd59fd7a41a47478f241b4a27c39d39f42914b9.tar.bz2
nixlib-0fd59fd7a41a47478f241b4a27c39d39f42914b9.tar.lz
nixlib-0fd59fd7a41a47478f241b4a27c39d39f42914b9.tar.xz
nixlib-0fd59fd7a41a47478f241b4a27c39d39f42914b9.tar.zst
nixlib-0fd59fd7a41a47478f241b4a27c39d39f42914b9.zip
* Re-enabled purity checking: it should work now. First we only
  checked whether absolute paths passed to gcc/ld refer to the store,
  which is wrong: they can also refer to the build tree
  (/tmp/nix-...).

* Less static composition in the construction of stdenv-nix-linux:
  gcc-wrapper and generic are now passed in as arguments, rather then
  referenced by relative path.  This makes it easier to hack on a
  specific stage of the bootstrap process (before, a change to, e.g.,
  generic/setup.sh would cause all bootstrap stages to be redone).

svn path=/nixpkgs/trunk/; revision=833
Diffstat (limited to 'pkgs/stdenv/generic')
-rw-r--r--pkgs/stdenv/generic/setup.sh18
1 files changed, 14 insertions, 4 deletions
diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh
index 21611278c21b..2dedf46ac2b3 100644
--- a/pkgs/stdenv/generic/setup.sh
+++ b/pkgs/stdenv/generic/setup.sh
@@ -69,8 +69,6 @@ addToEnv()
         export _PATH=$_PATH:$1/bin
     fi
 
-    echo "${envHooks[@]}"
-
     for i in "${envHooks[@]}"; do
         $i $pkg
     done
@@ -92,8 +90,20 @@ export NIX_STRIP_DEBUG=1
 export NIX_CFLAGS_STRIP="-g0 -Wl,-s"
 
 
-# Where is the store?  This is required for purity checking.
-export NIX_STORE=$(dirname $out)/ # !!! hack
+# Do we know where the store is?  This is required for purity checking.
+if test -z "$NIX_STORE"; then
+    echo "Error: you have an old version of Nix that does not set the" \
+        "NIX_STORE variable.  Please upgrade." >&2
+    exit 1
+fi
+
+
+# We also need to know the root of the build directory for purity checking.
+if test -z "$NIX_BUILD_TOP"; then
+    echo "Error: you have an old version of Nix that does not set the" \
+        "NIX_BUILD_TOP variable.  Please upgrade." >&2
+    exit 1
+fi
 
 
 # Set the TZ (timezone) environment variable, otherwise commands like