diff options
Diffstat (limited to 'pkgs/stdenv/generic/setup.sh')
-rw-r--r-- | pkgs/stdenv/generic/setup.sh | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 141e94c5ed46..11d0f1fbce43 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -257,9 +257,17 @@ shopt -s nullglob # Set up the initial path. PATH= +HOST_PATH= for i in $initialPath; do if [ "$i" = / ]; then i=; fi addToSearchPath PATH "$i/bin" + + # For backward compatibility, we add initial path to HOST_PATH so + # it can be used in auto patch-shebangs. Unfortunately this will + # not work with cross compilation. + if [ -z "${strictDeps-}" ]; then + addToSearchPath HOST_PATH "$i/bin" + fi done if (( "${NIX_DEBUG:-0}" >= 1 )); then @@ -272,7 +280,6 @@ if [ -z "${SHELL:-}" ]; then echo "SHELL not set"; exit 1; fi BASH="$SHELL" export CONFIG_SHELL="$SHELL" - # Dummy implementation of the paxmark function. On Linux, this is # overwritten by paxctl's setup hook. paxmark() { true; } @@ -1044,7 +1051,7 @@ checkPhase() { # Old bash empty array hack # shellcheck disable=SC2086 local flagsArray=( - ${enableParallelBuilding:+-j${NIX_BUILD_CORES} -l${NIX_BUILD_CORES}} + ${enableParallelChecking:+-j${NIX_BUILD_CORES} -l${NIX_BUILD_CORES}} $makeFlags ${makeFlagsArray+"${makeFlagsArray[@]}"} ${checkFlags:-VERBOSE=y} ${checkFlagsArray+"${checkFlagsArray[@]}"} ${checkTarget} @@ -1176,7 +1183,7 @@ installCheckPhase() { # Old bash empty array hack # shellcheck disable=SC2086 local flagsArray=( - ${enableParallelBuilding:+-j${NIX_BUILD_CORES} -l${NIX_BUILD_CORES}} + ${enableParallelChecking:+-j${NIX_BUILD_CORES} -l${NIX_BUILD_CORES}} $makeFlags ${makeFlagsArray+"${makeFlagsArray[@]}"} $installCheckFlags ${installCheckFlagsArray+"${installCheckFlagsArray[@]}"} ${installCheckTarget:-installcheck} |