mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 00:12:56 +00:00
stdenv: fix HOST_PATH change
a4630c65ca
was incorrect in assuming $SHELL would be a path to the
bash derivation. In fact $SHELL will be a path to the bash executable.
Unfortunately this did not fix the original issue. So instead, we just
have to reuse initialPath can be added like PATH is.
Sorry for the inconvenience! I hadn’t thought through the effects of
the last commit.
/cc @copumpkin @ericson2314
This commit is contained in:
parent
bb6506561d
commit
ba5717a6f5
@ -261,6 +261,13 @@ HOST_PATH=
|
|||||||
for i in $initialPath; do
|
for i in $initialPath; do
|
||||||
if [ "$i" = / ]; then i=; fi
|
if [ "$i" = / ]; then i=; fi
|
||||||
addToSearchPath PATH "$i/bin"
|
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
|
done
|
||||||
|
|
||||||
if (( "${NIX_DEBUG:-0}" >= 1 )); then
|
if (( "${NIX_DEBUG:-0}" >= 1 )); then
|
||||||
@ -273,13 +280,6 @@ if [ -z "${SHELL:-}" ]; then echo "SHELL not set"; exit 1; fi
|
|||||||
BASH="$SHELL"
|
BASH="$SHELL"
|
||||||
export CONFIG_SHELL="$SHELL"
|
export CONFIG_SHELL="$SHELL"
|
||||||
|
|
||||||
# For backward compatibility, we add SHELL to HOST_PATH so it can be
|
|
||||||
# used in auto patch-shebangs. Unfortunately this will not work with
|
|
||||||
# cross compilation because it will be for the builder’s platform.
|
|
||||||
if [ -z "${strictDeps-}" ]; then
|
|
||||||
addToSearchPath HOST_PATH "$SHELL/bin"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Dummy implementation of the paxmark function. On Linux, this is
|
# Dummy implementation of the paxmark function. On Linux, this is
|
||||||
# overwritten by paxctl's setup hook.
|
# overwritten by paxctl's setup hook.
|
||||||
paxmark() { true; }
|
paxmark() { true; }
|
||||||
|
Loading…
Reference in New Issue
Block a user