summary refs log tree commit diff
path: root/pkgs/development/libraries/qt-5/5.10/qtdeclarative.patch
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas@tuxera.com>2018-01-16 22:49:20 +0200
committerTuomas Tynkkynen <tuomas@tuxera.com>2018-01-16 22:49:20 +0200
commit2e56ba6fbdd70ed6b9244df816670b9a94da0824 (patch)
treed166c8c37aae3e2856378b4526cfddb66291466d /pkgs/development/libraries/qt-5/5.10/qtdeclarative.patch
parent782b63d06ba886d7093af764c2e3441a5e96ffc2 (diff)
parentcf8643cc8e61b0482c87faf33e6310c4e15bcba1 (diff)
downloadnixlib-2e56ba6fbdd70ed6b9244df816670b9a94da0824.tar
nixlib-2e56ba6fbdd70ed6b9244df816670b9a94da0824.tar.gz
nixlib-2e56ba6fbdd70ed6b9244df816670b9a94da0824.tar.bz2
nixlib-2e56ba6fbdd70ed6b9244df816670b9a94da0824.tar.lz
nixlib-2e56ba6fbdd70ed6b9244df816670b9a94da0824.tar.xz
nixlib-2e56ba6fbdd70ed6b9244df816670b9a94da0824.tar.zst
nixlib-2e56ba6fbdd70ed6b9244df816670b9a94da0824.zip
Merge remote-tracking branch 'upstream/master' into staging
Diffstat (limited to 'pkgs/development/libraries/qt-5/5.10/qtdeclarative.patch')
-rw-r--r--pkgs/development/libraries/qt-5/5.10/qtdeclarative.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/development/libraries/qt-5/5.10/qtdeclarative.patch b/pkgs/development/libraries/qt-5/5.10/qtdeclarative.patch
new file mode 100644
index 000000000000..01a975c14ec7
--- /dev/null
+++ b/pkgs/development/libraries/qt-5/5.10/qtdeclarative.patch
@@ -0,0 +1,33 @@
+diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
+index a7cafa1a9..e17ffd35b 100644
+--- a/src/qml/qml/qqmlimport.cpp
++++ b/src/qml/qml/qqmlimport.cpp
+@@ -1737,6 +1737,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 330da358b..cdf570205 100644
+--- a/tools/qmlcachegen/qmlcache.prf
++++ b/tools/qmlcachegen/qmlcache.prf
+@@ -44,7 +44,7 @@ defineReplace(qmlCacheOutputFileName) {
+ }
+ 
+ qmlcacheinst.base = $$QMLCACHE_DESTDIR
+-qmlcacheinst.path = $$[QT_INSTALL_QML]/$$TARGETPATH
++qmlcacheinst.path = $$NIX_OUTPUT_QML/$$TARGETPATH
+ qmlcacheinst.CONFIG = no_check_exist
+ 
+ qmlcachegen.input = CACHEGEN_FILES