tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
Merge branch 'qt--qpa-plugin-path'
Thomas Tuegel
8 years ago
fabd4827
8a68e4c7
+133
-17
9 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
qt-5
5.6
qtbase
default.nix
nix-profiles-library-paths.patch
qpa-platform-plugin-path.patch
series
5.8
qtbase
default.nix
nix-profiles-library-paths.patch
qpa-platform-plugin-path.patch
qpa-plugin-path.patch
series
+2
pkgs/development/libraries/qt-5/5.6/qtbase/default.nix
···
104
-importdir $out/lib/qt5/imports \
105
-qmldir $out/lib/qt5/qml \
106
-docdir $out/share/doc/qt5"
0
0
107
'';
108
109
prefixKey = "-prefix ";
···
104
-importdir $out/lib/qt5/imports \
105
-qmldir $out/lib/qt5/qml \
106
-docdir $out/share/doc/qt5"
107
+
108
+
NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QPA_PLATFORM_PLUGIN_PATH=\"''${!outputLib}/lib/qt5/plugins/platforms\""
109
'';
110
111
prefixKey = "-prefix ";
+20
pkgs/development/libraries/qt-5/5.6/qtbase/nix-profiles-library-paths.patch
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
Index: qtbase-opensource-src-5.6.2/src/corelib/kernel/qcoreapplication.cpp
2
+
===================================================================
3
+
--- qtbase-opensource-src-5.6.2.orig/src/corelib/kernel/qcoreapplication.cpp
4
+
+++ qtbase-opensource-src-5.6.2/src/corelib/kernel/qcoreapplication.cpp
5
+
@@ -2533,6 +2533,15 @@ QStringList QCoreApplication::libraryPat
6
+
QStringList *app_libpaths = new QStringList;
7
+
coreappdata()->app_libpaths.reset(app_libpaths);
8
+
9
+
+ // Add library paths derived from NIX_PROFILES.
10
+
+ const QByteArrayList profiles = qgetenv("NIX_PROFILES").split(' ');
11
+
+ const QString plugindir = QString::fromLatin1("/lib/qt5/plugins");
12
+
+ for (const QByteArray &profile: profiles) {
13
+
+ if (!profile.isEmpty()) {
14
+
+ app_libpaths->append(QFile::decodeName(profile) + plugindir);
15
+
+ }
16
+
+ }
17
+
+
18
+
const QByteArray libPathEnv = qgetenv("QT_PLUGIN_PATH");
19
+
if (!libPathEnv.isEmpty()) {
20
+
QStringList paths = QFile::decodeName(libPathEnv).split(QDir::listSeparator(), QString::SkipEmptyParts);
+43
pkgs/development/libraries/qt-5/5.6/qtbase/qpa-platform-plugin-path.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
0
0
0
0
0
0
···
1
+
Index: qtbase-opensource-src-5.6.2/src/gui/kernel/qplatformintegrationfactory.cpp
2
+
===================================================================
3
+
--- qtbase-opensource-src-5.6.2.orig/src/gui/kernel/qplatformintegrationfactory.cpp
4
+
+++ qtbase-opensource-src-5.6.2/src/gui/kernel/qplatformintegrationfactory.cpp
5
+
@@ -67,9 +67,10 @@ QPlatformIntegration *QPlatformIntegrati
6
+
// Try loading the plugin from platformPluginPath first:
7
+
if (!platformPluginPath.isEmpty()) {
8
+
QCoreApplication::addLibraryPath(platformPluginPath);
9
+
- if (QPlatformIntegration *ret = loadIntegration(directLoader(), platform, paramList, argc, argv))
10
+
- return ret;
11
+
}
12
+
+ QCoreApplication::addLibraryPath(QStringLiteral(NIXPKGS_QPA_PLATFORM_PLUGIN_PATH));
13
+
+ if (QPlatformIntegration *ret = loadIntegration(directLoader(), platform, paramList, argc, argv))
14
+
+ return ret;
15
+
if (QPlatformIntegration *ret = loadIntegration(loader(), platform, paramList, argc, argv))
16
+
return ret;
17
+
#else
18
+
@@ -95,15 +96,16 @@ QStringList QPlatformIntegrationFactory:
19
+
QStringList list;
20
+
if (!platformPluginPath.isEmpty()) {
21
+
QCoreApplication::addLibraryPath(platformPluginPath);
22
+
- list = directLoader()->keyMap().values();
23
+
- if (!list.isEmpty()) {
24
+
- const QString postFix = QStringLiteral(" (from ")
25
+
- + QDir::toNativeSeparators(platformPluginPath)
26
+
- + QLatin1Char(')');
27
+
- const QStringList::iterator end = list.end();
28
+
- for (QStringList::iterator it = list.begin(); it != end; ++it)
29
+
- (*it).append(postFix);
30
+
- }
31
+
+ }
32
+
+ QCoreApplication::addLibraryPath(QStringLiteral(NIXPKGS_QPA_PLATFORM_PLUGIN_PATH));
33
+
+ list = directLoader()->keyMap().values();
34
+
+ if (!list.isEmpty()) {
35
+
+ const QString postFix = QStringLiteral(" (from ")
36
+
+ + QDir::toNativeSeparators(platformPluginPath)
37
+
+ + QLatin1Char(')');
38
+
+ const QStringList::iterator end = list.end();
39
+
+ for (QStringList::iterator it = list.begin(); it != end; ++it)
40
+
+ (*it).append(postFix);
41
+
}
42
+
list.append(loader()->keyMap().values());
43
+
return list;
+2
pkgs/development/libraries/qt-5/5.6/qtbase/series
···
4
dlopen-openssl.patch
5
dlopen-dbus.patch
6
xdg-config-dirs.patch
0
7
compose-search-path.patch
8
libressl.patch
0
···
4
dlopen-openssl.patch
5
dlopen-dbus.patch
6
xdg-config-dirs.patch
7
+
nix-profiles-library-paths.patch
8
compose-search-path.patch
9
libressl.patch
10
+
qpa-platform-plugin-path.patch
+1
-1
pkgs/development/libraries/qt-5/5.8/qtbase/default.nix
···
128
-qmldir $out/lib/qt5/qml \
129
-docdir $out/share/doc/qt5"
130
131
-
NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QPA_PLATFORM_PLUGIN_PATH=\"''${!outputLib}/lib/qt5/plugins\""
132
'';
133
134
···
128
-qmldir $out/lib/qt5/qml \
129
-docdir $out/share/doc/qt5"
130
131
+
NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QPA_PLATFORM_PLUGIN_PATH=\"''${!outputLib}/lib/qt5/plugins/platforms\""
132
'';
133
134
+20
pkgs/development/libraries/qt-5/5.8/qtbase/nix-profiles-library-paths.patch
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
Index: qtbase-opensource-src-5.8.0/src/corelib/kernel/qcoreapplication.cpp
2
+
===================================================================
3
+
--- qtbase-opensource-src-5.8.0.orig/src/corelib/kernel/qcoreapplication.cpp
4
+
+++ qtbase-opensource-src-5.8.0/src/corelib/kernel/qcoreapplication.cpp
5
+
@@ -2476,6 +2476,15 @@ QStringList QCoreApplication::libraryPat
6
+
QStringList *app_libpaths = new QStringList;
7
+
coreappdata()->app_libpaths.reset(app_libpaths);
8
+
9
+
+ // Add library paths derived from NIX_PROFILES.
10
+
+ const QByteArrayList profiles = qgetenv("NIX_PROFILES").split(' ');
11
+
+ const QString plugindir = QString::fromLatin1("/lib/qt5/plugins");
12
+
+ for (const QByteArray &profile: profiles) {
13
+
+ if (!profile.isEmpty()) {
14
+
+ app_libpaths->append(QFile::decodeName(profile) + plugindir);
15
+
+ }
16
+
+ }
17
+
+
18
+
const QByteArray libPathEnv = qgetenv("QT_PLUGIN_PATH");
19
+
if (!libPathEnv.isEmpty()) {
20
+
QStringList paths = QFile::decodeName(libPathEnv).split(QDir::listSeparator(), QString::SkipEmptyParts);
+43
pkgs/development/libraries/qt-5/5.8/qtbase/qpa-platform-plugin-path.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
0
0
0
0
0
0
···
1
+
Index: qtbase-opensource-src-5.8.0/src/gui/kernel/qplatformintegrationfactory.cpp
2
+
===================================================================
3
+
--- qtbase-opensource-src-5.8.0.orig/src/gui/kernel/qplatformintegrationfactory.cpp
4
+
+++ qtbase-opensource-src-5.8.0/src/gui/kernel/qplatformintegrationfactory.cpp
5
+
@@ -62,9 +62,10 @@ QPlatformIntegration *QPlatformIntegrati
6
+
// Try loading the plugin from platformPluginPath first:
7
+
if (!platformPluginPath.isEmpty()) {
8
+
QCoreApplication::addLibraryPath(platformPluginPath);
9
+
- if (QPlatformIntegration *ret = qLoadPlugin<QPlatformIntegration, QPlatformIntegrationPlugin>(directLoader(), platform, paramList, argc, argv))
10
+
- return ret;
11
+
}
12
+
+ QCoreApplication::addLibraryPath(QStringLiteral(NIXPKGS_QPA_PLATFORM_PLUGIN_PATH));
13
+
+ if (QPlatformIntegration *ret = qLoadPlugin<QPlatformIntegration, QPlatformIntegrationPlugin>(directLoader(), platform, paramList, argc, argv))
14
+
+ return ret;
15
+
#else
16
+
Q_UNUSED(platformPluginPath);
17
+
#endif
18
+
@@ -84,15 +85,16 @@ QStringList QPlatformIntegrationFactory:
19
+
#ifndef QT_NO_LIBRARY
20
+
if (!platformPluginPath.isEmpty()) {
21
+
QCoreApplication::addLibraryPath(platformPluginPath);
22
+
- list = directLoader()->keyMap().values();
23
+
- if (!list.isEmpty()) {
24
+
- const QString postFix = QLatin1String(" (from ")
25
+
- + QDir::toNativeSeparators(platformPluginPath)
26
+
- + QLatin1Char(')');
27
+
- const QStringList::iterator end = list.end();
28
+
- for (QStringList::iterator it = list.begin(); it != end; ++it)
29
+
- (*it).append(postFix);
30
+
- }
31
+
+ }
32
+
+ QCoreApplication::addLibraryPath(QStringLiteral(NIXPKGS_QPA_PLATFORM_PLUGIN_PATH));
33
+
+ list = directLoader()->keyMap().values();
34
+
+ if (!list.isEmpty()) {
35
+
+ const QString postFix = QLatin1String(" (from ")
36
+
+ + QDir::toNativeSeparators(platformPluginPath)
37
+
+ + QLatin1Char(')');
38
+
+ const QStringList::iterator end = list.end();
39
+
+ for (QStringList::iterator it = list.begin(); it != end; ++it)
40
+
+ (*it).append(postFix);
41
+
}
42
+
#else
43
+
Q_UNUSED(platformPluginPath);
-15
pkgs/development/libraries/qt-5/5.8/qtbase/qpa-plugin-path.patch
···
1
-
Index: qtbase-opensource-src-5.8.0/src/gui/kernel/qguiapplication.cpp
2
-
===================================================================
3
-
--- qtbase-opensource-src-5.8.0.orig/src/gui/kernel/qguiapplication.cpp
4
-
+++ qtbase-opensource-src-5.8.0/src/gui/kernel/qguiapplication.cpp
5
-
@@ -1217,6 +1217,10 @@ void QGuiApplicationPrivate::createPlatf
6
-
7
-
// Load the platform integration
8
-
QString platformPluginPath = QString::fromLocal8Bit(qgetenv("QT_QPA_PLATFORM_PLUGIN_PATH"));
9
-
+ if (!platformPluginPath.isEmpty()) {
10
-
+ platformPluginPath.append(QStringLiteral(":"));
11
-
+ }
12
-
+ platformPluginPath.append(QStringLiteral(NIXPKGS_QPA_PLATFORM_PLUGIN_PATH));
13
-
14
-
15
-
QByteArray platformName;
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
+2
-1
pkgs/development/libraries/qt-5/5.8/qtbase/series
···
2
tzdir.patch
3
dlopen-libXcursor.patch
4
xdg-config-dirs.patch
0
5
libressl.patch
6
-
qpa-plugin-path.patch
7
dlopen-gl.patch
8
compose-search-path.patch
9
cmake-paths.patch
···
2
tzdir.patch
3
dlopen-libXcursor.patch
4
xdg-config-dirs.patch
5
+
nix-profiles-library-paths.patch
6
libressl.patch
7
+
qpa-platform-plugin-path.patch
8
dlopen-gl.patch
9
compose-search-path.patch
10
cmake-paths.patch