From 770a4c7946a1c55bf6295a34a42e1c4b657d1088 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Tue, 5 Nov 2019 19:11:37 -0500 Subject: [PATCH] glib: Fix setup hook It was not robust against multiple matching directories, as the called function takes exactly 3 arguments. --- pkgs/development/libraries/glib/setup-hook.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/glib/setup-hook.sh b/pkgs/development/libraries/glib/setup-hook.sh index a1cb1f40c58a..20714ea7ab87 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