qt55: set Qt Quick import paths from NIX_PROFILES
This commit is contained in:
parent
a3855ef9ae
commit
b1f904f69a
|
@ -83,7 +83,7 @@ let
|
|||
qtmultimedia = callPackage ./qtmultimedia.nix {
|
||||
inherit (pkgs.gst_all_1) gstreamer gst-plugins-base;
|
||||
};
|
||||
qtquick1 = callPackage ./qtquick1.nix {};
|
||||
qtquick1 = callPackage ./qtquick1 {};
|
||||
qtquickcontrols = callPackage ./qtquickcontrols.nix {};
|
||||
qtscript = callPackage ./qtscript {};
|
||||
qtsensors = callPackage ./qtsensors.nix {};
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
From bbc706b3fcb90ca3b2b51d5e3434145572152711 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Tuegel <ttuegel@gmail.com>
|
||||
Date: Sat, 17 Oct 2015 09:29:51 -0500
|
||||
Subject: [PATCH] nix profiles import paths
|
||||
|
||||
---
|
||||
src/declarative/qml/qdeclarativeimport.cpp | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/src/declarative/qml/qdeclarativeimport.cpp b/src/declarative/qml/qdeclarativeimport.cpp
|
||||
index 9404834..d185ed5 100644
|
||||
--- a/src/declarative/qml/qdeclarativeimport.cpp
|
||||
+++ b/src/declarative/qml/qdeclarativeimport.cpp
|
||||
@@ -725,6 +725,20 @@ QDeclarativeImportDatabase::QDeclarativeImportDatabase(QDeclarativeEngine *e)
|
||||
|
||||
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/imports");
|
||||
+ QString canonicalPath = QDir(*it).canonicalPath();
|
||||
+ if (!canonicalPath.isEmpty()) {
|
||||
+ addImportPath(canonicalPath);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
// env import paths
|
||||
QByteArray envImportPath = qgetenv("QML_IMPORT_PATH");
|
||||
if (!envImportPath.isEmpty()) {
|
||||
--
|
||||
2.5.2
|
||||
|
|
@ -2,5 +2,6 @@
|
|||
|
||||
qtSubmodule {
|
||||
name = "qtquick1";
|
||||
patches = [ ./0001-nix-profiles-import-paths.patch ];
|
||||
qtInputs = [ qtscript qtsvg qtwebkit qtxmlpatterns ];
|
||||
}
|
Loading…
Reference in New Issue