about summary refs log tree commit diff
path: root/pkgs/development/libraries/gobject-introspection
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2020-04-30 20:12:30 +0200
committerJan Tojnar <jtojnar@gmail.com>2020-04-30 20:12:30 +0200
commit8f7387f2195da33dd0886a7b7dbcae0518725542 (patch)
tree6822bb7d48323defc0d0f907ecbbdc352223aecc /pkgs/development/libraries/gobject-introspection
parent7c399a4ee080f33cc500a3fda33af6fccfd617bd (diff)
gobject-introspection: Ensure the giDiscoverSelf is run before gappsWrapperArgsHook
gappsWrapperArgsHook tries to collect GI_TYPELIB_PATH environment variable so if we want it to see the path giDiscoverSelf adds, we need to force the order.
Diffstat (limited to 'pkgs/development/libraries/gobject-introspection')
-rw-r--r--pkgs/development/libraries/gobject-introspection/setup-hook.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/development/libraries/gobject-introspection/setup-hook.sh b/pkgs/development/libraries/gobject-introspection/setup-hook.sh
index a68d544cfbe57..6bee47aeb096d 100644
--- a/pkgs/development/libraries/gobject-introspection/setup-hook.sh
+++ b/pkgs/development/libraries/gobject-introspection/setup-hook.sh
@@ -18,7 +18,14 @@ giDiscoverSelf() {
     fi
 }
 
-preFixupHooks+=(giDiscoverSelf)
+# gappsWrapperArgsHook expects GI_TYPELIB_PATH variable to be set by this.
+# Until we have dependency mechanism in generic builder, we need to use this ugly hack.
+if [[ " ${preFixupPhases:-} " =~ " gappsWrapperArgsHook " ]]; then
+    preFixupPhases+=" "
+    preFixupPhases="${preFixupPhases/ gappsWrapperArgsHook / giDiscoverSelf gappsWrapperArgsHook }"
+else
+    preFixupPhases+=" giDiscoverSelf"
+fi
 
 _multioutMoveGlibGir() {
   moveToOutput share/gir-1.0 "${!outputDev}"