tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
qt55: set Qt Quick import paths from NIX_PROFILES
Thomas Tuegel
10 years ago
b1f904f6
a3855ef9
+39
-1
3 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
qt-5
5.5
default.nix
qtquick1
0001-nix-profiles-import-paths.patch
default.nix
+1
-1
pkgs/development/libraries/qt-5/5.5/default.nix
···
83
qtmultimedia = callPackage ./qtmultimedia.nix {
84
inherit (pkgs.gst_all_1) gstreamer gst-plugins-base;
85
};
86
-
qtquick1 = callPackage ./qtquick1.nix {};
87
qtquickcontrols = callPackage ./qtquickcontrols.nix {};
88
qtscript = callPackage ./qtscript {};
89
qtsensors = callPackage ./qtsensors.nix {};
···
83
qtmultimedia = callPackage ./qtmultimedia.nix {
84
inherit (pkgs.gst_all_1) gstreamer gst-plugins-base;
85
};
86
+
qtquick1 = callPackage ./qtquick1 {};
87
qtquickcontrols = callPackage ./qtquickcontrols.nix {};
88
qtscript = callPackage ./qtscript {};
89
qtsensors = callPackage ./qtsensors.nix {};
+1
pkgs/development/libraries/qt-5/5.5/qtquick1.nix
pkgs/development/libraries/qt-5/5.5/qtquick1/default.nix
···
2
3
qtSubmodule {
4
name = "qtquick1";
0
5
qtInputs = [ qtscript qtsvg qtwebkit qtxmlpatterns ];
6
}
···
2
3
qtSubmodule {
4
name = "qtquick1";
5
+
patches = [ ./0001-nix-profiles-import-paths.patch ];
6
qtInputs = [ qtscript qtsvg qtwebkit qtxmlpatterns ];
7
}
+37
pkgs/development/libraries/qt-5/5.5/qtquick1/0001-nix-profiles-import-paths.patch
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
From bbc706b3fcb90ca3b2b51d5e3434145572152711 Mon Sep 17 00:00:00 2001
2
+
From: Thomas Tuegel <ttuegel@gmail.com>
3
+
Date: Sat, 17 Oct 2015 09:29:51 -0500
4
+
Subject: [PATCH] nix profiles import paths
5
+
6
+
---
7
+
src/declarative/qml/qdeclarativeimport.cpp | 14 ++++++++++++++
8
+
1 file changed, 14 insertions(+)
9
+
10
+
diff --git a/src/declarative/qml/qdeclarativeimport.cpp b/src/declarative/qml/qdeclarativeimport.cpp
11
+
index 9404834..d185ed5 100644
12
+
--- a/src/declarative/qml/qdeclarativeimport.cpp
13
+
+++ b/src/declarative/qml/qdeclarativeimport.cpp
14
+
@@ -725,6 +725,20 @@ QDeclarativeImportDatabase::QDeclarativeImportDatabase(QDeclarativeEngine *e)
15
+
16
+
addImportPath(installImportsPath);
17
+
18
+
+ // Add import paths derived from NIX_PROFILES.
19
+
+ const QByteArray nixProfilesEnv = qgetenv("NIX_PROFILES");
20
+
+ if (!nixProfilesEnv.isEmpty()) {
21
+
+ QLatin1Char pathSep(' ');
22
+
+ QStringList paths = QFile::decodeName(nixProfilesEnv).split(pathSep, QString::SkipEmptyParts);
23
+
+ for (QStringList::iterator it = paths.begin(); it != paths.end(); ++it) {
24
+
+ it->append("/lib/qt5/imports");
25
+
+ QString canonicalPath = QDir(*it).canonicalPath();
26
+
+ if (!canonicalPath.isEmpty()) {
27
+
+ addImportPath(canonicalPath);
28
+
+ }
29
+
+ }
30
+
+ }
31
+
+
32
+
// env import paths
33
+
QByteArray envImportPath = qgetenv("QML_IMPORT_PATH");
34
+
if (!envImportPath.isEmpty()) {
35
+
--
36
+
2.5.2
37
+