From a9f599154a9f37dee8d2853915b7a82de57a9ecd Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sun, 24 Jul 2011 22:07:58 +0000 Subject: [PATCH] =?UTF-8?q?*=20Remove=20stupid=20=E2=80=98libraryPath?= =?UTF-8?q?=E2=80=99=20entries=20from=20~/.config/Trolltech.conf=20=20=20t?= =?UTF-8?q?hat=20can=20randomly=20cause=20KDE=20to=20fail.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn path=/nixos/trunk/; revision=27925 --- modules/services/x11/desktop-managers/kde4.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/services/x11/desktop-managers/kde4.nix b/modules/services/x11/desktop-managers/kde4.nix index 68a3ea79413..439e8846947 100644 --- a/modules/services/x11/desktop-managers/kde4.nix +++ b/modules/services/x11/desktop-managers/kde4.nix @@ -21,7 +21,7 @@ in environment.kdePackages = mkOption { default = []; - example = [ pkgs.kde4.kdesdk ]; + example = "[ pkgs.kde4.kdesdk ]"; type = types.list types.package; description = "This option is obsolete. Please use instead."; }; @@ -52,6 +52,17 @@ in # See http://lists-archives.org/kde-devel/26175-what-when-will-icon-cache-refresh.html rm -fv $HOME/.kde/cache-*/icon-cache.kcache + # Qt writes a weird ‘libraryPath’ line to + # ~/.config/Trolltech.conf that causes the KDE plugin + # paths of previous KDE invocations to be searched. + # Obviously using mismatching KDE libraries is potentially + # disastrous, so here we nuke references to the Nix store + # in Trolltech.conf. A better solution would be to stop + # Qt from doing this wackiness in the first place. + if [ -e $HOME/.config/Trolltech.conf ]; then + sed -e '/nix\\store\|nix\/store/ d' -i $HOME/.config/Trolltech.conf + fi + # Start KDE. exec ${pkgs.kde4.kdebase_workspace}/bin/startkde ''; @@ -110,6 +121,7 @@ in pkgs.shared_mime_info xorg.xmessage # so that startkde can show error messages xorg.xset # used by startkde, non-essential + xorg.xauth # used by kdesu ] ) ++ config.environment.kdePackages;