about summary refs log tree commit diff
path: root/pkgs/development/libraries/qt-5
diff options
context:
space:
mode:
authorJamie <jamie@kwiius.com>2020-08-19 12:56:19 +1200
committerGitHub <noreply@github.com>2020-08-19 02:56:19 +0200
commit4cb53831410ab0212b99e4324488df67615b20dc (patch)
tree24fe5b348feec589d1d46123ef3c074b4abaac83 /pkgs/development/libraries/qt-5
parente5a097a8cdeb731d2a2ecf300a0e0609d8d5677b (diff)
qt: bring back QML import patch in 5.14 (#95772)
This was missed in the 5.12 -> 5.14 update process.

Resolves #95636
Diffstat (limited to 'pkgs/development/libraries/qt-5')
-rw-r--r--pkgs/development/libraries/qt-5/5.14/qtdeclarative.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/pkgs/development/libraries/qt-5/5.14/qtdeclarative.patch b/pkgs/development/libraries/qt-5/5.14/qtdeclarative.patch
index f2f4ee77354d3..8f5b5d4790fb1 100644
--- a/pkgs/development/libraries/qt-5/5.14/qtdeclarative.patch
+++ b/pkgs/development/libraries/qt-5/5.14/qtdeclarative.patch
@@ -1,3 +1,23 @@
+diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
+index 005db4248..685c5b1b2 100644
+--- a/src/qml/qml/qqmlimport.cpp
++++ b/src/qml/qml/qqmlimport.cpp
+@@ -1760,6 +1760,15 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e)
+     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 QString envImportPath = qEnvironmentVariable("QML2_IMPORT_PATH");
 diff --git a/tools/qmlcachegen/qmlcache.prf b/tools/qmlcachegen/qmlcache.prf
 index 537eaf62e..e21de58f6 100644
 --- a/tools/qmlcachegen/qmlcache.prf