summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nixos/modules/services/x11/display-managers/sddm.nix6
-rw-r--r--pkgs/applications/display-managers/sddm/sddm-nix-profiles.patch24
-rw-r--r--pkgs/applications/display-managers/sddm/series3
-rw-r--r--pkgs/development/libraries/qt-5/5.8/qtbase/default.nix1
-rw-r--r--pkgs/development/libraries/qt-5/5.8/qtbase/library-paths.patch (renamed from pkgs/development/libraries/qt-5/5.8/qtbase/nix-profiles-library-paths.patch)12
-rw-r--r--pkgs/development/libraries/qt-5/5.8/qtbase/qpa-platform-plugin-path.patch43
-rw-r--r--pkgs/development/libraries/qt-5/5.8/qtbase/series3
-rw-r--r--pkgs/development/libraries/qt-5/5.8/qtdeclarative/import-paths.patch (renamed from pkgs/development/libraries/qt-5/5.8/qtdeclarative/nix-profiles-import-paths.patch)12
-rw-r--r--pkgs/development/libraries/qt-5/5.8/qtdeclarative/series2
9 files changed, 19 insertions, 87 deletions
diff --git a/nixos/modules/services/x11/display-managers/sddm.nix b/nixos/modules/services/x11/display-managers/sddm.nix
index bf516235eb25..e6cc02e4d491 100644
--- a/nixos/modules/services/x11/display-managers/sddm.nix
+++ b/nixos/modules/services/x11/display-managers/sddm.nix
@@ -197,8 +197,10 @@ in
logsXsession = true;
environment = {
- # Take themes system environment
- NIX_PROFILES = "/run/current-system/sw";
+ # Load themes from system environment
+ QT_PLUGIN_PATH = "/run/current-system/sw/" + pkgs.qt5.qtbase.qtPluginPrefix;
+ QML2_IMPORT_PATH = "/run/current-system/sw/" + pkgs.qt5.qtbase.qtQmlPrefix;
+
XDG_DATA_DIRS = "/run/current-system/sw/share";
};
diff --git a/pkgs/applications/display-managers/sddm/sddm-nix-profiles.patch b/pkgs/applications/display-managers/sddm/sddm-nix-profiles.patch
deleted file mode 100644
index 1783164af46d..000000000000
--- a/pkgs/applications/display-managers/sddm/sddm-nix-profiles.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Index: sddm-0.14.0/src/daemon/Greeter.cpp
-===================================================================
---- sddm-0.14.0.orig/src/daemon/Greeter.cpp
-+++ sddm-0.14.0/src/daemon/Greeter.cpp
-@@ -157,18 +157,7 @@ namespace SDDM {
- << args;
-
- // greeter environment
-- QProcessEnvironment env;
-- QProcessEnvironment sysenv = QProcessEnvironment::systemEnvironment();
--
-- insertEnvironmentList({QStringLiteral("LANG"), QStringLiteral("LANGUAGE"),
-- QStringLiteral("LC_CTYPE"), QStringLiteral("LC_NUMERIC"), QStringLiteral("LC_TIME"), QStringLiteral("LC_COLLATE"),
-- QStringLiteral("LC_MONETARY"), QStringLiteral("LC_MESSAGES"), QStringLiteral("LC_PAPER"), QStringLiteral("LC_NAME"),
-- QStringLiteral("LC_ADDRESS"), QStringLiteral("LC_TELEPHONE"), QStringLiteral("LC_MEASUREMENT"), QStringLiteral("LC_IDENTIFICATION"),
-- QStringLiteral("LD_LIBRARY_PATH"),
-- QStringLiteral("QML2_IMPORT_PATH"),
-- QStringLiteral("QT_PLUGIN_PATH"),
-- QStringLiteral("XDG_DATA_DIRS")
-- }, sysenv, env);
-+ QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
-
- env.insert(QStringLiteral("PATH"), mainConfig.Users.DefaultPath.get());
- env.insert(QStringLiteral("DISPLAY"), m_display->name());
diff --git a/pkgs/applications/display-managers/sddm/series b/pkgs/applications/display-managers/sddm/series
index 703fb6a3fe14..cb6ea65fedb1 100644
--- a/pkgs/applications/display-managers/sddm/series
+++ b/pkgs/applications/display-managers/sddm/series
@@ -1,2 +1 @@
-sddm-ignore-config-mtime.patch
-sddm-nix-profiles.patch
+sddm-ignore-config-mtime.patch \ No newline at end of file
diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/default.nix b/pkgs/development/libraries/qt-5/5.8/qtbase/default.nix
index 3048baeb3273..93be661b7dab 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtbase/default.nix
+++ b/pkgs/development/libraries/qt-5/5.8/qtbase/default.nix
@@ -132,7 +132,6 @@ stdenv.mkDerivation {
-docdir $out/$qtDocPrefix"
NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QT_PLUGIN_PREFIX=\"$qtPluginPrefix\""
- NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QPA_PLATFORM_PLUGIN_PATH=\"''${!outputLib}/$qtPluginPrefix/platforms\""
'';
diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/nix-profiles-library-paths.patch b/pkgs/development/libraries/qt-5/5.8/qtbase/library-paths.patch
index f626e399288a..38eecbe2c646 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtbase/nix-profiles-library-paths.patch
+++ b/pkgs/development/libraries/qt-5/5.8/qtbase/library-paths.patch
@@ -6,12 +6,12 @@ Index: qtbase-opensource-src-5.8.0/src/corelib/kernel/qcoreapplication.cpp
QStringList *app_libpaths = new QStringList;
coreappdata()->app_libpaths.reset(app_libpaths);
-+ // Add library paths derived from NIX_PROFILES.
-+ const QStringList profiles = QFile::decodeName(qgetenv("NIX_PROFILES")).split(' ');
-+ const QString plugindir = QStringLiteral(NIXPKGS_QT_PLUGIN_PREFIX);
-+ for (const QString &profile: profiles) {
-+ if (!profile.isEmpty()) {
-+ app_libpaths->append(profile + QDir::separator() + plugindir);
++ // Add library paths derived from PATH
++ const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(':');
++ const QString plugindir = QStringLiteral("../" NIXPKGS_QT_PLUGIN_PREFIX);
++ for (const QString &path: paths) {
++ if (!path.isEmpty()) {
++ app_libpaths->append(QDir::cleanPath(path + QDir::separator() + plugindir));
+ }
+ }
+
diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/qpa-platform-plugin-path.patch b/pkgs/development/libraries/qt-5/5.8/qtbase/qpa-platform-plugin-path.patch
deleted file mode 100644
index 18780db05e77..000000000000
--- a/pkgs/development/libraries/qt-5/5.8/qtbase/qpa-platform-plugin-path.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-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(QLatin1String(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(QLatin1String(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);
diff --git a/pkgs/development/libraries/qt-5/5.8/qtbase/series b/pkgs/development/libraries/qt-5/5.8/qtbase/series
index 03f5e6b1002e..f3387694518a 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtbase/series
+++ b/pkgs/development/libraries/qt-5/5.8/qtbase/series
@@ -2,9 +2,8 @@ dlopen-resolv.patch
tzdir.patch
dlopen-libXcursor.patch
xdg-config-dirs.patch
-nix-profiles-library-paths.patch
+library-paths.patch
libressl.patch
-qpa-platform-plugin-path.patch
dlopen-gl.patch
compose-search-path.patch
cmake-paths.patch
diff --git a/pkgs/development/libraries/qt-5/5.8/qtdeclarative/nix-profiles-import-paths.patch b/pkgs/development/libraries/qt-5/5.8/qtdeclarative/import-paths.patch
index 2d51f7b67596..d50ee823a78b 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtdeclarative/nix-profiles-import-paths.patch
+++ b/pkgs/development/libraries/qt-5/5.8/qtdeclarative/import-paths.patch
@@ -6,12 +6,12 @@ Index: qtdeclarative-opensource-src-5.8.0/src/qml/qml/qqmlimport.cpp
QString installImportsPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath);
addImportPath(installImportsPath);
-+ // Add library paths derived from NIX_PROFILES.
-+ const QStringList profiles = QFile::decodeName(qgetenv("NIX_PROFILES")).split(' ');
-+ const QString qmldir = QStringLiteral(NIXPKGS_QML2_IMPORT_PREFIX);
-+ for (const QString &profile: profiles) {
-+ if (!profile.isEmpty()) {
-+ addImportPath(profile + QDir::separator() + qmldir);
++ // Add import paths derived from PATH
++ const QStringList paths = QFile::decodeName(qgetenv("PATH")).split(':');
++ const QString qmldir = QStringLiteral("../" NIXPKGS_QML2_IMPORT_PREFIX);
++ for (const QString &path: paths) {
++ if (!path.isEmpty()) {
++ addImportPath(QDir::cleanPath(path + QDir::separator() + qmldir));
+ }
+ }
+
diff --git a/pkgs/development/libraries/qt-5/5.8/qtdeclarative/series b/pkgs/development/libraries/qt-5/5.8/qtdeclarative/series
index 7dbe197c56e0..38abb916a508 100644
--- a/pkgs/development/libraries/qt-5/5.8/qtdeclarative/series
+++ b/pkgs/development/libraries/qt-5/5.8/qtdeclarative/series
@@ -1 +1 @@
-nix-profiles-import-paths.patch
+import-paths.patch