qt55: set QML import paths from NIX_PROFILES
This commit is contained in:
parent
b1f904f69a
commit
fb375f1a2e
|
@ -73,7 +73,7 @@ let
|
||||||
/* qtandroidextras = not packaged */
|
/* qtandroidextras = not packaged */
|
||||||
/* qtcanvas3d = not packaged */
|
/* qtcanvas3d = not packaged */
|
||||||
qtconnectivity = callPackage ./qtconnectivity.nix {};
|
qtconnectivity = callPackage ./qtconnectivity.nix {};
|
||||||
qtdeclarative = callPackage ./qtdeclarative.nix {};
|
qtdeclarative = callPackage ./qtdeclarative {};
|
||||||
qtdoc = callPackage ./qtdoc.nix {};
|
qtdoc = callPackage ./qtdoc.nix {};
|
||||||
qtenginio = callPackage ./qtenginio.nix {};
|
qtenginio = callPackage ./qtenginio.nix {};
|
||||||
qtgraphicaleffects = callPackage ./qtgraphicaleffects.nix {};
|
qtgraphicaleffects = callPackage ./qtgraphicaleffects.nix {};
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
From 3f6fa74067aacd0e595e45b4ef7ce754514cb205 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Thomas Tuegel <ttuegel@gmail.com>
|
||||||
|
Date: Sat, 17 Oct 2015 09:28:18 -0500
|
||||||
|
Subject: [PATCH] nix profiles import paths
|
||||||
|
|
||||||
|
---
|
||||||
|
src/qml/qml/qqmlimport.cpp | 14 ++++++++++++++
|
||||||
|
1 file changed, 14 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
|
||||||
|
index 5a54609..f33c2f9 100644
|
||||||
|
--- a/src/qml/qml/qqmlimport.cpp
|
||||||
|
+++ b/src/qml/qml/qqmlimport.cpp
|
||||||
|
@@ -1549,6 +1549,20 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e)
|
||||||
|
QString installImportsPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath);
|
||||||
|
addImportPath(installImportsPath);
|
||||||
|
|
||||||
|
+ // Add import paths derived from NIX_PROFILES.
|
||||||
|
+ const QByteArray nixProfilesEnv = qgetenv("NIX_PROFILES");
|
||||||
|
+ if (!nixProfilesEnv.isEmpty()) {
|
||||||
|
+ QLatin1Char pathSep(' ');
|
||||||
|
+ QStringList paths = QFile::decodeName(nixProfilesEnv).split(pathSep, QString::SkipEmptyParts);
|
||||||
|
+ for (QStringList::iterator it = paths.begin(); it != paths.end(); ++it) {
|
||||||
|
+ it->append("/lib/qt5/qml");
|
||||||
|
+ QString canonicalPath = QDir(*it).canonicalPath();
|
||||||
|
+ if (!canonicalPath.isEmpty()) {
|
||||||
|
+ addImportPath(canonicalPath);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
// env import paths
|
||||||
|
QByteArray envImportPath = qgetenv("QML2_IMPORT_PATH");
|
||||||
|
if (!envImportPath.isEmpty()) {
|
||||||
|
--
|
||||||
|
2.5.2
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
qtSubmodule {
|
qtSubmodule {
|
||||||
name = "qtdeclarative";
|
name = "qtdeclarative";
|
||||||
|
patches = [ ./0001-nix-profiles-import-paths.patch ];
|
||||||
qtInputs = [ qtbase qtsvg qtxmlpatterns ];
|
qtInputs = [ qtbase qtsvg qtxmlpatterns ];
|
||||||
nativeBuildInputs = [ python ];
|
nativeBuildInputs = [ python ];
|
||||||
}
|
}
|
Loading…
Reference in New Issue