anvil-editor: init at 0.4
[NixPkgs.git] / pkgs / development / libraries / gobject-introspection / setup-hook.sh
blob50571a8f914d159c1656cf6d96e59a31bc28444b
1 make_gobject_introspection_find_gir_files() {
2 # required for .typelib files, eg mypaint git version
3 if [ -d "$1/lib/girepository-1.0" ]; then
4 addToSearchPath GI_TYPELIB_PATH $1/lib/girepository-1.0
5 fi
7 # XDG_DATA_DIRS: required for finding .gir files
8 if [ -d "$1/share/gir-1.0" ]; then
9 addToSearchPath XDG_DATA_DIRS $1/share
13 addEnvHooks "$targetOffset" make_gobject_introspection_find_gir_files
15 giDiscoverSelf() {
16 if [ -d "$prefix/lib/girepository-1.0" ]; then
17 addToSearchPath GI_TYPELIB_PATH $prefix/lib/girepository-1.0
21 # gappsWrapperArgsHook expects GI_TYPELIB_PATH variable to be set by this.
22 # Until we have dependency mechanism in generic builder, we need to use this ugly hack.
23 if [[ " ${preFixupPhases:-} " =~ " gappsWrapperArgsHook " ]]; then
24 preFixupPhases+=" "
25 preFixupPhases="${preFixupPhases/ gappsWrapperArgsHook / giDiscoverSelf gappsWrapperArgsHook }"
26 else
27 preFixupPhases+=" giDiscoverSelf"
30 _multioutMoveGlibGir() {
31 moveToOutput share/gir-1.0 "${!outputDev}"
34 preFixupHooks+=(_multioutMoveGlibGir)