diff options
Diffstat (limited to 'pkgs/development/libraries/qt-5/5.8/qtdeclarative/import-paths.patch')
-rw-r--r-- | pkgs/development/libraries/qt-5/5.8/qtdeclarative/import-paths.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pkgs/development/libraries/qt-5/5.8/qtdeclarative/import-paths.patch b/pkgs/development/libraries/qt-5/5.8/qtdeclarative/import-paths.patch new file mode 100644 index 000000000000..d50ee823a78b --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.8/qtdeclarative/import-paths.patch @@ -0,0 +1,20 @@ +Index: qtdeclarative-opensource-src-5.8.0/src/qml/qml/qqmlimport.cpp +=================================================================== +--- qtdeclarative-opensource-src-5.8.0.orig/src/qml/qml/qqmlimport.cpp ++++ qtdeclarative-opensource-src-5.8.0/src/qml/qml/qqmlimport.cpp +@@ -1630,6 +1630,15 @@ QQmlImportDatabase::QQmlImportDatabase(Q + QString installImportsPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath); + addImportPath(installImportsPath); + ++ // Add import paths derived from PATH ++ const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(':'); ++ const QString qmldir = QStringLiteral("../" NIXPKGS_QML2_IMPORT_PREFIX); ++ for (const QString &path: paths) { ++ if (!path.isEmpty()) { ++ addImportPath(QDir::cleanPath(path + QDir::separator() + qmldir)); ++ } ++ } ++ + // env import paths + if (Q_UNLIKELY(!qEnvironmentVariableIsEmpty("QML2_IMPORT_PATH"))) { + const QByteArray envImportPath = qgetenv("QML2_IMPORT_PATH"); |