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