diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2017-08-03 12:45:06 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2017-12-30 22:04:21 -0500 |
commit | a036473a0a0c6100fce316e1444fc33ec6674b85 (patch) | |
tree | 28e6431bc6133b0e8cf8a8a6546ef52a36e110b7 /pkgs/stdenv/generic/setup.sh | |
parent | 7f3ca3e21a22fd3101b40cadb86899542dec2e35 (diff) | |
download | nixlib-a036473a0a0c6100fce316e1444fc33ec6674b85.tar nixlib-a036473a0a0c6100fce316e1444fc33ec6674b85.tar.gz nixlib-a036473a0a0c6100fce316e1444fc33ec6674b85.tar.bz2 nixlib-a036473a0a0c6100fce316e1444fc33ec6674b85.tar.lz nixlib-a036473a0a0c6100fce316e1444fc33ec6674b85.tar.xz nixlib-a036473a0a0c6100fce316e1444fc33ec6674b85.tar.zst nixlib-a036473a0a0c6100fce316e1444fc33ec6674b85.zip |
{bintools,cc}-wrapper: Fix setup hook to respect the role of the cc-compiler
We now have the information to properly determine the role the cc-wrapper dependency has, by taking advantage of `offset`. No longer use the soon-to-be-deprecated crossConfig environment variable, the temp hack used before this change.
Diffstat (limited to 'pkgs/stdenv/generic/setup.sh')
-rw-r--r-- | pkgs/stdenv/generic/setup.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index b2b15c74d4e8..1850d322cc69 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -326,6 +326,17 @@ declare -ra pkgTargetHookVars=(envTargetTargetHook) declare -ra pkgHookVarVars=(pkgBuildHookVars pkgHostHookVars pkgTargetHookVars) +# Add env hooks for all sorts of deps with the specified host offset. +addEnvHooks() { + local depHostOffset="$1" + shift + local pkgHookVarsSlice="${pkgHookVarVars[$depHostOffset + 1]}[@]" + local pkgHookVar + for pkgHookVar in "${!pkgHookVarsSlice}"; do + eval "${pkgHookVar}s"'+=("$@")' + done +} + # Propagated dep files |