summary refs log tree commit diff
path: root/pkgs/development/libraries/glib
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2019-11-05 19:11:37 -0500
committerJohn Ericson <John.Ericson@Obsidian.Systems>2019-11-08 13:24:18 -0500
commit770a4c7946a1c55bf6295a34a42e1c4b657d1088 (patch)
treeac2352e91d4fcb3ad29feb49abd53cf0661a4c42 /pkgs/development/libraries/glib
parent2c1d9d8bc1222abe8e597277eb1c3f1af2ac4423 (diff)
downloadnixpkgs-770a4c7946a1c55bf6295a34a42e1c4b657d1088.tar
nixpkgs-770a4c7946a1c55bf6295a34a42e1c4b657d1088.tar.gz
nixpkgs-770a4c7946a1c55bf6295a34a42e1c4b657d1088.tar.bz2
nixpkgs-770a4c7946a1c55bf6295a34a42e1c4b657d1088.tar.lz
nixpkgs-770a4c7946a1c55bf6295a34a42e1c4b657d1088.tar.xz
nixpkgs-770a4c7946a1c55bf6295a34a42e1c4b657d1088.tar.zst
nixpkgs-770a4c7946a1c55bf6295a34a42e1c4b657d1088.zip
glib: Fix setup hook
It was not robust against multiple matching directories, as the called
function takes exactly 3 arguments.
Diffstat (limited to 'pkgs/development/libraries/glib')
-rw-r--r--pkgs/development/libraries/glib/setup-hook.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/development/libraries/glib/setup-hook.sh b/pkgs/development/libraries/glib/setup-hook.sh
index a1cb1f40c58..20714ea7ab8 100644
--- a/pkgs/development/libraries/glib/setup-hook.sh
+++ b/pkgs/development/libraries/glib/setup-hook.sh
@@ -1,9 +1,11 @@
 
 make_glib_find_gsettings_schemas() {
     # For packages that need gschemas of other packages (e.g. empathy)
-    if [ -d "$1"/share/gsettings-schemas/*/glib-2.0/schemas ]; then
-        addToSearchPath GSETTINGS_SCHEMAS_PATH "$1/share/gsettings-schemas/"*
-    fi
+    for maybe_dir in "$1"/share/gsettings-schemas/*/glib-2.0; do
+        if [[ -d "$maybe_dir/schemas" ]]; then
+            addToSearchPath GSETTINGS_SCHEMAS_PATH "$maybe_dir"
+        fi
+    done
 }
 addEnvHooks "$hostOffset" make_glib_find_gsettings_schemas