2018-01-01 21:50:26 +01:00
|
|
|
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
|
2018-01-02 14:16:38 +01:00
|
|
|
index a7cafa1a9..e17ffd35b 100644
|
2018-01-01 21:50:26 +01:00
|
|
|
--- a/src/qml/qml/qqmlimport.cpp
|
|
|
|
+++ b/src/qml/qml/qqmlimport.cpp
|
2018-01-02 14:16:38 +01:00
|
|
|
@@ -1737,6 +1737,15 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e)
|
2018-01-01 21:50:26 +01:00
|
|
|
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"))) {
|
2018-01-02 14:16:38 +01:00
|
|
|
const QString envImportPath = qEnvironmentVariable("QML2_IMPORT_PATH");
|
2018-01-01 21:50:26 +01:00
|
|
|
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
|