Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8a68e4c7f6ae
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fabd48272faa
Choose a head ref
  • 3 commits
  • 9 files changed
  • 1 contributor

Commits on May 14, 2017

  1. Revert "qt58: ignore NIX_PROFILES environment variable"

    This reverts commit 6169bd9.
    ttuegel committed May 14, 2017
    Copy the full SHA
    88a5082 View commit details
  2. Copy the full SHA
    7c338b7 View commit details
  3. Copy the full SHA
    fabd482 View commit details
2 changes: 2 additions & 0 deletions pkgs/development/libraries/qt-5/5.6/qtbase/default.nix
Original file line number Diff line number Diff line change
@@ -104,6 +104,8 @@ stdenv.mkDerivation {
-importdir $out/lib/qt5/imports \
-qmldir $out/lib/qt5/qml \
-docdir $out/share/doc/qt5"
NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QPA_PLATFORM_PLUGIN_PATH=\"''${!outputLib}/lib/qt5/plugins/platforms\""
'';

prefixKey = "-prefix ";
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Index: qtbase-opensource-src-5.6.2/src/corelib/kernel/qcoreapplication.cpp
===================================================================
--- qtbase-opensource-src-5.6.2.orig/src/corelib/kernel/qcoreapplication.cpp
+++ qtbase-opensource-src-5.6.2/src/corelib/kernel/qcoreapplication.cpp
@@ -2533,6 +2533,15 @@ QStringList QCoreApplication::libraryPat
QStringList *app_libpaths = new QStringList;
coreappdata()->app_libpaths.reset(app_libpaths);

+ // Add library paths derived from NIX_PROFILES.
+ const QByteArrayList profiles = qgetenv("NIX_PROFILES").split(' ');
+ const QString plugindir = QString::fromLatin1("/lib/qt5/plugins");
+ for (const QByteArray &profile: profiles) {
+ if (!profile.isEmpty()) {
+ app_libpaths->append(QFile::decodeName(profile) + plugindir);
+ }
+ }
+
const QByteArray libPathEnv = qgetenv("QT_PLUGIN_PATH");
if (!libPathEnv.isEmpty()) {
QStringList paths = QFile::decodeName(libPathEnv).split(QDir::listSeparator(), QString::SkipEmptyParts);
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Index: qtbase-opensource-src-5.6.2/src/gui/kernel/qplatformintegrationfactory.cpp
===================================================================
--- qtbase-opensource-src-5.6.2.orig/src/gui/kernel/qplatformintegrationfactory.cpp
+++ qtbase-opensource-src-5.6.2/src/gui/kernel/qplatformintegrationfactory.cpp
@@ -67,9 +67,10 @@ QPlatformIntegration *QPlatformIntegrati
// Try loading the plugin from platformPluginPath first:
if (!platformPluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(platformPluginPath);
- if (QPlatformIntegration *ret = loadIntegration(directLoader(), platform, paramList, argc, argv))
- return ret;
}
+ QCoreApplication::addLibraryPath(QStringLiteral(NIXPKGS_QPA_PLATFORM_PLUGIN_PATH));
+ if (QPlatformIntegration *ret = loadIntegration(directLoader(), platform, paramList, argc, argv))
+ return ret;
if (QPlatformIntegration *ret = loadIntegration(loader(), platform, paramList, argc, argv))
return ret;
#else
@@ -95,15 +96,16 @@ QStringList QPlatformIntegrationFactory:
QStringList list;
if (!platformPluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(platformPluginPath);
- list = directLoader()->keyMap().values();
- if (!list.isEmpty()) {
- const QString postFix = QStringLiteral(" (from ")
- + QDir::toNativeSeparators(platformPluginPath)
- + QLatin1Char(')');
- const QStringList::iterator end = list.end();
- for (QStringList::iterator it = list.begin(); it != end; ++it)
- (*it).append(postFix);
- }
+ }
+ QCoreApplication::addLibraryPath(QStringLiteral(NIXPKGS_QPA_PLATFORM_PLUGIN_PATH));
+ list = directLoader()->keyMap().values();
+ if (!list.isEmpty()) {
+ const QString postFix = QStringLiteral(" (from ")
+ + QDir::toNativeSeparators(platformPluginPath)
+ + QLatin1Char(')');
+ const QStringList::iterator end = list.end();
+ for (QStringList::iterator it = list.begin(); it != end; ++it)
+ (*it).append(postFix);
}
list.append(loader()->keyMap().values());
return list;
2 changes: 2 additions & 0 deletions pkgs/development/libraries/qt-5/5.6/qtbase/series
Original file line number Diff line number Diff line change
@@ -4,5 +4,7 @@ dlopen-libXcursor.patch
dlopen-openssl.patch
dlopen-dbus.patch
xdg-config-dirs.patch
nix-profiles-library-paths.patch
compose-search-path.patch
libressl.patch
qpa-platform-plugin-path.patch
2 changes: 1 addition & 1 deletion pkgs/development/libraries/qt-5/5.8/qtbase/default.nix
Original file line number Diff line number Diff line change
@@ -128,7 +128,7 @@ stdenv.mkDerivation {
-qmldir $out/lib/qt5/qml \
-docdir $out/share/doc/qt5"
NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QPA_PLATFORM_PLUGIN_PATH=\"''${!outputLib}/lib/qt5/plugins\""
NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QPA_PLATFORM_PLUGIN_PATH=\"''${!outputLib}/lib/qt5/plugins/platforms\""
'';


Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Index: qtbase-opensource-src-5.8.0/src/corelib/kernel/qcoreapplication.cpp
===================================================================
--- qtbase-opensource-src-5.8.0.orig/src/corelib/kernel/qcoreapplication.cpp
+++ qtbase-opensource-src-5.8.0/src/corelib/kernel/qcoreapplication.cpp
@@ -2476,6 +2476,15 @@ QStringList QCoreApplication::libraryPat
QStringList *app_libpaths = new QStringList;
coreappdata()->app_libpaths.reset(app_libpaths);

+ // Add library paths derived from NIX_PROFILES.
+ const QByteArrayList profiles = qgetenv("NIX_PROFILES").split(' ');
+ const QString plugindir = QString::fromLatin1("/lib/qt5/plugins");
+ for (const QByteArray &profile: profiles) {
+ if (!profile.isEmpty()) {
+ app_libpaths->append(QFile::decodeName(profile) + plugindir);
+ }
+ }
+
const QByteArray libPathEnv = qgetenv("QT_PLUGIN_PATH");
if (!libPathEnv.isEmpty()) {
QStringList paths = QFile::decodeName(libPathEnv).split(QDir::listSeparator(), QString::SkipEmptyParts);
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Index: qtbase-opensource-src-5.8.0/src/gui/kernel/qplatformintegrationfactory.cpp
===================================================================
--- qtbase-opensource-src-5.8.0.orig/src/gui/kernel/qplatformintegrationfactory.cpp
+++ qtbase-opensource-src-5.8.0/src/gui/kernel/qplatformintegrationfactory.cpp
@@ -62,9 +62,10 @@ QPlatformIntegration *QPlatformIntegrati
// Try loading the plugin from platformPluginPath first:
if (!platformPluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(platformPluginPath);
- if (QPlatformIntegration *ret = qLoadPlugin<QPlatformIntegration, QPlatformIntegrationPlugin>(directLoader(), platform, paramList, argc, argv))
- return ret;
}
+ QCoreApplication::addLibraryPath(QStringLiteral(NIXPKGS_QPA_PLATFORM_PLUGIN_PATH));
+ if (QPlatformIntegration *ret = qLoadPlugin<QPlatformIntegration, QPlatformIntegrationPlugin>(directLoader(), platform, paramList, argc, argv))
+ return ret;
#else
Q_UNUSED(platformPluginPath);
#endif
@@ -84,15 +85,16 @@ QStringList QPlatformIntegrationFactory:
#ifndef QT_NO_LIBRARY
if (!platformPluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(platformPluginPath);
- list = directLoader()->keyMap().values();
- if (!list.isEmpty()) {
- const QString postFix = QLatin1String(" (from ")
- + QDir::toNativeSeparators(platformPluginPath)
- + QLatin1Char(')');
- const QStringList::iterator end = list.end();
- for (QStringList::iterator it = list.begin(); it != end; ++it)
- (*it).append(postFix);
- }
+ }
+ QCoreApplication::addLibraryPath(QStringLiteral(NIXPKGS_QPA_PLATFORM_PLUGIN_PATH));
+ list = directLoader()->keyMap().values();
+ if (!list.isEmpty()) {
+ const QString postFix = QLatin1String(" (from ")
+ + QDir::toNativeSeparators(platformPluginPath)
+ + QLatin1Char(')');
+ const QStringList::iterator end = list.end();
+ for (QStringList::iterator it = list.begin(); it != end; ++it)
+ (*it).append(postFix);
}
#else
Q_UNUSED(platformPluginPath);
15 changes: 0 additions & 15 deletions pkgs/development/libraries/qt-5/5.8/qtbase/qpa-plugin-path.patch

This file was deleted.

3 changes: 2 additions & 1 deletion pkgs/development/libraries/qt-5/5.8/qtbase/series
Original file line number Diff line number Diff line change
@@ -2,8 +2,9 @@ dlopen-resolv.patch
tzdir.patch
dlopen-libXcursor.patch
xdg-config-dirs.patch
nix-profiles-library-paths.patch
libressl.patch
qpa-plugin-path.patch
qpa-platform-plugin-path.patch
dlopen-gl.patch
compose-search-path.patch
cmake-paths.patch