mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
b766ec29a7
The setup hook was adding share directory to XDG_DATA_DIRS variable whenever it existed, even when gir-1.0 subdirectory did not.
28 lines
727 B
Bash
28 lines
727 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 finding .gir files
|
|
if [ -d "$1/share/gir-1.0" ]; 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)
|