The attached patch adds the gtk+ glib GIO schemas to the xfce
XDG_DATA_DIRS environment variable.  Without it gtk+ programs for
example using the filepicker crash.
 
>From bbd3ee049b40b606eb55068a4cc3dbfcfe954b2a Mon Sep 17 00:00:00 2001
From: Karn Kallio <kkal...@skami.org>
Date: Mon, 13 Mar 2017 13:45:59 -0400
Subject: [PATCH] xfce : add gtk+ gsession schemas to environment
 XDG_DATA_DIRS.

---
 nixos/modules/services/x11/desktop-managers/xfce.nix | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/nixos/modules/services/x11/desktop-managers/xfce.nix b/nixos/modules/services/x11/desktop-managers/xfce.nix
index 9c42dc8781..68528a6358 100644
--- a/nixos/modules/services/x11/desktop-managers/xfce.nix
+++ b/nixos/modules/services/x11/desktop-managers/xfce.nix
@@ -73,6 +73,9 @@ in
             # Set GTK_DATA_PREFIX so that GTK+ can find the Xfce themes.
             export GTK_DATA_PREFIX=${config.system.path}
 
+            # Modify XDG_DATA_DIRS so GLib GIO can find GTK+ schemas.
+            export XDG_DATA_DIRS="$XDG_DATA_DIRS:$(ls -d ${config.system.path}/share/gsettings-schemas/gtk+3-*)"
+
             ${pkgs.stdenv.shell} ${pkgs.xfce.xinitrc} &
             waitPID=$!
           '';
@@ -82,6 +85,7 @@ in
 
     environment.systemPackages =
       [ pkgs.gtk2.out # To get GTK+'s themes and gtk-update-icon-cache
+        pkgs.gsettings_desktop_schemas
         pkgs.hicolor_icon_theme
         pkgs.tango-icon-theme
         pkgs.shared_mime_info
-- 
2.12.0

_______________________________________________
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to