forked from mirrors/nixpkgs
0dff26daa4
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.
28 lines
698 B
Bash
28 lines
698 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
|
|
}
|
|
|
|
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)
|