summary refs log tree commit diff
path: root/nixos/modules/services/x11/desktop-managers/mate.nix
diff options
context:
space:
mode:
authorJosé Romildo Malaquias <malaquias@gmail.com>2018-01-04 14:04:57 -0200
committerTuomas Tynkkynen <tuomas.tynkkynen@iki.fi>2018-01-09 02:40:04 +0200
commitca27392d9cf1361874e4ff58437f8b84e151735a (patch)
treee6dc56b3fe909b50984bd175e3ba62233a89fc1d /nixos/modules/services/x11/desktop-managers/mate.nix
parent002fcfca351539442a997216e047a6f938f5efe9 (diff)
downloadnixpkgs-ca27392d9cf1361874e4ff58437f8b84e151735a.tar
nixpkgs-ca27392d9cf1361874e4ff58437f8b84e151735a.tar.gz
nixpkgs-ca27392d9cf1361874e4ff58437f8b84e151735a.tar.bz2
nixpkgs-ca27392d9cf1361874e4ff58437f8b84e151735a.tar.lz
nixpkgs-ca27392d9cf1361874e4ff58437f8b84e151735a.tar.xz
nixpkgs-ca27392d9cf1361874e4ff58437f8b84e151735a.tar.zst
nixpkgs-ca27392d9cf1361874e4ff58437f8b84e151735a.zip
mate-control-center: add gsettings schemas path to XDG vars
mate-control-center depends on mate-settings-daemon, but the later needs
gsettings schemas  provided by the former. To fix this the gsettings schema
path from mate-control-center is added to XDG_DATA_DIRS at session
startup.
Diffstat (limited to 'nixos/modules/services/x11/desktop-managers/mate.nix')
-rw-r--r--nixos/modules/services/x11/desktop-managers/mate.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/nixos/modules/services/x11/desktop-managers/mate.nix b/nixos/modules/services/x11/desktop-managers/mate.nix
index ffb2e123538..dc6658771e4 100644
--- a/nixos/modules/services/x11/desktop-managers/mate.nix
+++ b/nixos/modules/services/x11/desktop-managers/mate.nix
@@ -12,6 +12,17 @@ let
     in
       filter (x: !(builtins.elem (pkgName x) ysNames)) xs;
 
+  addToXDGDirs = p: ''
+    if [ -d "${p}/share/gsettings-schemas/${p.name}" ]; then
+      export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${p}/share/gsettings-schemas/${p.name}
+    fi
+
+    if [ -d "${p}/lib/girepository-1.0" ]; then
+      export GI_TYPELIB_PATH=$GI_TYPELIB_PATH''${GI_TYPELIB_PATH:+:}${p}/lib/girepository-1.0
+      export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${p}/lib
+    fi
+  '';
+
   xcfg = config.services.xserver;
   cfg = xcfg.desktopManager.mate;
 
@@ -56,6 +67,9 @@ in
         # Find the mouse
         export XCURSOR_PATH=~/.icons:${config.system.path}/share/icons
 
+        # Add mate-control-center paths to some XDG variables because its schemas are needed by mate-settings-daemon, and mate-settings-daemon is a dependency for mate-control-center (that is, they are mutually recursive)
+        ${addToXDGDirs pkgs.mate.mate-control-center}
+
         # Update user dirs as described in http://freedesktop.org/wiki/Software/xdg-user-dirs/
         ${pkgs.xdg-user-dirs}/bin/xdg-user-dirs-update