···97# setup-hook, which `role` tracks.
98if [ -n "${crossConfig:-}" ]; then
99 export NIX_CC_WRAPPER_@infixSalt@_TARGET_BUILD=1
100- role="BUILD_"
0101else
102 export NIX_CC_WRAPPER_@infixSalt@_TARGET_HOST=1
103- role=""
0104fi
105106# Eventually the exact sort of env-hook we create will depend on the role. This
···133134# Export tool environment variables so various build systems use the right ones.
135136-export NIX_${role}CC=@out@
137138-export ${role}CC=@named_cc@
139-export ${role}CXX=@named_cxx@
00140141-for CMD in \
142- ar as nm objcopy ranlib strip strings size ld windres
143do
144 if
145- PATH=$_PATH type -p "@targetPrefix@$CMD" > /dev/null
146 then
147- export "${role}$(echo "$CMD" | tr "[:lower:]" "[:upper:]")=@targetPrefix@${CMD}";
00148 fi
149done
150151# No local scope in sourced file
152-unset role
···97# setup-hook, which `role` tracks.
98if [ -n "${crossConfig:-}" ]; then
99 export NIX_CC_WRAPPER_@infixSalt@_TARGET_BUILD=1
100+ role_pre='BUILD_'
101+ role_post='_FOR_BUILD'
102else
103 export NIX_CC_WRAPPER_@infixSalt@_TARGET_HOST=1
104+ role_pre=''
105+ role_post=''
106fi
107108# Eventually the exact sort of env-hook we create will depend on the role. This
···135136# Export tool environment variables so various build systems use the right ones.
137138+export NIX_${role_pre}CC=@out@
139140+export ${role_pre}CC=@named_cc@
141+export ${role_pre}CXX=@named_cxx@
142+export CC${role_post}=@named_cc@
143+export CXX${role_post}=@named_cxx@
144145+for cmd in \
146+ ar as ld nm objcopy objdump readelf ranlib strip strings size windres
147do
148 if
149+ PATH=$_PATH type -p "@targetPrefix@${cmd}" > /dev/null
150 then
151+ upper_case="$(echo "$cmd" | tr "[:lower:]" "[:upper:]")"
152+ export "${role_pre}${upper_case}=@targetPrefix@${cmd}";
153+ export "${upper_case}${role_post}=@targetPrefix@${cmd}";
154 fi
155done
156157# No local scope in sourced file
158+unset -v role_pre role_post cmd upper_case
+2
pkgs/data/misc/tzdata/default.nix
···41 cp tzfile.h "$dev/include/tzfile.h"
42 '';
430044 meta = {
45 homepage = http://www.iana.org/time-zones;
46 description = "Database of current and historical time zones";
···41 cp tzfile.h "$dev/include/tzfile.h"
42 '';
4344+ setupHook = ./tzdata-setup-hook.sh;
45+46 meta = {
47 homepage = http://www.iana.org/time-zones;
48 description = "Database of current and historical time zones";