aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0009-qtbase-qtpluginpath.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0009-qtbase-qtpluginpath.patch')
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0009-qtbase-qtpluginpath.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0009-qtbase-qtpluginpath.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0009-qtbase-qtpluginpath.patch
new file mode 100644
index 00000000000..28013ec1048
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.15/qtbase.patch.d/0009-qtbase-qtpluginpath.patch
@@ -0,0 +1,33 @@
+From 9fc6efaf774a8716932c98c0b0ea6408ed2614c2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Milan=20P=C3=A4ssler?= <me@pbb.lc>
+Date: Sun, 10 May 2020 12:47:28 +0200
+Subject: [PATCH 09/11] qtbase-qtpluginpath
+
+---
+ src/corelib/kernel/qcoreapplication.cpp | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
+index 5fdcc9b914..1a126ef359 100644
+--- a/src/corelib/kernel/qcoreapplication.cpp
++++ b/src/corelib/kernel/qcoreapplication.cpp
+@@ -2691,6 +2691,16 @@ QStringList QCoreApplication::libraryPathsLocked()
+ QStringList *app_libpaths = new QStringList;
+ coreappdata()->app_libpaths.reset(app_libpaths);
+
++ // Add library paths derived from PATH
++ const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(':');
++ const QString plugindir = QStringLiteral("../" NIXPKGS_QT_PLUGIN_PREFIX);
++ for (const QString &path: paths) {
++ if (!path.isEmpty()) {
++ app_libpaths->append(QDir::cleanPath(path + QDir::separator() + plugindir));
++ }
++ }
++
++
+ auto setPathsFromEnv = [&](QString libPathEnv) {
+ if (!libPathEnv.isEmpty()) {
+ QStringList paths = libPathEnv.split(QDir::listSeparator(), Qt::SkipEmptyParts);
+--
+2.25.4
+