summary refs log tree commit diff
path: root/pkgs/development/libraries/gobject-introspection/setup-hook.sh
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2013-09-11 08:37:03 +0200
committerVladimír Čunát <vcunat@gmail.com>2013-09-11 08:37:03 +0200
commitaa8e8303e1b42c5cf5195f3ce82f886664aa26d4 (patch)
treeaaca4e6d9683e0831cbc327ab5335ab5acd5a8dc /pkgs/development/libraries/gobject-introspection/setup-hook.sh
parentb728835bc129c4ef13ee7051e60e685c4b175439 (diff)
parentd55fb56690a7adc21eab7660d76fe4217860d914 (diff)
downloadnixlib-aa8e8303e1b42c5cf5195f3ce82f886664aa26d4.tar
nixlib-aa8e8303e1b42c5cf5195f3ce82f886664aa26d4.tar.gz
nixlib-aa8e8303e1b42c5cf5195f3ce82f886664aa26d4.tar.bz2
nixlib-aa8e8303e1b42c5cf5195f3ce82f886664aa26d4.tar.lz
nixlib-aa8e8303e1b42c5cf5195f3ce82f886664aa26d4.tar.xz
nixlib-aa8e8303e1b42c5cf5195f3ce82f886664aa26d4.tar.zst
nixlib-aa8e8303e1b42c5cf5195f3ce82f886664aa26d4.zip
Merge branch 'x-updates' into master
Diffstat (limited to 'pkgs/development/libraries/gobject-introspection/setup-hook.sh')
-rw-r--r--pkgs/development/libraries/gobject-introspection/setup-hook.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/pkgs/development/libraries/gobject-introspection/setup-hook.sh b/pkgs/development/libraries/gobject-introspection/setup-hook.sh
new file mode 100644
index 000000000000..d411ad69dc43
--- /dev/null
+++ b/pkgs/development/libraries/gobject-introspection/setup-hook.sh
@@ -0,0 +1,14 @@
+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)