mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
bintools-wrapper: Define env vars with full path
This commit is contained in:
parent
1dc0404d6e
commit
044a73bbe6
@ -59,11 +59,11 @@ for cmd in \
|
||||
ar as ld nm objcopy objdump readelf ranlib strip strings size windres
|
||||
do
|
||||
if
|
||||
PATH=$_PATH type -p "@targetPrefix@${cmd}" > /dev/null
|
||||
cmd_path=$(PATH=$_PATH command -v "@targetPrefix@${cmd}")
|
||||
then
|
||||
upper_case="$(echo "$cmd" | tr "[:lower:]" "[:upper:]")"
|
||||
export "${role_pre}${upper_case}=@targetPrefix@${cmd}";
|
||||
export "${upper_case}${role_post}=@targetPrefix@${cmd}";
|
||||
export "${role_pre}${upper_case}=${cmd_path}";
|
||||
export "${upper_case}${role_post}=${cmd_path}";
|
||||
fi
|
||||
done
|
||||
|
||||
@ -72,5 +72,5 @@ done
|
||||
export NIX_HARDENING_ENABLE
|
||||
|
||||
# No local scope in sourced file
|
||||
unset -v role_pre role_post cmd upper_case
|
||||
unset -v role_pre role_post cmd cmd_path upper_case
|
||||
set +u
|
||||
|
Loading…
Reference in New Issue
Block a user