diff options
Diffstat (limited to 'pkgs/kde/plasma')
-rw-r--r-- | pkgs/kde/plasma/default.nix | 1 | ||||
-rw-r--r-- | pkgs/kde/plasma/kinfocenter/0001-tool-paths.patch | 26 | ||||
-rw-r--r-- | pkgs/kde/plasma/krdp/default.nix | 31 | ||||
-rw-r--r-- | pkgs/kde/plasma/krdp/hardcode-openssl-path.patch | 13 | ||||
-rw-r--r-- | pkgs/kde/plasma/kwayland/default.nix | 3 | ||||
-rw-r--r-- | pkgs/kde/plasma/kwin/0001-Lower-CAP_SYS_NICE-from-the-ambient-set.patch | 40 | ||||
-rw-r--r-- | pkgs/kde/plasma/kwin/default.nix | 12 | ||||
-rw-r--r-- | pkgs/kde/plasma/layer-shell-qt/default.nix | 4 | ||||
-rw-r--r-- | pkgs/kde/plasma/plasma-desktop/default.nix | 5 | ||||
-rw-r--r-- | pkgs/kde/plasma/plasma-desktop/wallpaper-paths.patch (renamed from pkgs/kde/plasma/plasma-workspace/wallpaper-paths.patch) | 4 | ||||
-rw-r--r-- | pkgs/kde/plasma/plasma-mobile/default.nix | 8 | ||||
-rw-r--r-- | pkgs/kde/plasma/plasma-workspace/default.nix | 10 | ||||
-rw-r--r-- | pkgs/kde/plasma/xdg-desktop-portal-kde/default.nix | 4 |
13 files changed, 133 insertions, 28 deletions
diff --git a/pkgs/kde/plasma/default.nix b/pkgs/kde/plasma/default.nix index a29c1fc36d2e8..6fa4d2383f994 100644 --- a/pkgs/kde/plasma/default.nix +++ b/pkgs/kde/plasma/default.nix @@ -17,6 +17,7 @@ kinfocenter = callPackage ./kinfocenter {}; kmenuedit = callPackage ./kmenuedit {}; kpipewire = callPackage ./kpipewire {}; + krdp = callPackage ./krdp {}; kscreen = callPackage ./kscreen {}; kscreenlocker = callPackage ./kscreenlocker {}; ksshaskpass = callPackage ./ksshaskpass {}; diff --git a/pkgs/kde/plasma/kinfocenter/0001-tool-paths.patch b/pkgs/kde/plasma/kinfocenter/0001-tool-paths.patch index 543aecdec43fc..84609b2ff2230 100644 --- a/pkgs/kde/plasma/kinfocenter/0001-tool-paths.patch +++ b/pkgs/kde/plasma/kinfocenter/0001-tool-paths.patch @@ -1,7 +1,7 @@ -diff --git a/Modules/kwinsupportinfo/kcm_kwinsupportinfo.json.in b/Modules/kwinsupportinfo/kcm_kwinsupportinfo.json.in +diff --git a/kcms/kwinsupportinfo/kcm_kwinsupportinfo.json.in b/kcms/kwinsupportinfo/kcm_kwinsupportinfo.json.in index 0de6973e..30035768 100644 ---- a/Modules/kwinsupportinfo/kcm_kwinsupportinfo.json.in -+++ b/Modules/kwinsupportinfo/kcm_kwinsupportinfo.json.in +--- a/kcms/kwinsupportinfo/kcm_kwinsupportinfo.json.in ++++ b/kcms/kwinsupportinfo/kcm_kwinsupportinfo.json.in @@ -85,6 +85,6 @@ "Name[zh_CN]": "窗口管理器", "Name[zh_TW]": "視窗管理員" @@ -10,23 +10,23 @@ index 0de6973e..30035768 100644 + "TryExec": "@qdbus@", "X-KDE-KInfoCenter-Category": "graphical_information" } -diff --git a/Modules/kwinsupportinfo/main.cpp b/Modules/kwinsupportinfo/main.cpp +diff --git a/kcms/kwinsupportinfo/main.cpp b/kcms/kwinsupportinfo/main.cpp index 6ae168b5..89d0a2ff 100644 ---- a/Modules/kwinsupportinfo/main.cpp -+++ b/Modules/kwinsupportinfo/main.cpp +--- a/kcms/kwinsupportinfo/main.cpp ++++ b/kcms/kwinsupportinfo/main.cpp @@ -18,7 +18,7 @@ public: explicit KCMKWinSupportInfo(QObject *parent, const KPluginMetaData &data) : KQuickConfigModule(parent, data) { -- m_outputContext = new CommandOutputContext(QLibraryInfo::location(QLibraryInfo::BinariesPath) + QStringLiteral("/qdbus"), +- m_outputContext = new CommandOutputContext(QLibraryInfo::path(QLibraryInfo::BinariesPath) + QStringLiteral("/qdbus"), + m_outputContext = new CommandOutputContext(QStringLiteral("@qdbus@"), {QStringLiteral("org.kde.KWin"), QStringLiteral("/KWin"), QStringLiteral("supportInformation")}, parent); } -diff --git a/Modules/xserver/kcm_xserver.json b/Modules/xserver/kcm_xserver.json +diff --git a/kcms/xserver/kcm_xserver.json b/kcms/xserver/kcm_xserver.json index b3f1ce24..dc610932 100644 ---- a/Modules/xserver/kcm_xserver.json -+++ b/Modules/xserver/kcm_xserver.json +--- a/kcms/xserver/kcm_xserver.json ++++ b/kcms/xserver/kcm_xserver.json @@ -141,7 +141,7 @@ "Name[zh_CN]": "X 服务器", "Name[zh_TW]": "X 伺服器" @@ -36,10 +36,10 @@ index b3f1ce24..dc610932 100644 "X-DocPath": "kinfocenter/graphical.html#xserver", "X-KDE-KInfoCenter-Category": "graphical_information", "X-KDE-Keywords": "X,X-Server,XServer,XFree86,Display,VideoCard,System Information", -diff --git a/Modules/xserver/main.cpp b/Modules/xserver/main.cpp +diff --git a/kcms/xserver/main.cpp b/kcms/xserver/main.cpp index 6d4d1e25..d39fe19e 100644 ---- a/Modules/xserver/main.cpp -+++ b/Modules/xserver/main.cpp +--- a/kcms/xserver/main.cpp ++++ b/kcms/xserver/main.cpp @@ -16,7 +16,7 @@ public: explicit KCMXServer(QObject *parent, const KPluginMetaData &data) : KQuickConfigModule(parent, data) diff --git a/pkgs/kde/plasma/krdp/default.nix b/pkgs/kde/plasma/krdp/default.nix new file mode 100644 index 0000000000000..38208475ca279 --- /dev/null +++ b/pkgs/kde/plasma/krdp/default.nix @@ -0,0 +1,31 @@ +{ + lib, + mkKdeDerivation, + substituteAll, + openssl, + pkg-config, + qtkeychain, + qtwayland, + freerdp, + wayland, + wayland-protocols, +}: +mkKdeDerivation { + pname = "krdp"; + + patches = [ + (substituteAll { + src = ./hardcode-openssl-path.patch; + openssl = lib.getExe openssl; + }) + ]; + + extraNativeBuildInputs = [pkg-config]; + extraBuildInputs = [ + qtkeychain + qtwayland + freerdp + wayland + wayland-protocols + ]; +} diff --git a/pkgs/kde/plasma/krdp/hardcode-openssl-path.patch b/pkgs/kde/plasma/krdp/hardcode-openssl-path.patch new file mode 100644 index 0000000000000..8ef18364b72ca --- /dev/null +++ b/pkgs/kde/plasma/krdp/hardcode-openssl-path.patch @@ -0,0 +1,13 @@ +diff --git a/src/kcm/kcmkrdpserver.cpp b/src/kcm/kcmkrdpserver.cpp +index 3af527c..3433a84 100644 +--- a/src/kcm/kcmkrdpserver.cpp ++++ b/src/kcm/kcmkrdpserver.cpp +@@ -218,7 +218,7 @@ void KRDPServerConfig::generateCertificate() + QString certificateKeyPath(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/krdpserver/krdp.key")); + qDebug(KRDPKCM) << "Generating certificate files to: " << certificatePath << " and " << certificateKeyPath; + QProcess sslProcess; +- sslProcess.start(u"openssl"_qs, ++ sslProcess.start(u"@openssl@"_qs, + { + u"req"_qs, + u"-nodes"_qs, diff --git a/pkgs/kde/plasma/kwayland/default.nix b/pkgs/kde/plasma/kwayland/default.nix index 341fd8d356082..86713b834bec7 100644 --- a/pkgs/kde/plasma/kwayland/default.nix +++ b/pkgs/kde/plasma/kwayland/default.nix @@ -2,11 +2,10 @@ mkKdeDerivation, pkg-config, qtwayland, - wayland-protocols, }: mkKdeDerivation { pname = "kwayland"; extraNativeBuildInputs = [pkg-config]; - extraBuildInputs = [qtwayland wayland-protocols]; + extraBuildInputs = [qtwayland]; } diff --git a/pkgs/kde/plasma/kwin/0001-Lower-CAP_SYS_NICE-from-the-ambient-set.patch b/pkgs/kde/plasma/kwin/0001-Lower-CAP_SYS_NICE-from-the-ambient-set.patch new file mode 100644 index 0000000000000..e6408605aa431 --- /dev/null +++ b/pkgs/kde/plasma/kwin/0001-Lower-CAP_SYS_NICE-from-the-ambient-set.patch @@ -0,0 +1,40 @@ +From 232e480ab1303f37d37d295b57fdcbb6b6648bca Mon Sep 17 00:00:00 2001 +From: Alois Wohlschlager <alois1@gmx-topmail.de> +Date: Sun, 7 Aug 2022 16:12:31 +0200 +Subject: [PATCH] Lower CAP_SYS_NICE from the ambient set + +The capabilities wrapper raises CAP_SYS_NICE into the ambient set so it +is inherited by the wrapped program. However, we don't want it to leak +into the entire desktop environment. + +Lower the capability again at startup so that the kernel will clear it +on exec. +--- + src/main_wayland.cpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/main_wayland.cpp b/src/main_wayland.cpp +index 1720e14e7..f2bb446b0 100644 +--- a/src/main_wayland.cpp ++++ b/src/main_wayland.cpp +@@ -39,7 +39,9 @@ + #include <QWindow> + #include <qplatformdefs.h> + ++#include <linux/capability.h> + #include <sched.h> ++#include <sys/prctl.h> + #include <sys/resource.h> + + #include <iomanip> +@@ -285,6 +287,7 @@ static QString automaticBackendSelection() + + int main(int argc, char *argv[]) + { ++ prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_LOWER, CAP_SYS_NICE, 0, 0); + KWin::Application::setupMalloc(); + KWin::Application::setupLocalizedString(); + KWin::gainRealTime(); +-- +2.37.1 + diff --git a/pkgs/kde/plasma/kwin/default.nix b/pkgs/kde/plasma/kwin/default.nix index fc5f00991d9ee..ffa7e146ece68 100644 --- a/pkgs/kde/plasma/kwin/default.nix +++ b/pkgs/kde/plasma/kwin/default.nix @@ -8,7 +8,9 @@ qtwayland, libinput, xorg, + xwayland, libdisplay-info, + libei, mesa, lcms2, libcap, @@ -26,12 +28,19 @@ mkKdeDerivation { # The rest are NixOS-specific hacks ./0003-plugins-qpa-allow-using-nixos-wrapper.patch ./0001-NixOS-Unwrap-executable-name-for-.desktop-search.patch + ./0001-Lower-CAP_SYS_NICE-from-the-ambient-set.patch ]; postPatch = '' patchShebangs src/plugins/strip-effect-metadata.py ''; + # TZDIR may be unset when running through the kwin_wayland wrapper, + # but we need it for the lockscreen clock to render + qtWrapperArgs = [ + "--set-default TZDIR /etc/zoneinfo" + ]; + extraNativeBuildInputs = [pkg-config python3]; extraBuildInputs = [ qtquick3d @@ -46,9 +55,12 @@ mkKdeDerivation { lcms2 libcap libdisplay-info + libei libinput pipewire xorg.libxcvt + # we need to provide this so it knows our xwayland supports new features + xwayland ]; } diff --git a/pkgs/kde/plasma/layer-shell-qt/default.nix b/pkgs/kde/plasma/layer-shell-qt/default.nix index 9783220cddf2d..dd7290379c5f2 100644 --- a/pkgs/kde/plasma/layer-shell-qt/default.nix +++ b/pkgs/kde/plasma/layer-shell-qt/default.nix @@ -2,12 +2,10 @@ mkKdeDerivation, qtwayland, pkg-config, - wayland, - wayland-protocols, }: mkKdeDerivation { pname = "layer-shell-qt"; extraNativeBuildInputs = [pkg-config]; - extraBuildInputs = [qtwayland wayland wayland-protocols]; + extraBuildInputs = [qtwayland]; } diff --git a/pkgs/kde/plasma/plasma-desktop/default.nix b/pkgs/kde/plasma/plasma-desktop/default.nix index 8ee90dee3a67a..a84a55779d365 100644 --- a/pkgs/kde/plasma/plasma-desktop/default.nix +++ b/pkgs/kde/plasma/plasma-desktop/default.nix @@ -10,6 +10,7 @@ pkg-config, qtsvg, qtwayland, + breeze, kaccounts-integration, SDL2, xkeyboard_config, @@ -39,6 +40,10 @@ in }) ./tzdir.patch ./no-discover-shortcut.patch + (substituteAll { + src = ./wallpaper-paths.patch; + wallpapers = "${lib.getBin breeze}/share/wallpapers"; + }) ]; extraNativeBuildInputs = [pkg-config]; diff --git a/pkgs/kde/plasma/plasma-workspace/wallpaper-paths.patch b/pkgs/kde/plasma/plasma-desktop/wallpaper-paths.patch index 050200a8411f1..67d46bc6879ef 100644 --- a/pkgs/kde/plasma/plasma-workspace/wallpaper-paths.patch +++ b/pkgs/kde/plasma/plasma-desktop/wallpaper-paths.patch @@ -1,5 +1,5 @@ ---- a/lookandfeel/sddm-theme/theme.conf.cmake -+++ b/lookandfeel/sddm-theme/theme.conf.cmake +--- a/sddm-theme/theme.conf.cmake ++++ b/sddm-theme/theme.conf.cmake @@ -4,5 +4,5 @@ logo=${KDE_INSTALL_FULL_DATADIR}/sddm/themes/breeze/default-logo.svg type=image color=#1d99f3 diff --git a/pkgs/kde/plasma/plasma-mobile/default.nix b/pkgs/kde/plasma/plasma-mobile/default.nix index 92bb1d66d5e30..8c6766e13b03a 100644 --- a/pkgs/kde/plasma/plasma-mobile/default.nix +++ b/pkgs/kde/plasma/plasma-mobile/default.nix @@ -2,10 +2,18 @@ mkKdeDerivation, pkg-config, qtsensors, + plasma-workspace, }: mkKdeDerivation { pname = "plasma-mobile"; extraNativeBuildInputs = [pkg-config]; extraBuildInputs = [qtsensors]; + postFixup = '' + substituteInPlace "$out/share/wayland-sessions/plasma-mobile.desktop" \ + --replace-fail \ + "$out/libexec/plasma-dbus-run-session-if-needed" \ + "${plasma-workspace}/libexec/plasma-dbus-run-session-if-needed" + ''; + passthru.providedSessions = [ "plasma-mobile" ]; } diff --git a/pkgs/kde/plasma/plasma-workspace/default.nix b/pkgs/kde/plasma/plasma-workspace/default.nix index 24e41b971cf05..e89063876a867 100644 --- a/pkgs/kde/plasma/plasma-workspace/default.nix +++ b/pkgs/kde/plasma/plasma-workspace/default.nix @@ -10,7 +10,6 @@ libcanberra, libqalculate, pipewire, - breeze, qttools, qqc2-breeze-style, gpsd, @@ -25,12 +24,13 @@ mkKdeDerivation { xsetroot = "${lib.getBin xorg.xsetroot}/bin/xsetroot"; qdbus = "${lib.getBin qttools}/bin/qdbus"; }) - (substituteAll { - src = ./wallpaper-paths.patch; - wallpapers = "${lib.getBin breeze}/share/wallpapers"; - }) ]; + postInstall = '' + # Prevent patching this shell file, it only is used by sourcing it from /bin/sh. + chmod -x $out/libexec/plasma-sourceenv.sh + ''; + extraNativeBuildInputs = [pkg-config spirv-tools]; extraBuildInputs = [ qtsvg diff --git a/pkgs/kde/plasma/xdg-desktop-portal-kde/default.nix b/pkgs/kde/plasma/xdg-desktop-portal-kde/default.nix index 9d5be65fe097b..7563e934e502f 100644 --- a/pkgs/kde/plasma/xdg-desktop-portal-kde/default.nix +++ b/pkgs/kde/plasma/xdg-desktop-portal-kde/default.nix @@ -2,13 +2,11 @@ mkKdeDerivation, pkg-config, qtwayland, - wayland, - wayland-protocols, cups, }: mkKdeDerivation { pname = "xdg-desktop-portal-kde"; extraNativeBuildInputs = [pkg-config]; - extraBuildInputs = [qtwayland wayland wayland-protocols cups]; + extraBuildInputs = [qtwayland cups]; } |