mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-19 02:44:17 +03:00
glib: recognize NIX_GSETTINGS_OVERRIDES_DIR variable
For some reason, the GNOME 3.26 update broke the overrides. It turns out the overrides now need to come before the overriden schemas in the XDG_DATA_DIRS variable. This is not possible in general due to applications prefixing the variable (e.g. in wrapGAppsHook). To fix this, a new environment variable NIX_GSETTINGS_OVERRIDES_DIR was introduced. It has greater priority than XDG_DATA_DIRS but lower than GSETTINGS_SCHEMA_DIR. A separate variable was chosen in order not to block the built-in one for users.
This commit is contained in:
parent
6e686ff36d
commit
1f79b943c0
@ -55,7 +55,8 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
patches = optional stdenv.isDarwin ./darwin-compilation.patch
|
||||
++ optional doCheck ./skip-timer-test.patch;
|
||||
++ optional doCheck ./skip-timer-test.patch
|
||||
++ [ ./schema-override-variable.patch ];
|
||||
|
||||
outputs = [ "out" "dev" "devdoc" ];
|
||||
outputBin = "dev";
|
||||
|
@ -0,0 +1,12 @@
|
||||
--- a/gio/gsettingsschema.c
|
||||
+++ b/gio/gsettingsschema.c
|
||||
@@ -352,6 +352,9 @@
|
||||
|
||||
try_prepend_data_dir (g_get_user_data_dir ());
|
||||
|
||||
+ if ((path = g_getenv ("NIX_GSETTINGS_OVERRIDES_DIR")) != NULL)
|
||||
+ try_prepend_dir (path);
|
||||
+
|
||||
if ((path = g_getenv ("GSETTINGS_SCHEMA_DIR")) != NULL)
|
||||
try_prepend_dir (path);
|
||||
|
Loading…
Reference in New Issue
Block a user