From 262f666092ea1c3cf3d2edca70e74b2efa434156 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Wed, 9 Dec 2020 10:23:20 -0600 Subject: kwindowsystem: update platform plugins path patch --- .../kwindowsystem/0001-platform-plugins-path.patch | 50 ++++++++++++++++++++++ .../kde-frameworks/kwindowsystem/default.nix | 2 +- .../kwindowsystem/platform-plugins-path.patch | 45 ------------------- 3 files changed, 51 insertions(+), 46 deletions(-) create mode 100644 pkgs/development/libraries/kde-frameworks/kwindowsystem/0001-platform-plugins-path.patch delete mode 100644 pkgs/development/libraries/kde-frameworks/kwindowsystem/platform-plugins-path.patch 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 +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 -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 - -- cgit 1.4.1