diff options
author | Thomas Tuegel <ttuegel@mailbox.org> | 2017-06-15 07:58:55 -0500 |
---|---|---|
committer | Thomas Tuegel <ttuegel@mailbox.org> | 2017-06-18 08:44:47 -0500 |
commit | dab7700f6ce9266e02a630eea0c4440470ba58e5 (patch) | |
tree | a7e4773e97cc8a61f6a1b7d0d4f7fd9626b7a78e /pkgs | |
parent | ce28d8947d3e698f48cbbf4c3291c9427124886e (diff) | |
download | nixlib-dab7700f6ce9266e02a630eea0c4440470ba58e5.tar nixlib-dab7700f6ce9266e02a630eea0c4440470ba58e5.tar.gz nixlib-dab7700f6ce9266e02a630eea0c4440470ba58e5.tar.bz2 nixlib-dab7700f6ce9266e02a630eea0c4440470ba58e5.tar.lz nixlib-dab7700f6ce9266e02a630eea0c4440470ba58e5.tar.xz nixlib-dab7700f6ce9266e02a630eea0c4440470ba58e5.tar.zst nixlib-dab7700f6ce9266e02a630eea0c4440470ba58e5.zip |
qt58: determine plugin and import paths from PATH
Plugin and QML import paths were previously determined by NIX_PROFILES. Using PATH instead allows Qt applications to work under nix-shell without further modification.
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/applications/display-managers/sddm/sddm-nix-profiles.patch | 24 | ||||
-rw-r--r-- | pkgs/applications/display-managers/sddm/series | 3 | ||||
-rw-r--r-- | pkgs/development/libraries/qt-5/5.8/qtbase/default.nix | 1 | ||||
-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.patch | 43 | ||||
-rw-r--r-- | pkgs/development/libraries/qt-5/5.8/qtbase/series | 3 | ||||
-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/series | 2 |
8 files changed, 15 insertions, 85 deletions
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 |