From 0dff26daa4aa93397eaf1ef0407070efe9ecb8ad Mon Sep 17 00:00:00 2001 From: Yegor Timoshenko Date: Mon, 18 Dec 2017 02:30:53 +0000 Subject: [PATCH] gobjectIntrospection: add giDiscoverSelf preFixupPhase hook Some derivations need to discover their own typelibs. giDiscoverSelf runs as a preFixupPhase and populates GI_TYPELIB_PATH with an entry pointing to $prefix/lib/girepository-1.0, if it exists. --- .../libraries/gobject-introspection/setup-hook.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gobject-introspection/setup-hook.sh b/pkgs/development/libraries/gobject-introspection/setup-hook.sh index 583d8475ec3..2aa08d1e8a5 100644 --- a/pkgs/development/libraries/gobject-introspection/setup-hook.sh +++ b/pkgs/development/libraries/gobject-introspection/setup-hook.sh @@ -1,5 +1,4 @@ make_gobject_introspection_find_gir_files() { - # required for .typelib files, eg mypaint git version if [ -d "$1/lib/girepository-1.0" ]; then addToSearchPath GI_TYPELIB_PATH $1/lib/girepository-1.0 @@ -13,9 +12,16 @@ make_gobject_introspection_find_gir_files() { envHooks+=(make_gobject_introspection_find_gir_files) +giDiscoverSelf() { + if [ -d "$prefix/lib/girepository-1.0" ]; then + addToSearchPath GI_TYPELIB_PATH $prefix/lib/girepository-1.0 + fi +} + +preFixupHooks+=(giDiscoverSelf) + _multioutMoveGlibGir() { moveToOutput share/gir-1.0 "${!outputDev}" } preFixupHooks+=(_multioutMoveGlibGir) -