2017-05-15 12:44:33 +01:00
|
|
|
Index: qtdeclarative-opensource-src-5.8.0/src/qml/qml/qqmlimport.cpp
|
2017-02-28 15:37:57 +00:00
|
|
|
===================================================================
|
2017-05-15 12:44:33 +01:00
|
|
|
--- 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
|
2017-02-28 15:37:57 +00:00
|
|
|
QString installImportsPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath);
|
|
|
|
addImportPath(installImportsPath);
|
|
|
|
|
|
|
|
+ // Add library paths derived from NIX_PROFILES.
|
2017-05-15 12:44:33 +01:00
|
|
|
+ const QStringList profiles = QFile::decodeName(qgetenv("NIX_PROFILES")).split(' ');
|
|
|
|
+ const QString qmldir = QStringLiteral(NIXPKGS_QML2_IMPORT_PREFIX);
|
|
|
|
+ for (const QString &profile: profiles) {
|
2017-02-28 15:37:57 +00:00
|
|
|
+ if (!profile.isEmpty()) {
|
2017-05-15 12:44:33 +01:00
|
|
|
+ addImportPath(profile + QDir::separator() + qmldir);
|
2017-02-28 15:37:57 +00:00
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
// env import paths
|
2017-05-15 12:44:33 +01:00
|
|
|
if (Q_UNLIKELY(!qEnvironmentVariableIsEmpty("QML2_IMPORT_PATH"))) {
|
|
|
|
const QByteArray envImportPath = qgetenv("QML2_IMPORT_PATH");
|