summaryrefslogtreecommitdiffstats
path: root/pkgs/desktops/plasma-5
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@mailbox.org>2020-02-06 09:59:51 -0600
committerGitHub <noreply@github.com>2020-02-06 09:59:51 -0600
commit1a903be2dec52c675222bfdcb3d84798906ac8f6 (patch)
tree512e25e0e03801f02f58b1d1144026d7a856e954 /pkgs/desktops/plasma-5
parent9e87041826237b0d2fe87bea7d05355d546a71ba (diff)
parent27fc6620e9f99991bbaae78e15c5a0626af39e12 (diff)
Merge pull request #79011 from ttuegel/update--plasma-5.17.5
Plasma 5.17.5
Diffstat (limited to 'pkgs/desktops/plasma-5')
-rw-r--r--pkgs/desktops/plasma-5/fetch.sh2
-rw-r--r--pkgs/desktops/plasma-5/kscreen.nix12
-rw-r--r--pkgs/desktops/plasma-5/kwayland-integration.nix4
-rw-r--r--pkgs/desktops/plasma-5/kwin/0001-follow-symlinks.patch25
-rw-r--r--pkgs/desktops/plasma-5/kwin/0002-xwayland.patch (renamed from pkgs/desktops/plasma-5/kwin/xwayland.patch)22
-rw-r--r--pkgs/desktops/plasma-5/kwin/default.nix8
-rw-r--r--pkgs/desktops/plasma-5/kwin/follow-symlinks.patch13
-rw-r--r--pkgs/desktops/plasma-5/kwin/no-setcap-install.patch24
-rw-r--r--pkgs/desktops/plasma-5/kwin/series3
-rw-r--r--pkgs/desktops/plasma-5/milou.nix6
-rw-r--r--pkgs/desktops/plasma-5/plasma-browser-integration.nix15
-rw-r--r--pkgs/desktops/plasma-5/plasma-workspace/0001-startkde.patch129
-rw-r--r--pkgs/desktops/plasma-5/plasma-workspace/0002-absolute-wallpaper-install-dir.patch22
-rw-r--r--pkgs/desktops/plasma-5/plasma-workspace/default.nix68
-rw-r--r--pkgs/desktops/plasma-5/plasma-workspace/plasma-workspace.patch1008
-rw-r--r--pkgs/desktops/plasma-5/srcs.nix371
16 files changed, 438 insertions, 1294 deletions
diff --git a/pkgs/desktops/plasma-5/fetch.sh b/pkgs/desktops/plasma-5/fetch.sh
index e2e6da6f07c2..d871ceb28757 100644
--- a/pkgs/desktops/plasma-5/fetch.sh
+++ b/pkgs/desktops/plasma-5/fetch.sh
@@ -1 +1 @@
-WGET_ARGS=( https://download.kde.org/stable/plasma/5.16.5/ )
+WGET_ARGS=( https://download.kde.org/stable/plasma/5.17.5/ )
diff --git a/pkgs/desktops/plasma-5/kscreen.nix b/pkgs/desktops/plasma-5/kscreen.nix
index 422bb95c6059..d46d48b9c5bf 100644
--- a/pkgs/desktops/plasma-5/kscreen.nix
+++ b/pkgs/desktops/plasma-5/kscreen.nix
@@ -1,17 +1,17 @@
{
mkDerivation,
extra-cmake-modules,
- kconfig, kconfigwidgets, kdbusaddons, kglobalaccel, ki18n, kwidgetsaddons,
- kxmlgui, libkscreen, qtdeclarative, qtgraphicaleffects, kwindowsystem,
- kdeclarative, plasma-framework
+ kconfig, kcmutils, kconfigwidgets, kdbusaddons, kglobalaccel, ki18n,
+ kwidgetsaddons, kxmlgui, libkscreen, qtdeclarative, qtgraphicaleffects,
+ kwindowsystem, kdeclarative, plasma-framework
}:
mkDerivation {
name = "kscreen";
nativeBuildInputs = [ extra-cmake-modules ];
buildInputs = [
- kconfig kconfigwidgets kdbusaddons kglobalaccel ki18n kwidgetsaddons kxmlgui
- libkscreen qtdeclarative qtgraphicaleffects kwindowsystem kdeclarative
- plasma-framework
+ kconfig kcmutils kconfigwidgets kdbusaddons kglobalaccel ki18n
+ kwidgetsaddons kxmlgui libkscreen qtdeclarative qtgraphicaleffects
+ kwindowsystem kdeclarative plasma-framework
];
}
diff --git a/pkgs/desktops/plasma-5/kwayland-integration.nix b/pkgs/desktops/plasma-5/kwayland-integration.nix
index 1344b477f736..667d3ead1768 100644
--- a/pkgs/desktops/plasma-5/kwayland-integration.nix
+++ b/pkgs/desktops/plasma-5/kwayland-integration.nix
@@ -1,11 +1,11 @@
{
mkDerivation,
extra-cmake-modules,
- kidletime, kwayland, kwindowsystem, qtbase,
+ kguiaddons, kidletime, kwayland, kwindowsystem, qtbase,
}:
mkDerivation {
name = "kwayland-integration";
nativeBuildInputs = [ extra-cmake-modules ];
- buildInputs = [ kidletime kwindowsystem kwayland qtbase ];
+ buildInputs = [ kguiaddons kidletime kwindowsystem kwayland qtbase ];
}
diff --git a/pkgs/desktops/plasma-5/kwin/0001-follow-symlinks.patch b/pkgs/desktops/plasma-5/kwin/0001-follow-symlinks.patch
new file mode 100644
index 000000000000..4861df46ca63
--- /dev/null
+++ b/pkgs/desktops/plasma-5/kwin/0001-follow-symlinks.patch
@@ -0,0 +1,25 @@
+From 449896c45b23f50c168d8d2789832024c906ec36 Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@mailbox.org>
+Date: Mon, 27 Jan 2020 05:31:13 -0600
+Subject: [PATCH 1/2] follow symlinks
+
+---
+ plugins/kdecorations/aurorae/src/aurorae.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plugins/kdecorations/aurorae/src/aurorae.cpp b/plugins/kdecorations/aurorae/src/aurorae.cpp
+index fd723a8..fb95633 100644
+--- a/plugins/kdecorations/aurorae/src/aurorae.cpp
++++ b/plugins/kdecorations/aurorae/src/aurorae.cpp
+@@ -211,7 +211,7 @@ void Helper::init()
+ // so let's try to locate our plugin:
+ QString pluginPath;
+ for (const QString &path : m_engine->importPathList()) {
+- QDirIterator it(path, QDirIterator::Subdirectories);
++ QDirIterator it(path, QDirIterator::Subdirectories | QDirIterator::FollowSymlinks);
+ while (it.hasNext()) {
+ it.next();
+ QFileInfo fileInfo = it.fileInfo();
+--
+2.23.1
+
diff --git a/pkgs/desktops/plasma-5/kwin/xwayland.patch b/pkgs/desktops/plasma-5/kwin/0002-xwayland.patch
index 9d405b3bbb86..0505810abe60 100644
--- a/pkgs/desktops/plasma-5/kwin/xwayland.patch
+++ b/pkgs/desktops/plasma-5/kwin/0002-xwayland.patch
@@ -1,8 +1,17 @@
-Index: kwin-5.15.5/xwl/xwayland.cpp
-===================================================================
---- kwin-5.15.5.orig/xwl/xwayland.cpp
-+++ kwin-5.15.5/xwl/xwayland.cpp
-@@ -143,7 +143,7 @@ void Xwayland::init()
+From d584b075d71c4486710c0bbed6d44038f2ff5075 Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@mailbox.org>
+Date: Mon, 27 Jan 2020 05:31:23 -0600
+Subject: [PATCH 2/2] xwayland
+
+---
+ xwl/xwayland.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/xwl/xwayland.cpp b/xwl/xwayland.cpp
+index 5f17d39..b4b69ba 100644
+--- a/xwl/xwayland.cpp
++++ b/xwl/xwayland.cpp
+@@ -145,7 +145,7 @@ void Xwayland::init()
m_xwaylandProcess = new Process(this);
m_xwaylandProcess->setProcessChannelMode(QProcess::ForwardedErrorChannel);
@@ -11,3 +20,6 @@ Index: kwin-5.15.5/xwl/xwayland.cpp
QProcessEnvironment env = m_app->processStartupEnvironment();
env.insert("WAYLAND_SOCKET", QByteArray::number(wlfd));
env.insert("EGL_PLATFORM", QByteArrayLiteral("DRM"));
+--
+2.23.1
+
diff --git a/pkgs/desktops/plasma-5/kwin/default.nix b/pkgs/desktops/plasma-5/kwin/default.nix
index b8f381e97149..0e1709d8245c 100644
--- a/pkgs/desktops/plasma-5/kwin/default.nix
+++ b/pkgs/desktops/plasma-5/kwin/default.nix
@@ -14,6 +14,9 @@
plasma-framework, qtsensors, libcap, libdrm
}:
+# TODO (ttuegel): investigate qmlplugindump failure
+# TODO (ttuegel): investigate gbm dependency
+
mkDerivation {
name = "kwin";
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
@@ -30,7 +33,10 @@ mkDerivation {
libcap libdrm
];
outputs = [ "bin" "dev" "out" ];
- patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
+ patches = [
+ ./0001-follow-symlinks.patch
+ ./0002-xwayland.patch
+ ];
CXXFLAGS = [
''-DNIXPKGS_XWAYLAND=\"${lib.getBin xwayland}/bin/Xwayland\"''
];
diff --git a/pkgs/desktops/plasma-5/kwin/follow-symlinks.patch b/pkgs/desktops/plasma-5/kwin/follow-symlinks.patch
deleted file mode 100644
index 60b8f5ef541f..000000000000
--- a/pkgs/desktops/plasma-5/kwin/follow-symlinks.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: kwin-5.7.3/plugins/kdecorations/aurorae/src/aurorae.cpp
-===================================================================
---- kwin-5.7.3.orig/plugins/kdecorations/aurorae/src/aurorae.cpp
-+++ kwin-5.7.3/plugins/kdecorations/aurorae/src/aurorae.cpp
-@@ -211,7 +211,7 @@ void Helper::init()
- // so let's try to locate our plugin:
- QString pluginPath;
- for (const QString &path : m_engine->importPathList()) {
-- QDirIterator it(path, QDirIterator::Subdirectories);
-+ QDirIterator it(path, QDirIterator::Subdirectories | QDirIterator::FollowSymlinks);
- while (it.hasNext()) {
- it.next();
- QFileInfo fileInfo = it.fileInfo();
diff --git a/pkgs/desktops/plasma-5/kwin/no-setcap-install.patch b/pkgs/desktops/plasma-5/kwin/no-setcap-install.patch
deleted file mode 100644
index 80aacacc6ca0..000000000000
--- a/pkgs/desktops/plasma-5/kwin/no-setcap-install.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Dont set capabilities on kwin_wayland executable at build time
-
-This is handled by security.wrappers on NixOS
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 48cbcdbfe..93b410ed8 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -674,15 +674,6 @@ if (HAVE_LIBCAP)
- endif()
-
- install(TARGETS kwin_wayland ${INSTALL_TARGETS_DEFAULT_ARGS} )
--if (HAVE_LIBCAP)
-- install(
-- CODE "execute_process(
-- COMMAND
-- ${SETCAP_EXECUTABLE}
-- CAP_SYS_NICE=+ep
-- \$ENV{DESTDIR}${CMAKE_INSTALL_FULL_BINDIR}/kwin_wayland)"
-- )
--endif()
-
- add_subdirectory(platformsupport)
- add_subdirectory(plugins)
diff --git a/pkgs/desktops/plasma-5/kwin/series b/pkgs/desktops/plasma-5/kwin/series
deleted file mode 100644
index 8efb74eabd67..000000000000
--- a/pkgs/desktops/plasma-5/kwin/series
+++ /dev/null
@@ -1,3 +0,0 @@
-follow-symlinks.patch
-xwayland.patch
-no-setcap-install.patch
diff --git a/pkgs/desktops/plasma-5/milou.nix b/pkgs/desktops/plasma-5/milou.nix
index db019db358bb..790979d664fc 100644
--- a/pkgs/desktops/plasma-5/milou.nix
+++ b/pkgs/desktops/plasma-5/milou.nix
@@ -1,15 +1,15 @@
{
mkDerivation,
extra-cmake-modules,
- kcoreaddons, kdeclarative, ki18n, krunner, kservice, plasma-framework,
- qtscript, qtdeclarative
+ kcoreaddons, kdeclarative, ki18n, kitemmodels, krunner, kservice,
+ plasma-framework, qtscript, qtdeclarative
}:
mkDerivation {
name = "milou";
nativeBuildInputs = [ extra-cmake-modules ];
buildInputs = [
- kcoreaddons kdeclarative ki18n krunner kservice plasma-framework
+ kcoreaddons kdeclarative ki18n kitemmodels krunner kservice plasma-framework
qtdeclarative qtscript
];
}
diff --git a/pkgs/desktops/plasma-5/plasma-browser-integration.nix b/pkgs/desktops/plasma-5/plasma-browser-integration.nix
index e01efabe8a6a..f6855cb34da1 100644
--- a/pkgs/desktops/plasma-5/plasma-browser-integration.nix
+++ b/pkgs/desktops/plasma-5/plasma-browser-integration.nix
@@ -1,11 +1,18 @@
-{ mkDerivation, extra-cmake-modules, qtbase, kio, ki18n, kconfig
-, kdbusaddons, knotifications, krunner, kwindowsystem, kactivities
+{
+ mkDerivation,
+ extra-cmake-modules,
+ qtbase,
+ kfilemetadata, kio, ki18n, kconfig , kdbusaddons, knotifications, kpurpose,
+ krunner, kwindowsystem, kactivities,
}:
mkDerivation {
name = "plasma-browser-integration";
nativeBuildInputs = [
- extra-cmake-modules qtbase kio ki18n kconfig kdbusaddons
- knotifications krunner kwindowsystem kactivities
+ extra-cmake-modules
+ ];
+ buildInputs = [
+ qtbase kfilemetadata kio ki18n kconfig kdbusaddons knotifications kpurpose
+ krunner kwindowsystem kactivities
];
}
diff --git a/pkgs/desktops/plasma-5/plasma-workspace/0001-startkde.patch b/pkgs/desktops/plasma-5/plasma-workspace/0001-startkde.patch
new file mode 100644
index 000000000000..d230e1270bea
--- /dev/null
+++ b/pkgs/desktops/plasma-5/plasma-workspace/0001-startkde.patch
@@ -0,0 +1,129 @@
+From 1796822e4c97062b919a596ce13db68e2c46c7e8 Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@mailbox.org>
+Date: Tue, 28 Jan 2020 05:00:53 -0600
+Subject: [PATCH 1/2] startkde
+
+---
+ startkde/startplasma-waylandsession.cpp | 2 +-
+ startkde/startplasma-x11.cpp | 2 +-
+ startkde/startplasma.cpp | 32 ++++++++-----------------
+ 3 files changed, 12 insertions(+), 24 deletions(-)
+
+diff --git a/startkde/startplasma-waylandsession.cpp b/startkde/startplasma-waylandsession.cpp
+index 87c71c6..5fc5314 100644
+--- a/startkde/startplasma-waylandsession.cpp
++++ b/startkde/startplasma-waylandsession.cpp
+@@ -67,7 +67,7 @@ int main(int /*argc*/, char** /*argv*/)
+ waitForKonqi();
+ out << "startplasma-waylandsession: Shutting down...\n";
+
+- runSync(QStringLiteral("kdeinit5_shutdown"), {});
++ runSync(QStringLiteral(NIXPKGS_KDEINIT5_SHUTDOWN), {});
+
+ cleanupX11();
+ out << "startplasma-waylandsession: Done.\n";
+diff --git a/startkde/startplasma-x11.cpp b/startkde/startplasma-x11.cpp
+index 3314b62..14cbe29 100644
+--- a/startkde/startplasma-x11.cpp
++++ b/startkde/startplasma-x11.cpp
+@@ -111,7 +111,7 @@ int main(int /*argc*/, char** /*argv*/)
+
+ out << "startkde: Shutting down...\n";
+
+- runSync(QStringLiteral("kdeinit5_shutdown"), {});
++ runSync(QStringLiteral(NIXPKGS_KDEINIT5_SHUTDOWN), {});
+
+ cleanupPlasmaEnvironment();
+ cleanupX11();
+diff --git a/startkde/startplasma.cpp b/startkde/startplasma.cpp
+index e0f7004..8ac41fd 100644
+--- a/startkde/startplasma.cpp
++++ b/startkde/startplasma.cpp
+@@ -34,7 +34,7 @@ QTextStream out(stderr);
+ void messageBox(const QString &text)
+ {
+ out << text;
+- runSync(QStringLiteral("xmessage"), {QStringLiteral("-geometry"), QStringLiteral("500x100"), text});
++ runSync(QStringLiteral(NIXPKGS_XMESSAGE), {QStringLiteral("-geometry"), QStringLiteral("500x100"), text});
+ }
+
+ QStringList allServices(const QLatin1String& prefix)
+@@ -184,14 +184,6 @@ void runEnvironmentScripts()
+ }
+ }
+ sourceFiles(scripts);
+-
+- // Make sure that the KDE prefix is first in XDG_DATA_DIRS and that it's set at all.
+- // The spec allows XDG_DATA_DIRS to be not set, but X session startup scripts tend
+- // to set it to a list of paths *not* including the KDE prefix if it's not /usr or
+- // /usr/local.
+- if (!qEnvironmentVariableIsSet("XDG_DATA_DIRS")) {
+- qputenv("XDG_DATA_DIRS", KDE_INSTALL_FULL_DATAROOTDIR ":/usr/share:/usr/local/share");
+- }
+ }
+
+
+@@ -240,15 +232,15 @@ void setupX11()
+ // If the user has overwritten fonts, the cursor font may be different now
+ // so don't move this up.
+
+- runSync(QStringLiteral("xsetroot"), {QStringLiteral("-cursor_name"), QStringLiteral("left_ptr")});
+- runSync(QStringLiteral("xprop"), {QStringLiteral("-root"), QStringLiteral("-f"), QStringLiteral("KDE_FULL_SESSION"), QStringLiteral("8t"), QStringLiteral("-set"), QStringLiteral("KDE_FULL_SESSION"), QStringLiteral("true")});
+- runSync(QStringLiteral("xprop"), {QStringLiteral("-root"), QStringLiteral("-f"), QStringLiteral("KDE_SESSION_VERSION"), QStringLiteral("32c"), QStringLiteral("-set"), QStringLiteral("KDE_SESSION_VERSION"), QStringLiteral("5")});
++ runSync(QStringLiteral(NIXPKGS_XSETROOT), {QStringLiteral("-cursor_name"), QStringLiteral("left_ptr")});
++ runSync(QStringLiteral(NIXPKGS_XPROP), {QStringLiteral("-root"), QStringLiteral("-f"), QStringLiteral("KDE_FULL_SESSION"), QStringLiteral("8t"), QStringLiteral("-set"), QStringLiteral("KDE_FULL_SESSION"), QStringLiteral("true")});
++ runSync(QStringLiteral(NIXPKGS_XPROP), {QStringLiteral("-root"), QStringLiteral("-f"), QStringLiteral("KDE_SESSION_VERSION"), QStringLiteral("32c"), QStringLiteral("-set"), QStringLiteral("KDE_SESSION_VERSION"), QStringLiteral("5")});
+ }
+
+ void cleanupX11()
+ {
+- runSync(QStringLiteral("xprop"), { QStringLiteral("-root"), QStringLiteral("-remove"), QStringLiteral("KDE_FULL_SESSION") });
+- runSync(QStringLiteral("xprop"), { QStringLiteral("-root"), QStringLiteral("-remove"), QStringLiteral("KDE_SESSION_VERSION") });
++ runSync(QStringLiteral(NIXPKGS_XPROP), { QStringLiteral("-root"), QStringLiteral("-remove"), QStringLiteral("KDE_FULL_SESSION") });
++ runSync(QStringLiteral(NIXPKGS_XPROP), { QStringLiteral("-root"), QStringLiteral("-remove"), QStringLiteral("KDE_SESSION_VERSION") });
+ }
+
+ // TODO: Check if Necessary
+@@ -265,11 +257,7 @@ bool syncDBusEnvironment()
+ {
+ int exitCode;
+ // At this point all environment variables are set, let's send it to the DBus session server to update the activation environment
+- if (!QStandardPaths::findExecutable(QStringLiteral("dbus-update-activation-environment")).isEmpty()) {
+- exitCode = runSync(QStringLiteral("dbus-update-activation-environment"), { QStringLiteral("--systemd"), QStringLiteral("--all") });
+- } else {
+- exitCode = runSync(QStringLiteral(CMAKE_INSTALL_FULL_LIBEXECDIR "/ksyncdbusenv"), {});
+- }
++ exitCode = runSync(QStringLiteral(NIXPKGS_DBUS_UPDATE_ACTIVATION_ENVIRONMENT), { QStringLiteral("--systemd"), QStringLiteral("--all") });
+ return exitCode == 0;
+ }
+
+@@ -285,7 +273,7 @@ void setupFontDpi()
+ //TODO port to c++?
+ const QByteArray input = "Xft.dpi: " + QByteArray::number(fontsCfg.readEntry("forceFontDPI", 0));
+ QProcess p;
+- p.start(QStringLiteral("xrdb"), { QStringLiteral("-quiet"), QStringLiteral("-merge"), QStringLiteral("-nocpp") });
++ p.start(QStringLiteral(NIXPKGS_XRDB), { QStringLiteral("-quiet"), QStringLiteral("-merge"), QStringLiteral("-nocpp") });
+ p.setProcessChannelMode(QProcess::ForwardedChannels);
+ p.write(input);
+ p.closeWriteChannel();
+@@ -307,7 +295,7 @@ QProcess* setupKSplash()
+ KConfigGroup ksplashCfg = cfg.group("KSplash");
+ if (ksplashCfg.readEntry("Engine", QStringLiteral("KSplashQML")) == QLatin1String("KSplashQML")) {
+ p = new QProcess;
+- p->start(QStringLiteral("ksplashqml"), { ksplashCfg.readEntry("Theme", QStringLiteral("Breeze")) });
++ p->start(QStringLiteral(CMAKE_INSTALL_FULL_BINDIR "/ksplashqml"), { ksplashCfg.readEntry("Theme", QStringLiteral("Breeze")) });
+ }
+ }
+ return p;
+@@ -329,7 +317,7 @@ bool startKDEInit()
+ {
+ // We set LD_BIND_NOW to increase the efficiency of kdeinit.
+ // kdeinit unsets this variable before loading applications.
+- const int exitCode = runSync(QStringLiteral(CMAKE_INSTALL_FULL_LIBEXECDIR_KF5 "/start_kdeinit_wrapper"), { QStringLiteral("--kded"), QStringLiteral("+kcminit_startup") }, { QStringLiteral("LD_BIND_NOW=true") });
++ const int exitCode = runSync(QStringLiteral(NIXPKGS_START_KDEINIT_WRAPPER), { QStringLiteral("--kded"), QStringLiteral("+kcminit_startup") }, { QStringLiteral("LD_BIND_NOW=true") });
+ if (exitCode != 0) {
+ messageBox(QStringLiteral("startkde: Could not start kdeinit5. Check your installation."));
+ return false;
+--
+2.23.1
+
diff --git a/pkgs/desktops/plasma-5/plasma-workspace/0002-absolute-wallpaper-install-dir.patch b/pkgs/desktops/plasma-5/plasma-workspace/0002-absolute-wallpaper-install-dir.patch
new file mode 100644
index 000000000000..8fa9e1d31cff
--- /dev/null
+++ b/pkgs/desktops/plasma-5/plasma-workspace/0002-absolute-wallpaper-install-dir.patch
@@ -0,0 +1,22 @@
+From 7c6f939aea290bc3ec7629f26d02441d1d4bcb8a Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@mailbox.org>
+Date: Wed, 5 Feb 2020 05:03:11 -0600
+Subject: [PATCH 2/2] absolute-wallpaper-install-dir
+
+---
+ sddm-theme/theme.conf.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sddm-theme/theme.conf.cmake b/sddm-theme/theme.conf.cmake
+index ea9a943..c8458ba 100644
+--- a/sddm-theme/theme.conf.cmake
++++ b/sddm-theme/theme.conf.cmake
+@@ -2,4 +2,4 @@
+ type=image
+ color=#1d99f3
+ fontSize=10
+-background=${CMAKE_INSTALL_PREFIX}/${WALLPAPER_INSTALL_DIR}/Next/contents/images/5120x2880.png
++background=${NIXPKGS_BREEZE_WALLPAPERS}/Next/contents/images/5120x2880.png
+--
+2.23.1
+
diff --git a/pkgs/desktops/plasma-5/plasma-workspace/default.nix b/pkgs/desktops/plasma-5/plasma-workspace/default.nix
index 1403c9e4c8b7..6aa0e3b57382 100644
--- a/pkgs/desktops/plasma-5/plasma-workspace/default.nix
+++ b/pkgs/desktops/plasma-5/plasma-workspace/default.nix
@@ -6,12 +6,12 @@
coreutils, dbus, gnugrep, gnused, isocodes, libdbusmenu, libSM, libXcursor,
libXtst, pam, wayland, xmessage, xprop, xrdb, xsetroot,
- baloo, kactivities, kcmutils, kconfig, kcrash, kdbusaddons, kdeclarative,
- kdelibs4support, kdesu, kglobalaccel, kidletime, kinit, kjsembed, knewstuff,
- knotifyconfig, kpackage, krunner, kscreenlocker, ktexteditor, ktextwidgets,
- kwallet, kwayland, kwin, kxmlrpcclient, libkscreen, libksysguard, libqalculate,
- networkmanager-qt, phonon, plasma-framework, prison, solid, kholidays,
- breeze-qt5,
+ baloo, breeze-qt5, kactivities, kactivities-stats, kcmutils, kconfig, kcrash,
+ kdbusaddons, kdeclarative, kdelibs4support, kdesu, kglobalaccel, kidletime,
+ kinit, kjsembed, knewstuff, knotifyconfig, kpackage, kpeople, krunner,
+ kscreenlocker, ktexteditor, ktextwidgets, kwallet, kwayland, kwin,
+ kxmlrpcclient, libkscreen, libksysguard, libqalculate, networkmanager-qt,
+ phonon, plasma-framework, prison, solid, kholidays,
qtgraphicaleffects, qtquickcontrols, qtquickcontrols2, qtscript, qttools,
qtwayland, qtx11extras,
@@ -26,11 +26,12 @@ mkDerivation {
buildInputs = [
isocodes libdbusmenu libSM libXcursor libXtst pam wayland
- baloo kactivities kcmutils kconfig kcrash kdbusaddons kdeclarative
- kdelibs4support kdesu kglobalaccel kidletime kjsembed knewstuff
- knotifyconfig kpackage krunner kscreenlocker ktexteditor ktextwidgets
- kwallet kwayland kwin kxmlrpcclient libkscreen libksysguard libqalculate
- networkmanager-qt phonon plasma-framework prison solid kholidays
+ baloo kactivities kactivities-stats kcmutils kconfig kcrash kdbusaddons
+ kdeclarative kdelibs4support kdesu kglobalaccel kidletime kjsembed knewstuff
+ knotifyconfig kpackage kpeople krunner kscreenlocker ktexteditor
+ ktextwidgets kwallet kwayland kwin kxmlrpcclient libkscreen libksysguard
+ libqalculate networkmanager-qt phonon plasma-framework prison solid
+ kholidays
qtgraphicaleffects qtquickcontrols qtquickcontrols2 qtscript qtwayland qtx11extras
];
@@ -38,41 +39,22 @@ mkDerivation {
outputs = [ "out" "dev" ];
cmakeFlags = [
- "-DNIXPKGS_XMESSAGE=${getBin xmessage}/bin/xmessage"
- "-DNIXPKGS_MKDIR=${getBin coreutils}/bin/mkdir"
- "-DNIXPKGS_XRDB=${getBin xrdb}/bin/xrdb"
- "-DNIXPKGS_QTPATHS=${getBin qttools}/bin/qtpaths"
- "-DNIXPKGS_XSETROOT=${getBin xsetroot}/bin/xsetroot"
- "-DNIXPKGS_XPROP=${getBin xprop}/bin/xprop"
- "-DNIXPKGS_ID=${getBin coreutils}/bin/id"
- "-DNIXPKGS_DBUS_UPDATE_ACTIVATION_ENVIRONMENT=${getBin dbus}/bin/dbus-update-activation-environment"
- "-DNIXPKGS_START_KDEINIT_WRAPPER=${getLib kinit}/libexec/kf5/start_kdeinit_wrapper"
- "-DNIXPKGS_QDBUS=${getBin qttools}/bin/qdbus"
- "-DNIXPKGS_KWRAPPER5=${getBin kinit}/bin/kwrapper5"
- "-DNIXPKGS_KREADCONFIG5=${getBin kconfig}/bin/kreadconfig5"
- "-DNIXPKGS_GREP=${getBin gnugrep}/bin/grep"
- "-DNIXPKGS_KDEINIT5_SHUTDOWN=${getBin kinit}/bin/kdeinit5_shutdown"
- "-DNIXPKGS_SED=${getBin gnused}/bin/sed"
- "-DNIXPKGS_WALLPAPER_INSTALL_DIR=${getBin breeze-qt5}/share/wallpapers/"
+ ''-DNIXPKGS_BREEZE_WALLPAPERS=${getBin breeze-qt5}/share/wallpapers''
];
- # To regenerate ./plasma-workspace.patch,
- #
- # > git clone https://github.com/ttuegel/plasma-workspace
- # > cd plasma-workspace
- # > git checkout nixpkgs/$x.$y # where $x.$y.$z == $version
- # ... make some commits ...
- # > git diff v$x.$y.$z
- #
- # Add upstream patches to the list below. For new patchs, particularly if not
- # submitted upstream, please make a pull request and add it to
- # ./plasma-workspace.patch.
patches = [
- ./plasma-workspace.patch
+ ./0001-startkde.patch
+ ./0002-absolute-wallpaper-install-dir.patch
];
- preConfigure = ''
- NIX_CFLAGS_COMPILE+=" -DNIXPKGS_KDOSTARTUPCONFIG5=\"''${!outputBin}/bin/kdostartupconfig5\""
- cmakeFlags+=" -DNIXPKGS_STARTPLASMA=''${!outputBin}/libexec/startplasma"
- '';
+
+ NIX_CFLAGS_COMPILE = [
+ ''-DNIXPKGS_XMESSAGE="${getBin xmessage}/bin/xmessage"''
+ ''-DNIXPKGS_XRDB="${getBin xrdb}/bin/xrdb"''
+ ''-DNIXPKGS_XSETROOT="${getBin xsetroot}/bin/xsetroot"''
+ ''-DNIXPKGS_XPROP="${getBin xprop}/bin/xprop"''
+ ''-DNIXPKGS_DBUS_UPDATE_ACTIVATION_ENVIRONMENT="${getBin dbus}/bin/dbus-update-activation-environment"''
+ ''-DNIXPKGS_START_KDEINIT_WRAPPER="${getLib kinit}/libexec/kf5/start_kdeinit_wrapper"''
+ ''-DNIXPKGS_KDEINIT5_SHUTDOWN="${getBin kinit}/bin/kdeinit5_shutdown"''
+ ];
}
diff --git a/pkgs/desktops/plasma-5/plasma-workspace/plasma-workspace.patch b/pkgs/desktops/plasma-5/plasma-workspace/plasma-workspace.patch
deleted file mode 100644
index 5159328ed3fe..000000000000
--- a/pkgs/desktops/plasma-5/plasma-workspace/plasma-workspace.patch
+++ /dev/null
@@ -1,1008 +0,0 @@
-diff --git a/sddm-theme/theme.conf.cmake b/sddm-theme/theme.conf.cmake
-index ea9a943..f98ddd2 100644
---- a/sddm-theme/theme.conf.cmake
-+++ b/sddm-theme/theme.conf.cmake
-@@ -2,4 +2,4 @@
- type=image
- color=#1d99f3
- fontSize=10
--background=${CMAKE_INSTALL_PREFIX}/${WALLPAPER_INSTALL_DIR}/Next/contents/images/5120x2880.png
-+background=${NIXPKGS_WALLPAPER_INSTALL_DIR}/Next/contents/images/5120x2880.png
-diff --git a/startkde/CMakeLists.txt b/startkde/CMakeLists.txt
-index 6a1a212..f03fd34 100644
---- a/startkde/CMakeLists.txt
-+++ b/startkde/CMakeLists.txt
-@@ -4,11 +4,6 @@ add_subdirectory(ksyncdbusenv)
- add_subdirectory(waitforname)
- add_subdirectory(kcheckrunning)
-
--#FIXME: reconsider, looks fishy
--if(NOT CMAKE_INSTALL_PREFIX STREQUAL "/usr")
-- set(EXPORT_XCURSOR_PATH "XCURSOR_PATH=${KDE_INSTALL_FULL_DATAROOTDIR}/icons:$XCURSOR_PATH\":~/.icons:/usr/share/icons:/usr/share/pixmaps:/usr/X11R6/lib/X11/icons\"; export XCURSOR_PATH")
--endif()
--
- configure_file(startkde.cmake ${CMAKE_CURRENT_BINARY_DIR}/startkde @ONLY)
- configure_file(startplasmacompositor.cmake ${CMAKE_CURRENT_BINARY_DIR}/startplasmacompositor @ONLY)
- configure_file(startplasma.cmake ${CMAKE_CURRENT_BINARY_DIR}/startplasma @ONLY)
-diff --git a/startkde/kstartupconfig/kstartupconfig.cpp b/startkde/kstartupconfig/kstartupconfig.cpp
-index 493218e..d507aa5 100644
---- a/startkde/kstartupconfig/kstartupconfig.cpp
-+++ b/startkde/kstartupconfig/kstartupconfig.cpp
-@@ -147,5 +147,5 @@ int main()
- fclose( keys );
- fclose( config );
- doit:
-- return system( "kdostartupconfig5" );
-+ return system( NIXPKGS_KDOSTARTUPCONFIG5 );
- }
-diff --git a/startkde/startkde.cmake b/startkde/startkde.cmake
-index b68f0c6..97a13a1 100644
---- a/startkde/startkde.cmake
-+++ b/startkde/startkde.cmake
-@@ -1,22 +1,31 @@
- #!/bin/sh
- #
--# DEFAULT Plasma STARTUP SCRIPT ( @PROJECT_VERSION@ )
-+# NIXPKGS KDE STARTUP SCRIPT ( @PROJECT_VERSION@ )
- #
-
-+if test "x$1" = x--failsafe; then
-+ KDE_FAILSAFE=1 # General failsafe flag
-+ KWIN_COMPOSE=N # Disable KWin's compositing
-+ QT_XCB_FORCE_SOFTWARE_OPENGL=1
-+ export KWIN_COMPOSE KDE_FAILSAFE QT_XCB_FORCE_SOFTWARE_OPENGL
-+fi
-+
- # When the X server dies we get a HUP signal from xinit. We must ignore it
- # because we still need to do some cleanup.
- trap 'echo GOT SIGHUP' HUP
-
--# Check if a Plasma session already is running and whether it's possible to connect to X
--kcheckrunning
-+# we have to unset this for Darwin since it will screw up KDE's dynamic-loading
-+unset DYLD_FORCE_FLAT_NAMESPACE
-+
-+# Check if a KDE session already is running and whether it's possible to connect to X
-+@CMAKE_INSTALL_FULL_BINDIR@/kcheckrunning
- kcheckrunning_result=$?
--if test $kcheckrunning_result -eq 0 ; then
-- echo "Plasma seems to be already running on this display."
-- xmessage -geometry 500x100 "Plasma seems to be already running on this display." > /dev/null 2>/dev/null
-- exit 1
--elif test $kcheckrunning_result -eq 2 ; then
-- echo "\$DISPLAY is not set or cannot connect to the X server."
-- exit 1
-+if [ $kcheckrunning_result -eq 0 ]; then
-+ echo "KDE seems to be already running on this display."
-+ exit 1
-+elif [ $kcheckrunning_result -eq 2 ]; then
-+ echo "\$DISPLAY is not set or cannot connect to the X server."
-+ exit 1
- fi
-
- # Boot sequence:
-@@ -33,62 +42,143 @@ fi
- #
- # * Then ksmserver is started which takes control of the rest of the startup sequence
-
--if [ ${XDG_CONFIG_HOME} ]; then
-- configDir=$XDG_CONFIG_HOME;
--else
-- configDir=${HOME}/.config; #this is the default, http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
-+export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
-+@NIXPKGS_MKDIR@ -p "$XDG_CONFIG_HOME"
-+
-+# The KDE icon cache is supposed to update itself
-+# automatically, but it uses the timestamp on the icon
-+# theme directory as a trigger. Since in Nix the
-+# timestamp is always the same, this doesn't work. So as
-+# a workaround, nuke the icon cache on login. This isn't
-+# perfect, since it may require logging out after
-+# installing new applications to update the cache.
-+# See http://lists-archives.org/kde-devel/26175-what-when-will-icon-cache-refresh.html
-+rm -fv $HOME/.cache/icon-cache.kcache
-+
-+# xdg-desktop-settings generates this empty file but
-+# it makes kbuildsyscoca5 fail silently. To fix this
-+# remove that menu if it exists.
-+rm -fv $HOME/.config/menus/applications-merged/xdg-desktop-menu-dummy.menu
-+
-+# Remove the kbuildsyscoca5 cache. It will be regenerated immediately after.
-+# This is necessary for kbuildsyscoca5 to recognize that software that has been removed.
-+rm -fv $HOME/.cache/ksycoca*
-+
-+# Qt writes a weird ‘libraryPath’ line to
-+# ~/.config/Trolltech.conf that causes the KDE plugin
-+# paths of previous KDE invocations to be searched.
-+# Obviously using mismatching KDE libraries is potentially
-+# disastrous, so here we nuke references to the Nix store
-+# in Trolltech.conf. A better solution would be to stop
-+# Qt from doing this wackiness in the first place.
-+if [ -e $XDG_CONFIG_HOME/Trolltech.conf ]; then
-+ @NIXPKGS_SED@ -e '/nix\\store\|nix\/store/ d' -i $XDG_CONFIG_HOME/Trolltech.conf
- fi
- sysConfigDirs=${XDG_CONFIG_DIRS:-/etc/xdg}
-
--# We need to create config folder so we can write startupconfigkeys
--mkdir -p $configDir
-+@NIXPKGS_KBUILDSYCOCA5@
-+
-+# Set the default GTK 2 theme
-+gtkrc2="$HOME/.gtkrc-2.0"
-+breeze_gtkrc2="/run/current-system/sw/share/themes/Breeze/gtk-2.0/gtkrc"
-+if ! [ -e "$gtkrc2" ] && [ -e "$breeze_gtkrc2" ]; then
-+ cat >"$gtkrc2" <<EOF
-+# Default GTK+ 2 config for NixOS KDE 5
-+include "$breeze_gtkrc2"
-+style "user-font"
-+{
-+ font_name="Sans Serif Regular"
-+}
-+widget_class "*" style "user-font"
-+gtk-font-name="Sans Serif Regular 10"
-+gtk-theme-name="Breeze"
-+gtk-icon-theme-name="breeze"
-+gtk-fallback-icon-theme="hicolor"
-+gtk-cursor-theme-name="breeze_cursors"
-+gtk-toolbar-style=GTK_TOOLBAR_ICONS
-+gtk-menu-images=1
-+gtk-button-images=1
-+EOF
-+fi
-+
-+# Set the default GTK 3 theme
-+gtk3_settings="$XDG_CONFIG_HOME/gtk-3.0/settings.ini"
-+breeze_gtk3="/run/current-system/sw/share/themes/Breeze/gtk-3.0"
-+if ! [ -e "$gtk3_settings" ] && [ -e "$breeze_gtk" ]; then
-+ mkdir -p $(dirname "$gtk3_settings")
-+ cat >"$gtk3_settings" <<EOF
-+[Settings]
-+gtk-font-name=Sans Serif Regular 10
-+gtk-theme-name=Breeze
-+gtk-icon-theme-name=breeze
-+gtk-fallback-icon-theme=hicolor
-+gtk-cursor-theme-name=breeze_cursors
-+gtk-toolbar-style=GTK_TOOLBAR_ICONS
-+gtk-menu-images=1
-+gtk-button-images=1
-+EOF
-+fi
-+
-+kcminputrc="$XDG_CONFIG_HOME/kcminputrc"
-+if ! [ -e "$kcminputrc" ]; then
-+ cat >"$kcminputrc" <<EOF
-+[Mouse]
-+cursorTheme=breeze_cursors
-+cursorSize=0
-+EOF
-+fi
-
- #This is basically setting defaults so we can use them with kstartupconfig5
--cat >$configDir/startupconfigkeys <<EOF
-+cat >"$XDG_CONFIG_HOME/startupconfigkeys" <<EOF
- kcminputrc Mouse cursorTheme 'breeze_cursors'
- kcminputrc Mouse cursorSize ''
--ksplashrc KSplash Theme Breeze
-+ksplashrc KSplash Theme org.kde.breeze.desktop
- ksplashrc KSplash Engine KSplashQML
- kdeglobals KScreen ScaleFactor ''
- kdeglobals KScreen ScreenScaleFactors ''
- kcmfonts General forceFontDPI 0
-+kcmfonts General dontChangeAASettings true
- EOF
-
- # preload the user's locale on first start
--plasmalocalerc=$configDir/plasma-localerc
--test -f $plasmalocalerc || {
--cat >$plasmalocalerc <<EOF
-+plasmalocalerc="$XDG_CONFIG_HOME/plasma-localerc"
-+if ! [ -f "$plasmalocalerc" ]; then
-+ cat >"$plasmalocalerc" <<EOF
- [Formats]
- LANG=$LANG
- EOF
--}
-+fi
-
- # export LC_* variables set by kcmshell5 formats into environment
- # so it can be picked up by QLocale and friends.
--exportformatssettings=$configDir/plasma-locale-settings.sh
--test -f $exportformatssettings && {
-- . $exportformatssettings
-