summary refs log tree commit diff
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@mailbox.org>2020-12-09 10:23:20 -0600
committerThomas Tuegel <ttuegel@mailbox.org>2020-12-12 16:07:18 -0600
commit262f666092ea1c3cf3d2edca70e74b2efa434156 (patch)
tree9409de08f3453c77ddd0dd33e77eebda5e38f903
parent473fb9246a9b1982a67b8feadacf2f57496bfa9b (diff)
downloadnixpkgs-262f666092ea1c3cf3d2edca70e74b2efa434156.tar
nixpkgs-262f666092ea1c3cf3d2edca70e74b2efa434156.tar.gz
nixpkgs-262f666092ea1c3cf3d2edca70e74b2efa434156.tar.bz2
nixpkgs-262f666092ea1c3cf3d2edca70e74b2efa434156.tar.lz
nixpkgs-262f666092ea1c3cf3d2edca70e74b2efa434156.tar.xz
nixpkgs-262f666092ea1c3cf3d2edca70e74b2efa434156.tar.zst
nixpkgs-262f666092ea1c3cf3d2edca70e74b2efa434156.zip
kwindowsystem: update platform plugins path patch
-rw-r--r--pkgs/development/libraries/kde-frameworks/kwindowsystem/0001-platform-plugins-path.patch50
-rw-r--r--pkgs/development/libraries/kde-frameworks/kwindowsystem/default.nix2
-rw-r--r--pkgs/development/libraries/kde-frameworks/kwindowsystem/platform-plugins-path.patch45
3 files changed, 51 insertions, 46 deletions
diff --git a/pkgs/development/libraries/kde-frameworks/kwindowsystem/0001-platform-plugins-path.patch b/pkgs/development/libraries/kde-frameworks/kwindowsystem/0001-platform-plugins-path.patch
new file mode 100644
index 00000000000..609376e33e4
--- /dev/null
+++ b/pkgs/development/libraries/kde-frameworks/kwindowsystem/0001-platform-plugins-path.patch
@@ -0,0 +1,50 @@
+From 291f691400d4e85c57b57ec75482d2c6078ce26e Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@mailbox.org>
+Date: Wed, 9 Dec 2020 10:01:59 -0600
+Subject: [PATCH] platform plugins path
+
+---
+ src/pluginwrapper.cpp | 27 +++++++++++++--------------
+ 1 file changed, 13 insertions(+), 14 deletions(-)
+
+diff --git a/src/pluginwrapper.cpp b/src/pluginwrapper.cpp
+index a255d83..9699b08 100644
+--- a/src/pluginwrapper.cpp
++++ b/src/pluginwrapper.cpp
+@@ -25,20 +25,19 @@ static QStringList pluginCandidates()
+ {
+     QStringList ret;
+     const auto paths = QCoreApplication::libraryPaths();
+-    for (const QString &path : paths) {
+-        static const QStringList searchFolders {
+-            QStringLiteral("/kf5/org.kde.kwindowsystem.platforms"),
+-            QStringLiteral("/kf5/kwindowsystem"),
+-        };
+-        for (const QString &searchFolder : searchFolders) {
+-            QDir pluginDir(path + searchFolder);
+-            if (!pluginDir.exists()) {
+-                continue;
+-            }
+-            const auto entries = pluginDir.entryList(QDir::Files | QDir::NoDotAndDotDot);
+-            for (const QString &entry : entries) {
+-                ret << pluginDir.absoluteFilePath(entry);
+-            }
++    const QString path = QStringLiteral(NIXPKGS_QT_PLUGIN_PATH);
++    static const QStringList searchFolders {
++        QStringLiteral("/kf5/org.kde.kwindowsystem.platforms"),
++        QStringLiteral("/kf5/kwindowsystem"),
++    };
++    for (const QString &searchFolder : searchFolders) {
++        QDir pluginDir(path + searchFolder);
++        if (!pluginDir.exists()) {
++            continue;
++        }
++        const auto entries = pluginDir.entryList(QDir::Files | QDir::NoDotAndDotDot);
++        for (const QString &entry : entries) {
++            ret << pluginDir.absoluteFilePath(entry);
+         }
+     }
+     return ret;
+-- 
+2.28.0
+
diff --git a/pkgs/development/libraries/kde-frameworks/kwindowsystem/default.nix b/pkgs/development/libraries/kde-frameworks/kwindowsystem/default.nix
index 1e77b63f7c9..783d83bf960 100644
--- a/pkgs/development/libraries/kde-frameworks/kwindowsystem/default.nix
+++ b/pkgs/development/libraries/kde-frameworks/kwindowsystem/default.nix
@@ -15,7 +15,7 @@ mkDerivation {
   buildInputs = [ libpthreadstubs libXdmcp qttools qtx11extras ];
   propagatedBuildInputs = [ qtbase ];
   patches = [
-    ./platform-plugins-path.patch
+    ./0001-platform-plugins-path.patch
   ];
   preConfigure = ''
     NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QT_PLUGIN_PATH=\"''${!outputBin}/$qtPluginPrefix\""
diff --git a/pkgs/development/libraries/kde-frameworks/kwindowsystem/platform-plugins-path.patch b/pkgs/development/libraries/kde-frameworks/kwindowsystem/platform-plugins-path.patch
deleted file mode 100644
index 9a00f7e9452..00000000000
--- a/pkgs/development/libraries/kde-frameworks/kwindowsystem/platform-plugins-path.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 5d73d02656298d0af860c8ed7f6be679e3d69e09 Mon Sep 17 00:00:00 2001
-From: Tom Hall <tahall256@protonmail.ch>
-Date: Tue, 24 Nov 2020 19:31:20 +0000
-Subject: [PATCH] Fix platform plugins path
-
----
- src/pluginwrapper.cpp | 22 ++++++----------------
- 1 file changed, 6 insertions(+), 16 deletions(-)
-
-diff --git a/src/pluginwrapper.cpp b/src/pluginwrapper.cpp
-index a255d83..8f4caac 100644
---- a/src/pluginwrapper.cpp
-+++ b/src/pluginwrapper.cpp
-@@ -24,22 +24,12 @@ Q_GLOBAL_STATIC(KWindowSystemPluginWrapper, s_pluginWrapper)
- static QStringList pluginCandidates()
- {
-     QStringList ret;
--    const auto paths = QCoreApplication::libraryPaths();
--    for (const QString &path : paths) {
--        static const QStringList searchFolders {
--            QStringLiteral("/kf5/org.kde.kwindowsystem.platforms"),
--            QStringLiteral("/kf5/kwindowsystem"),
--        };
--        for (const QString &searchFolder : searchFolders) {
--            QDir pluginDir(path + searchFolder);
--            if (!pluginDir.exists()) {
--                continue;
--            }
--            const auto entries = pluginDir.entryList(QDir::Files | QDir::NoDotAndDotDot);
--            for (const QString &entry : entries) {
--                ret << pluginDir.absoluteFilePath(entry);
--            }
--        }
-+    QDir pluginDir(QLatin1String(NIXPKGS_QT_PLUGIN_PATH)
-+            + QLatin1Literal("/kf5/org.kde.kwindowsystem.platforms")
-+            + QLatin1Literal("/kf5/kwindowsystem"));
-+    const auto entries = pluginDir.entryList(QDir::Files | QDir::NoDotAndDotDot);
-+    for (const QString &entry : entries) {
-+        ret << pluginDir.absoluteFilePath(entry);
-     }
-     return ret;
- }
--- 
-2.28.0
-