diff options
author | Yegor Timoshenko <yegortimoshenko@gmail.com> | 2017-12-18 02:30:53 +0000 |
---|---|---|
committer | Yegor Timoshenko <yegortimoshenko@gmail.com> | 2017-12-30 02:57:37 +0000 |
commit | 0dff26daa4aa93397eaf1ef0407070efe9ecb8ad (patch) | |
tree | 6edff11c397827bd3e87b12442cfad4496be03e9 | |
parent | 61bb8115c5b3f0919883f86d21495b27d84041ff (diff) | |
download | nixlib-0dff26daa4aa93397eaf1ef0407070efe9ecb8ad.tar nixlib-0dff26daa4aa93397eaf1ef0407070efe9ecb8ad.tar.gz nixlib-0dff26daa4aa93397eaf1ef0407070efe9ecb8ad.tar.bz2 nixlib-0dff26daa4aa93397eaf1ef0407070efe9ecb8ad.tar.lz nixlib-0dff26daa4aa93397eaf1ef0407070efe9ecb8ad.tar.xz nixlib-0dff26daa4aa93397eaf1ef0407070efe9ecb8ad.tar.zst nixlib-0dff26daa4aa93397eaf1ef0407070efe9ecb8ad.zip |
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.
-rw-r--r-- | pkgs/development/libraries/gobject-introspection/setup-hook.sh | 10 |
1 files 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 583d8475ec3b..2aa08d1e8a52 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) - |