summary refs log tree commit diff
path: root/pkgs/development/libraries/qt-5/5.5
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@gmail.com>2016-04-15 06:57:06 -0500
committerThomas Tuegel <ttuegel@gmail.com>2016-04-20 10:01:06 -0500
commite0a87ce931e69f2775d99de12986f1e6b5ea70aa (patch)
treeb9dc0f04380543c268a5559d70239ca67935748a /pkgs/development/libraries/qt-5/5.5
parente6c91d586cd2ea5e5d3c7180fddd8e2992f1c2fa (diff)
qt55.qtdeclarative: get import paths from NIX_PROFILES
Diffstat (limited to 'pkgs/development/libraries/qt-5/5.5')
-rw-r--r--pkgs/development/libraries/qt-5/5.5/qtdeclarative/nix-profiles-import-paths.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/pkgs/development/libraries/qt-5/5.5/qtdeclarative/nix-profiles-import-paths.patch b/pkgs/development/libraries/qt-5/5.5/qtdeclarative/nix-profiles-import-paths.patch
index e69de29bb2d1d..06b244b974ffe 100644
--- a/pkgs/development/libraries/qt-5/5.5/qtdeclarative/nix-profiles-import-paths.patch
+++ b/pkgs/development/libraries/qt-5/5.5/qtdeclarative/nix-profiles-import-paths.patch
@@ -0,0 +1,20 @@
+Index: qtdeclarative-opensource-src-5.5.1/src/qml/qml/qqmlimport.cpp
+===================================================================
+--- qtdeclarative-opensource-src-5.5.1.orig/src/qml/qml/qqmlimport.cpp
++++ qtdeclarative-opensource-src-5.5.1/src/qml/qml/qqmlimport.cpp
+@@ -1549,6 +1549,15 @@ QQmlImportDatabase::QQmlImportDatabase(Q
+     QString installImportsPath =  QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath);
+     addImportPath(installImportsPath);
+ 
++    // Add library paths derived from NIX_PROFILES.
++    const QByteArrayList profiles = qgetenv("NIX_PROFILES").split(' ');
++    const QString qmldir = QString::fromLatin1("/lib/qt5/qml");
++    Q_FOREACH (const QByteArray &profile, profiles) {
++        if (!profile.isEmpty()) {
++            addImportPath(QFile::decodeName(profile) + qmldir);
++        }
++    }
++
+     // env import paths
+     QByteArray envImportPath = qgetenv("QML2_IMPORT_PATH");
+     if (!envImportPath.isEmpty()) {