diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/qt-6/patches/0010-qtbase-derive-plugin-load-path-from-PATH.patch')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/qt-6/patches/0010-qtbase-derive-plugin-load-path-from-PATH.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0010-qtbase-derive-plugin-load-path-from-PATH.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0010-qtbase-derive-plugin-load-path-from-PATH.patch new file mode 100644 index 000000000000..b950b7d4ac79 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0010-qtbase-derive-plugin-load-path-from-PATH.patch @@ -0,0 +1,29 @@ +From 0000000000000000000000000000000000000000 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] qtbase: derive plugin load path from PATH + +--- + src/corelib/kernel/qcoreapplication.cpp | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp +index 1ce2642cf2d..48fd91a0d7f 100644 +--- a/src/corelib/kernel/qcoreapplication.cpp ++++ b/src/corelib/kernel/qcoreapplication.cpp +@@ -3038,6 +3038,15 @@ QStringList QCoreApplication::libraryPathsLocked() + app_libpaths->append(installPathPlugins); + } + ++ // Add library paths derived from PATH ++ const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(QStringLiteral(":")); ++ 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)); ++ } ++ } ++ + // If QCoreApplication is not yet instantiated, + // make sure we add the application path when we construct the QCoreApplication + if (self) self->d_func()->appendApplicationPathToLibraryPaths(); |