From 8f7387f2195da33dd0886a7b7dbcae0518725542 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 30 Apr 2020 20:12:30 +0200 Subject: [PATCH] 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. --- .../libraries/gobject-introspection/setup-hook.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/gobject-introspection/setup-hook.sh b/pkgs/development/libraries/gobject-introspection/setup-hook.sh index a68d544cfbe5..6bee47aeb096 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}"