about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0009-qtbase-qtpluginpath.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0009-qtbase-qtpluginpath.patch')
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0009-qtbase-qtpluginpath.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0009-qtbase-qtpluginpath.patch b/nixpkgs/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0009-qtbase-qtpluginpath.patch
new file mode 100644
index 000000000000..009fe14838e7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-5/5.14/qtbase.patch.d/0009-qtbase-qtpluginpath.patch
@@ -0,0 +1,19 @@
+--- qtbase-everywhere-src-5.14.2/src/corelib/kernel/qcoreapplication.cpp	2020-03-27 10:49:31.000000000 +0100
++++ qtbase-everywhere-src-5.14.2/src/corelib/kernel/qcoreapplication.cpp.patched	2020-05-09 15:03:03.968084088 +0200
+@@ -2691,6 +2691,16 @@
+         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(), QString::SkipEmptyParts);