nixpkgs/pkgs/build-support/gcc-wrapper/utils.sh
Eelco Dolstra 0fd59fd7a4 * 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
2004-03-12 11:12:18 +00:00

14 lines
281 B
Bash

skip () {
if test "$NIX_DEBUG" = "1"; then
echo "skipping impure path $1" >&2
fi
}
badPath() {
local p=$1
test \
"${p:0:${#NIX_STORE}}" != "$NIX_STORE" -a \
"${p:0:4}" != "/tmp" -a \
"${p:0:${#NIX_BUILD_TOP}}" != "$NIX_BUILD_TOP"
}