depot/third_party/nixpkgs/pkgs/development/libraries/glib/schema-override-variable.patch
Default email bba55970ba Project import generated by Copybara.
GitOrigin-RevId: 3d1a7716d7f1fccbd7d30ab3b2ed3db831f43bde
2021-04-05 17:23:46 +02:00

14 lines
578 B
Diff

diff --git a/gio/gsettingsschema.c b/gio/gsettingsschema.c
index 1282c10a1..feadfe3aa 100644
--- a/gio/gsettingsschema.c
+++ b/gio/gsettingsschema.c
@@ -360,6 +360,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)