summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2017-08-10 18:22:07 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2017-12-30 22:04:22 -0500
commit046f091e0d9853a81ce4d484a75cfa1b5fc9347d (patch)
tree4a0094d67c9444330e9b71d4c89d0ce45630e31b
parenta1cdc2011ed049cf8a7a0f2f7909d401dc8d9457 (diff)
treewide: Don't use envHook anymore
This commits needs a MAJOR audit as I oftentimes just guessed which of `$hostOffset`, `$targetOffset`, or a fixed offset should be used.
-rw-r--r--pkgs/applications/science/logic/coq/8.4.nix2
-rw-r--r--pkgs/applications/science/logic/coq/default.nix2
-rw-r--r--pkgs/applications/science/math/R/setup-hook.sh6
-rw-r--r--pkgs/build-support/emacs/setup-hook.sh6
-rw-r--r--pkgs/build-support/gcc-wrapper-old/setup-hook.sh4
-rw-r--r--pkgs/build-support/setup-hooks/find-xml-catalogs.sh2
-rw-r--r--pkgs/build-support/setup-hooks/set-java-classpath.sh2
-rw-r--r--pkgs/build-support/setup-hooks/setup-debug-info-dirs.sh2
-rw-r--r--pkgs/build-support/setup-hooks/wrap-gapps-hook.sh2
-rw-r--r--pkgs/data/icons/hicolor-icon-theme/setup-hook.sh3
-rw-r--r--pkgs/desktops/gnome-3/core/grilo/setup-hook.sh2
-rw-r--r--pkgs/desktops/gnustep/make/setup-hook.sh2
-rw-r--r--pkgs/development/compilers/chicken/setup-hook.sh2
-rw-r--r--pkgs/development/compilers/go/setup-hook.sh2
-rw-r--r--pkgs/development/compilers/haxe/setup-hook.sh2
-rw-r--r--pkgs/development/compilers/sbcl/default.nix2
-rw-r--r--pkgs/development/idris-modules/build-idris-package.nix3
-rw-r--r--pkgs/development/idris-modules/with-packages.nix2
-rw-r--r--pkgs/development/interpreters/elixir/setup-hook.sh2
-rw-r--r--pkgs/development/interpreters/erlang/setup-hook.sh2
-rw-r--r--pkgs/development/interpreters/guile/setup-hook-2.0.sh2
-rw-r--r--pkgs/development/interpreters/guile/setup-hook-2.2.sh2
-rw-r--r--pkgs/development/interpreters/guile/setup-hook.sh2
-rw-r--r--pkgs/development/interpreters/jruby/default.nix2
-rw-r--r--pkgs/development/interpreters/perl/setup-hook.sh2
-rw-r--r--pkgs/development/interpreters/python/setup-hook.sh2
-rw-r--r--pkgs/development/interpreters/ruby/default.nix2
-rw-r--r--pkgs/development/libraries/SDL/setup-hook.sh6
-rw-r--r--pkgs/development/libraries/SDL2/setup-hook.sh6
-rw-r--r--pkgs/development/libraries/gdk-pixbuf/setup-hook.sh2
-rw-r--r--pkgs/development/libraries/glib/setup-hook.sh2
-rw-r--r--pkgs/development/libraries/gobject-introspection/setup-hook.sh2
-rw-r--r--pkgs/development/libraries/grantlee/5/setup-hook.sh6
-rw-r--r--pkgs/development/libraries/gstreamer/core/setup-hook.sh2
-rw-r--r--pkgs/development/libraries/gstreamer/legacy/gstreamer/setup-hook.sh2
-rw-r--r--pkgs/development/libraries/kde-frameworks/extra-cmake-modules/setup-hook.sh2
-rw-r--r--pkgs/development/libraries/kde-frameworks/kdoctools/setup-hook.sh2
-rw-r--r--pkgs/development/libraries/librep/setup-hook.sh2
-rw-r--r--pkgs/development/libraries/qt-5/hooks/qtbase-setup-hook.sh6
-rw-r--r--pkgs/development/libraries/rep-gtk/setup-hook.sh2
-rw-r--r--pkgs/development/libraries/slib/setup-hook.sh2
-rw-r--r--pkgs/development/lisp-modules/clwrapper/setup-hook.sh2
-rw-r--r--pkgs/development/ocaml-modules/eliom/setup-hook.sh2
-rw-r--r--pkgs/development/ocaml-modules/ocamlmake/setup-hook.sh2
-rwxr-xr-xpkgs/development/tools/build-managers/cmake/setup-hook.sh6
-rw-r--r--pkgs/development/tools/misc/automake/setup-hook.sh2
-rw-r--r--pkgs/development/tools/misc/pkgconfig/setup-hook.sh6
-rw-r--r--pkgs/development/tools/ocaml/findlib/default.nix2
-rw-r--r--pkgs/development/web/nodejs/setup-hook.sh2
-rw-r--r--pkgs/os-specific/darwin/apple-sdk/framework-setup-hook.sh2
-rw-r--r--pkgs/os-specific/darwin/apple-sdk/security-setup-hook.sh2
-rw-r--r--pkgs/tools/text/sgml/opensp/setup-hook.sh2
-rw-r--r--pkgs/tools/typesetting/tex/tetex/setup-hook.sh2
-rw-r--r--pkgs/tools/typesetting/tex/texlive/setup-hook.sh2
54 files changed, 64 insertions, 80 deletions
diff --git a/pkgs/applications/science/logic/coq/8.4.nix b/pkgs/applications/science/logic/coq/8.4.nix
index 1f7ef571eaf9..64b0f85aed2a 100644
--- a/pkgs/applications/science/logic/coq/8.4.nix
+++ b/pkgs/applications/science/logic/coq/8.4.nix
@@ -60,7 +60,7 @@ stdenv.mkDerivation {
fi
}
- envHooks=(''${envHooks[@]} addCoqPath)
+ addEnvHooks "$targetOffset" addCoqPath
'';
passthru = {
diff --git a/pkgs/applications/science/logic/coq/default.nix b/pkgs/applications/science/logic/coq/default.nix
index 6ab98f30ae69..9e27ebe97739 100644
--- a/pkgs/applications/science/logic/coq/default.nix
+++ b/pkgs/applications/science/logic/coq/default.nix
@@ -109,7 +109,7 @@ self = stdenv.mkDerivation {
fi
}
- envHooks=(''${envHooks[@]} addCoqPath)
+ addEnvHooks "$targetOffset" addCoqPath
'';
preConfigure = ''
diff --git a/pkgs/applications/science/math/R/setup-hook.sh b/pkgs/applications/science/math/R/setup-hook.sh
index 09a775db9bf5..6951e2a4b61b 100644
--- a/pkgs/applications/science/math/R/setup-hook.sh
+++ b/pkgs/applications/science/math/R/setup-hook.sh
@@ -1,5 +1,7 @@
addRLibPath () {
- addToSearchPath R_LIBS_SITE $1/library
+ if [[ -d "$1/library" ]]; then
+ addToSearchPath R_LIBS_SITE "$1/library"
+ fi
}
-envHooks+=(addRLibPath)
+addEnvHooks "$targetOffset" addRLibPath
diff --git a/pkgs/build-support/emacs/setup-hook.sh b/pkgs/build-support/emacs/setup-hook.sh
index defef45b55f5..e1db3e828fd7 100644
--- a/pkgs/build-support/emacs/setup-hook.sh
+++ b/pkgs/build-support/emacs/setup-hook.sh
@@ -4,4 +4,8 @@ addEmacsVars () {
fi
}
-envHooks+=(addEmacsVars)
+# If this is for a wrapper derivation, emacs and the dependencies are all
+# run-time dependencies. If this is for precompiling packages into bytecode,
+# emacs is a compile-time dependency of the package.
+addEnvHooks "$targetOffset" addEmacsVars
+addEnvHooks "$targetOffset" addEmacsVars
diff --git a/pkgs/build-support/gcc-wrapper-old/setup-hook.sh b/pkgs/build-support/gcc-wrapper-old/setup-hook.sh
index d8bdf858ae58..ad3ffeffbbbc 100644
--- a/pkgs/build-support/gcc-wrapper-old/setup-hook.sh
+++ b/pkgs/build-support/gcc-wrapper-old/setup-hook.sh
@@ -1,4 +1,4 @@
-addCVars () {
+gccWrapperOld_addCVars () {
if test -d $1/include; then
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem $1/include"
fi
@@ -12,7 +12,7 @@ addCVars () {
fi
}
-envHooks=(${envHooks[@]} addCVars)
+envBuildBuildHooks+=(gccWrapperOld_addCVars)
# Note: these come *after* $out in the PATH (see setup.sh).
diff --git a/pkgs/build-support/setup-hooks/find-xml-catalogs.sh b/pkgs/build-support/setup-hooks/find-xml-catalogs.sh
index b742d5a8ffd9..85364a61f612 100644
--- a/pkgs/build-support/setup-hooks/find-xml-catalogs.sh
+++ b/pkgs/build-support/setup-hooks/find-xml-catalogs.sh
@@ -18,5 +18,5 @@ if [ -z "$libxmlHookDone" ]; then
# xmllint and xsltproc from looking in /etc/xml/catalog.
export XML_CATALOG_FILES
if [ -z "$XML_CATALOG_FILES" ]; then XML_CATALOG_FILES=" "; fi
- envHooks+=(addXMLCatalogs)
+ addEnvHooks "$hostOffset" addXMLCatalogs
fi
diff --git a/pkgs/build-support/setup-hooks/set-java-classpath.sh b/pkgs/build-support/setup-hooks/set-java-classpath.sh
index 047da91bc97c..5d3548dc2e88 100644
--- a/pkgs/build-support/setup-hooks/set-java-classpath.sh
+++ b/pkgs/build-support/setup-hooks/set-java-classpath.sh
@@ -10,4 +10,4 @@ addPkgToClassPath () {
done
}
-envHooks+=(addPkgToClassPath)
+addEnvHooks "$targetOffset" addPkgToClassPath
diff --git a/pkgs/build-support/setup-hooks/setup-debug-info-dirs.sh b/pkgs/build-support/setup-hooks/setup-debug-info-dirs.sh
index 2fd2a2d6da6f..96bf48cf123a 100644
--- a/pkgs/build-support/setup-hooks/setup-debug-info-dirs.sh
+++ b/pkgs/build-support/setup-hooks/setup-debug-info-dirs.sh
@@ -2,4 +2,4 @@ setupDebugInfoDirs () {
addToSearchPath NIX_DEBUG_INFO_DIRS $1/lib/debug
}
-envHooks+=(setupDebugInfoDirs)
+addEnvHooks "$targetOffset" setupDebugInfoDirs
diff --git a/pkgs/build-support/setup-hooks/wrap-gapps-hook.sh b/pkgs/build-support/setup-hooks/wrap-gapps-hook.sh
index 79b8d5b73fa1..25ac12996cc1 100644
--- a/pkgs/build-support/setup-hooks/wrap-gapps-hook.sh
+++ b/pkgs/build-support/setup-hooks/wrap-gapps-hook.sh
@@ -6,7 +6,7 @@ find_gio_modules() {
fi
}
-envHooks+=(find_gio_modules)
+addEnvHooks "$targetOffset" find_gio_modules
# Note: $gappsWrapperArgs still gets defined even if $dontWrapGApps is set.
wrapGAppsHook() {
diff --git a/pkgs/data/icons/hicolor-icon-theme/setup-hook.sh b/pkgs/data/icons/hicolor-icon-theme/setup-hook.sh
index 05ab9b3d65df..29306cb316af 100644
--- a/pkgs/data/icons/hicolor-icon-theme/setup-hook.sh
+++ b/pkgs/data/icons/hicolor-icon-theme/setup-hook.sh
@@ -8,7 +8,8 @@ hicolorIconThemeHook() {
}
-envHooks+=(hicolorIconThemeHook)
+# I think this is meant to be a runtime dep
+addEnvHooks "$hostOffset" hicolorIconThemeHook
# Remove icon cache
hicolorPreFixupPhase() {
diff --git a/pkgs/desktops/gnome-3/core/grilo/setup-hook.sh b/pkgs/desktops/gnome-3/core/grilo/setup-hook.sh
index 3291e38addb8..9337c520a207 100644
--- a/pkgs/desktops/gnome-3/core/grilo/setup-hook.sh
+++ b/pkgs/desktops/gnome-3/core/grilo/setup-hook.sh
@@ -4,4 +4,4 @@ make_grilo_find_plugins() {
fi
}
-envHooks+=(make_grilo_find_plugins)
+addEnvHooks "$hostOffset" make_grilo_find_plugins
diff --git a/pkgs/desktops/gnustep/make/setup-hook.sh b/pkgs/desktops/gnustep/make/setup-hook.sh
index 71618ef960f9..531389011164 100644
--- a/pkgs/desktops/gnustep/make/setup-hook.sh
+++ b/pkgs/desktops/gnustep/make/setup-hook.sh
@@ -74,4 +74,4 @@ addEnvVars() {
addToSearchPath NIX_GNUSTEP_SYSTEM_DOC_INFO "$tmp"
fi
}
-envHooks=(${envHooks[@]} addEnvVars)
+addEnvHooks "$targetOffset" addEnvVars
diff --git a/pkgs/development/compilers/chicken/setup-hook.sh b/pkgs/development/compilers/chicken/setup-hook.sh
index d7f28539dc64..b0d9b53b5378 100644
--- a/pkgs/development/compilers/chicken/setup-hook.sh
+++ b/pkgs/development/compilers/chicken/setup-hook.sh
@@ -4,4 +4,4 @@ addChickenRepositoryPath() {
export CHICKEN_INCLUDE_PATH="$1/share;$CHICKEN_INCLUDE_PATH"
}
-envHooks=(${envHooks[@]} addChickenRepositoryPath)
+addEnvHooks "$targetOffset" addChickenRepositoryPath
diff --git a/pkgs/development/compilers/go/setup-hook.sh b/pkgs/development/compilers/go/setup-hook.sh
index 1b91c8312b88..7dce15eeb102 100644
--- a/pkgs/development/compilers/go/setup-hook.sh
+++ b/pkgs/development/compilers/go/setup-hook.sh
@@ -2,4 +2,4 @@ addToGoPath() {
addToSearchPath GOPATH $1/share/go
}
-envHooks=(${envHooks[@]} addToGoPath)
+addEnvHooks "$targetOffset" addToGoPath
diff --git a/pkgs/development/compilers/haxe/setup-hook.sh b/pkgs/development/compilers/haxe/setup-hook.sh
index 21cc0206859f..e6496107a5ee 100644
--- a/pkgs/development/compilers/haxe/setup-hook.sh
+++ b/pkgs/development/compilers/haxe/setup-hook.sh
@@ -4,4 +4,4 @@ addHaxeLibPath() {
fi
}
-envHooks+=(addHaxeLibPath)
+addEnvHooks "$targetOffset" addHaxeLibPath
diff --git a/pkgs/development/compilers/sbcl/default.nix b/pkgs/development/compilers/sbcl/default.nix
index b800d71198af..cd3120ed8312 100644
--- a/pkgs/development/compilers/sbcl/default.nix
+++ b/pkgs/development/compilers/sbcl/default.nix
@@ -91,7 +91,7 @@ stdenv.mkDerivation rec {
# Specifying $SBCL_HOME is only truly needed with `purgeNixReferences = true`.
setupHook = writeText "setupHook.sh" ''
- envHooks+=(_setSbclHome)
+ addEnvHooks "$targetOffset" _setSbclHome
_setSbclHome() {
export SBCL_HOME='@out@/lib/sbcl/'
}
diff --git a/pkgs/development/idris-modules/build-idris-package.nix b/pkgs/development/idris-modules/build-idris-package.nix
index 9dfa3430ed8b..66eddd0e3602 100644
--- a/pkgs/development/idris-modules/build-idris-package.nix
+++ b/pkgs/development/idris-modules/build-idris-package.nix
@@ -18,7 +18,8 @@
fi
}
- envHooks+=(addIdrisLibs)
+ # All run-time deps
+ addEnvHooks 0 addIdrisLibs
'';
buildPhase = ''
diff --git a/pkgs/development/idris-modules/with-packages.nix b/pkgs/development/idris-modules/with-packages.nix
index d2b09808ec15..d4638670f699 100644
--- a/pkgs/development/idris-modules/with-packages.nix
+++ b/pkgs/development/idris-modules/with-packages.nix
@@ -14,7 +14,7 @@
fi
}
- envHooks+=(installIdrisLib)
+ envHostTargetHooks+=(installIdrisLib)
'';
unpackPhase = ''
diff --git a/pkgs/development/interpreters/elixir/setup-hook.sh b/pkgs/development/interpreters/elixir/setup-hook.sh
index 2ed3b2e6454b..501eca3cf02a 100644
--- a/pkgs/development/interpreters/elixir/setup-hook.sh
+++ b/pkgs/development/interpreters/elixir/setup-hook.sh
@@ -2,4 +2,4 @@ addErlLibPath() {
addToSearchPath ERL_LIBS $1/lib/elixir/lib
}
-envHooks+=(addErlLibPath)
+addEnvHooks "$hostOffset" addErlLibPath
diff --git a/pkgs/development/interpreters/erlang/setup-hook.sh b/pkgs/development/interpreters/erlang/setup-hook.sh
index 68c0f762dfc5..3962d154ba9f 100644
--- a/pkgs/development/interpreters/erlang/setup-hook.sh
+++ b/pkgs/development/interpreters/erlang/setup-hook.sh
@@ -2,4 +2,4 @@ addErlangLibPath() {
addToSearchPath ERL_LIBS $1/lib/erlang/lib
}
-envHooks+=(addErlangLibPath)
+addEnvHooks "$hostOffset" addErlangLibPath
diff --git a/pkgs/development/interpreters/guile/setup-hook-2.0.sh b/pkgs/development/interpreters/guile/setup-hook-2.0.sh
index fd1dc944ed44..c7fb4f70fc6a 100644
--- a/pkgs/development/interpreters/guile/setup-hook-2.0.sh
+++ b/pkgs/development/interpreters/guile/setup-hook-2.0.sh
@@ -10,4 +10,4 @@ addGuileLibPath () {
fi
}
-envHooks+=(addGuileLibPath)
+addEnvHooks "$hostOffset" addGuileLibPath
diff --git a/pkgs/development/interpreters/guile/setup-hook-2.2.sh b/pkgs/development/interpreters/guile/setup-hook-2.2.sh
index 86c1e0d3e4a9..73e700bde026 100644
--- a/pkgs/development/interpreters/guile/setup-hook-2.2.sh
+++ b/pkgs/development/interpreters/guile/setup-hook-2.2.sh
@@ -10,4 +10,4 @@ addGuileLibPath () {
fi
}
-envHooks+=(addGuileLibPath)
+addEnvHooks "$hostOffset" addGuileLibPath
diff --git a/pkgs/development/interpreters/guile/setup-hook.sh b/pkgs/development/interpreters/guile/setup-hook.sh
index c1d19e579ed5..bf04fee1e893 100644
--- a/pkgs/development/interpreters/guile/setup-hook.sh
+++ b/pkgs/development/interpreters/guile/setup-hook.sh
@@ -5,4 +5,4 @@ addGuileLibPath () {
fi
}
-envHooks+=(addGuileLibPath)
+addEnvHooks "$hostOffset" addGuileLibPath
diff --git a/pkgs/development/interpreters/jruby/default.nix b/pkgs/development/interpreters/jruby/default.nix
index ff192c072865..2224a13ba7c0 100644
--- a/pkgs/development/interpreters/jruby/default.nix
+++ b/pkgs/development/interpreters/jruby/default.nix
@@ -36,7 +36,7 @@ jruby = stdenv.mkDerivation rec {
addToSearchPath GEM_PATH \$1/${passthru.gemPath}
}
- envHooks+=(addGemPath)
+ addEnvHooks "$hostOffset" addGemPath
EOF
'';
diff --git a/pkgs/development/interpreters/perl/setup-hook.sh b/pkgs/development/interpreters/perl/setup-hook.sh
index a8656b8531db..7909412806c8 100644
--- a/pkgs/development/interpreters/perl/setup-hook.sh
+++ b/pkgs/development/interpreters/perl/setup-hook.sh
@@ -2,4 +2,4 @@ addPerlLibPath () {
addToSearchPath PERL5LIB $1/lib/perl5/site_perl
}
-envHooks+=(addPerlLibPath)
+addEnvHooks "$hostOffset" addPerlLibPath
diff --git a/pkgs/development/interpreters/python/setup-hook.sh b/pkgs/development/interpreters/python/setup-hook.sh
index dda9bed39f85..3599478537e3 100644
--- a/pkgs/development/interpreters/python/setup-hook.sh
+++ b/pkgs/development/interpreters/python/setup-hook.sh
@@ -12,7 +12,7 @@ toPythonPath() {
echo $result
}
-envHooks+=(addPythonPath)
+addEnvHooks "$hostOffset" addPythonPath
# Determinism: The interpreter is patched to write null timestamps when compiling python files.
# This way python doesn't try to update them when we freeze timestamps in nix store.
diff --git a/pkgs/development/interpreters/ruby/default.nix b/pkgs/development/interpreters/ruby/default.nix
index d664c00bc31d..478c2b45b26e 100644
--- a/pkgs/development/interpreters/ruby/default.nix
+++ b/pkgs/development/interpreters/ruby/default.nix
@@ -142,7 +142,7 @@ let
addToSearchPath GEM_PATH \$1/${passthru.gemPath}
}
- envHooks+=(addGemPath)
+ addEnvHooks "$hostOffset" addGemPath
EOF
'' + opString useRailsExpress ''
rbConfig=$(find $out/lib/ruby -name rbconfig.rb)
diff --git a/pkgs/development/libraries/SDL/setup-hook.sh b/pkgs/development/libraries/SDL/setup-hook.sh
index 3696e743a07a..20382f18f529 100644
--- a/pkgs/development/libraries/SDL/setup-hook.sh
+++ b/pkgs/development/libraries/SDL/setup-hook.sh
@@ -4,8 +4,4 @@ addSDLPath () {
fi
}
-if test -n "$crossConfig"; then
- crossEnvHooks+=(addSDLPath)
-else
- envHooks+=(addSDLPath)
-fi
+addEnvHooks "$hostOffset" addSDLPath
diff --git a/pkgs/development/libraries/SDL2/setup-hook.sh b/pkgs/development/libraries/SDL2/setup-hook.sh
index 5a26440f37b3..3acce9d473c5 100644
--- a/pkgs/development/libraries/SDL2/setup-hook.sh
+++ b/pkgs/development/libraries/SDL2/setup-hook.sh
@@ -4,8 +4,4 @@ addSDL2Path () {
fi
}
-if test -n "$crossConfig"; then
- crossEnvHooks+=(addSDL2Path)
-else
- envHooks+=(addSDL2Path)
-fi
+addEnvHooks "$hostOffset" addSDL2Path
diff --git a/pkgs/development/libraries/gdk-pixbuf/setup-hook.sh b/pkgs/development/libraries/gdk-pixbuf/setup-hook.sh
index ba7ab82f50b4..5a7dcd792996 100644
--- a/pkgs/development/libraries/gdk-pixbuf/setup-hook.sh
+++ b/pkgs/development/libraries/gdk-pixbuf/setup-hook.sh
@@ -14,4 +14,4 @@ findGdkPixbufLoaders() {
}
-envHooks+=(findGdkPixbufLoaders)
+addEnvHooks "$hostOffset" findGdkPixbufLoaders
diff --git a/pkgs/development/libraries/glib/setup-hook.sh b/pkgs/development/libraries/glib/setup-hook.sh
index c5cf293902cd..98341376fdf6 100644
--- a/pkgs/development/libraries/glib/setup-hook.sh
+++ b/pkgs/development/libraries/glib/setup-hook.sh
@@ -5,7 +5,7 @@ make_glib_find_gsettings_schemas() {
addToSearchPath GSETTINGS_SCHEMAS_PATH "$1/share/gsettings-schemas/"*
fi
}
-envHooks+=(make_glib_find_gsettings_schemas)
+addEnvHooks "$hostOffset" make_glib_find_gsettings_schemas
# Install gschemas, if any, in a package-specific directory
glibPreInstallPhase() {
diff --git a/pkgs/development/libraries/gobject-introspection/setup-hook.sh b/pkgs/development/libraries/gobject-introspection/setup-hook.sh
index 583d8475ec3b..6d3488a6622d 100644
--- a/pkgs/development/libraries/gobject-introspection/setup-hook.sh
+++ b/pkgs/development/libraries/gobject-introspection/setup-hook.sh
@@ -11,7 +11,7 @@ make_gobject_introspection_find_gir_files() {
fi
}
-envHooks+=(make_gobject_introspection_find_gir_files)
+addEnvHooks "$hostOffset" make_gobject_introspection_find_gir_files
_multioutMoveGlibGir() {
moveToOutput share/gir-1.0 "${!outputDev}"
diff --git a/pkgs/development/libraries/grantlee/5/setup-hook.sh b/pkgs/development/libraries/grantlee/5/setup-hook.sh
index aaa64868dc94..b51cb4a31909 100644
--- a/pkgs/development/libraries/grantlee/5/setup-hook.sh
+++ b/pkgs/development/libraries/grantlee/5/setup-hook.sh
@@ -10,8 +10,4 @@ _grantleeEnvHook() {
propagatedUserEnvPkgs+=" $1"
fi
}
-if [ "$crossEnv" ]; then
- crossEnvHooks+=(_grantleeEnvHook)
-else
- envHooks+=(_grantleeEnvHook)
-fi
+addEnvHooks "$hostOffset" _grantleeEnvHook
diff --git a/pkgs/development/libraries/gstreamer/core/setup-hook.sh b/pkgs/development/libraries/gstreamer/core/setup-hook.sh
index 3dd7812ece6d..b8c741af578f 100644
--- a/pkgs/development/libraries/gstreamer/core/setup-hook.sh
+++ b/pkgs/development/libraries/gstreamer/core/setup-hook.sh
@@ -5,5 +5,5 @@ addGstreamer1LibPath () {
fi
}
-envHooks+=(addGstreamer1LibPath)
+addEnvHooks "$hostOffset" addGstreamer1LibPath
diff --git a/pkgs/development/libraries/gstreamer/legacy/gstreamer/setup-hook.sh b/pkgs/development/libraries/gstreamer/legacy/gstreamer/setup-hook.sh
index e89aeda5bc1c..65ce26112519 100644
--- a/pkgs/development/libraries/gstreamer/legacy/gstreamer/setup-hook.sh
+++ b/pkgs/development/libraries/gstreamer/legacy/gstreamer/setup-hook.sh
@@ -5,4 +5,4 @@ addGstreamerLibPath () {
fi
}
-envHooks+=(addGstreamerLibPath)
+addEnvHooks "$hostOffset" addGstreamerLibPath
diff --git a/pkgs/development/libraries/kde-frameworks/extra-cmake-modules/setup-hook.sh b/pkgs/development/libraries/kde-frameworks/extra-cmake-modules/setup-hook.sh
index c1b1e21852cf..88091e78a0cd 100644
--- a/<