mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-17 06:06:13 +03: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
|
ar as ld nm objcopy objdump readelf ranlib strip strings size windres
|
||||||
do
|
do
|
||||||
if
|
if
|
||||||
PATH=$_PATH type -p "@targetPrefix@${cmd}" > /dev/null
|
cmd_path=$(PATH=$_PATH command -v "@targetPrefix@${cmd}")
|
||||||
then
|
then
|
||||||
upper_case="$(echo "$cmd" | tr "[:lower:]" "[:upper:]")"
|
upper_case="$(echo "$cmd" | tr "[:lower:]" "[:upper:]")"
|
||||||
export "${role_pre}${upper_case}=@targetPrefix@${cmd}";
|
export "${role_pre}${upper_case}=${cmd_path}";
|
||||||
export "${upper_case}${role_post}=@targetPrefix@${cmd}";
|
export "${upper_case}${role_post}=${cmd_path}";
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -72,5 +72,5 @@ done
|
|||||||
export NIX_HARDENING_ENABLE
|
export NIX_HARDENING_ENABLE
|
||||||
|
|
||||||
# No local scope in sourced file
|
# 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
|
set +u
|
||||||
|
Loading…
Reference in New Issue
Block a user