--- 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);