1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/libraries/qt-5/5.8/qtdeclarative/nix-profiles-import-paths.patch
Thomas Tuegel cd7d8a60b4
qt58: init at 5.8.0
Qt 5.8 is now the default version.
2017-03-04 15:08:47 -06:00

21 lines
959 B
Diff

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()) {