From 95b12bf0bedd1cd241ea2468464286dcc2a209bb Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Mon, 6 Oct 2014 08:31:47 -0500 Subject: [PATCH] kde-gtk-config: handle symlinked themes --- pkgs/tools/misc/kde-gtk-config/default.nix | 5 ++++- .../kde-gtk-config-follow-symlinks.patch | 13 +++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 pkgs/tools/misc/kde-gtk-config/kde-gtk-config-follow-symlinks.patch diff --git a/pkgs/tools/misc/kde-gtk-config/default.nix b/pkgs/tools/misc/kde-gtk-config/default.nix index 873d2adde7f9..88df0b6b5445 100644 --- a/pkgs/tools/misc/kde-gtk-config/default.nix +++ b/pkgs/tools/misc/kde-gtk-config/default.nix @@ -22,7 +22,10 @@ stdenv.mkDerivation { pkgconfig ]; - patches = [ ./kde-gtk-config-2.2.1-install-paths.patch ]; + patches = [ + ./kde-gtk-config-2.2.1-install-paths.patch + ./kde-gtk-config-follow-symlinks.patch + ]; cmakeFlags = '' -DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib}/lib/glib-2.0/include diff --git a/pkgs/tools/misc/kde-gtk-config/kde-gtk-config-follow-symlinks.patch b/pkgs/tools/misc/kde-gtk-config/kde-gtk-config-follow-symlinks.patch new file mode 100644 index 000000000000..e291589e82e3 --- /dev/null +++ b/pkgs/tools/misc/kde-gtk-config/kde-gtk-config-follow-symlinks.patch @@ -0,0 +1,13 @@ +diff --git a/src/appearancegtk2.cpp b/src/appearancegtk2.cpp +index 3d89c82..4dcce69 100644 +--- a/src/appearancegtk2.cpp ++++ b/src/appearancegtk2.cpp +@@ -56,7 +56,7 @@ QString AppearanceGTK2::themesGtkrcFile(const QString& themeName) const + QStringList themes=installedThemes(); + themes=themes.filter(QRegExp("/"+themeName+"/?$")); + if(themes.size()==1) { +- QDirIterator it(themes.first(), QDirIterator::Subdirectories); ++ QDirIterator it(themes.first(), QDirIterator::Subdirectories | QDirIterator::FollowSymlinks); + while(it.hasNext()) { + it.next(); + if(it.fileName()=="gtkrc") {