nixpkgs/pkgs/development/libraries/gobject-introspection/setup-hook.sh
Yegor Timoshenko d3e821156e
Merge pull request #31094 from yegortimoshenko/ibus/update
ibus: 1.5.16 -> 1.5.17, fix
2017-12-31 21:23:05 +03:00

28 lines
712 B
Bash

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
fi
# XDG_DATA_DIRS: required for .gir files?
if [ -d "$1/share" ]; then
addToSearchPath XDG_DATA_DIRS $1/share
fi
}
addEnvHooks "$hostOffset" 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)