about summary refs log tree commit diff
path: root/pkgs/development/libraries/glib/schema-override-variable.patch
blob: 84d3e93730a5958b698a38d92802f509b3374df0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/gio/gsettingsschema.c b/gio/gsettingsschema.c
index b1918657d..504ff97c4 100644
--- a/gio/gsettingsschema.c
+++ b/gio/gsettingsschema.c
@@ -356,6 +356,9 @@ initialise_schema_sources (void)
 
       try_prepend_data_dir (g_get_user_data_dir ());
 
+      if (!is_setuid && (path = g_getenv ("NIX_GSETTINGS_OVERRIDES_DIR")) != NULL)
+        try_prepend_dir (path);
+
       /* Disallow loading extra schemas if running as setuid, as that could
        * allow reading privileged files. */
       if (!is_setuid && (path = g_getenv ("GSETTINGS_SCHEMA_DIR")) != NULL)