diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 8dff35578071..6f1a654a38ac 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -182,10 +182,8 @@ addToSearchPathWithCustomDelimiter() { fi } -PATH_DELIMITER=':' - addToSearchPath() { - addToSearchPathWithCustomDelimiter "${PATH_DELIMITER}" "$@" + addToSearchPathWithCustomDelimiter ":" "$@" } # Add $1/lib* into rpaths. @@ -508,7 +506,7 @@ activatePackage() { fi if [[ "$hostOffset" -eq 0 && -d "$pkg/bin" ]]; then - addToSearchPath HOST_PATH "$pkg/bin" + addToSearchPath _HOST_PATH "$pkg/bin" fi if [[ -f "$pkg/nix-support/setup-hook" ]]; then @@ -617,10 +615,15 @@ fi PATH="${_PATH-}${_PATH:+${PATH:+:}}$PATH" +HOST_PATH="${_HOST_PATH-}${_HOST_PATH:+${HOST_PATH:+:}}$HOST_PATH" if (( "${NIX_DEBUG:-0}" >= 1 )); then echo "final path: $PATH" + echo "final host path: $HOST_PATH" fi +unset _PATH +unset _HOST_PATH + # Make GNU Make produce nested output. export NIX_INDENT_MAKE=1