about summary refs log tree commit diff
path: root/pkgs/desktops
diff options
context:
space:
mode:
authorAndreas <hamburger1984@gmail.com>2022-05-20 18:13:19 +0200
committerPeter Hoeg <peter@hoeg.com>2022-06-15 14:53:40 +0800
commit08555e82bae3db8bcac909c78120c32dd9f318d8 (patch)
tree997d8402fd87f57e9896b8f37258ddeae7280922 /pkgs/desktops
parent6cae76a505f7a0a5bd536ad4c54771aa77d9f0a2 (diff)
kwin: fix build for 5.24.90
Diffstat (limited to 'pkgs/desktops')
-rw-r--r--pkgs/desktops/plasma-5/kwin/0001-NixOS-Unwrap-executable-name-for-.desktop-search.patch12
-rw-r--r--pkgs/desktops/plasma-5/kwin/0002-xwayland.patch16
-rw-r--r--pkgs/desktops/plasma-5/kwin/default.nix12
3 files changed, 24 insertions, 16 deletions
diff --git a/pkgs/desktops/plasma-5/kwin/0001-NixOS-Unwrap-executable-name-for-.desktop-search.patch b/pkgs/desktops/plasma-5/kwin/0001-NixOS-Unwrap-executable-name-for-.desktop-search.patch
index 9bade4eab6a9c..cdc8245ce5b5a 100644
--- a/pkgs/desktops/plasma-5/kwin/0001-NixOS-Unwrap-executable-name-for-.desktop-search.patch
+++ b/pkgs/desktops/plasma-5/kwin/0001-NixOS-Unwrap-executable-name-for-.desktop-search.patch
@@ -13,7 +13,7 @@ Co-authored-by: Yaroslav Bolyukin <iam@lach.pw>
 ---
  src/nixos_utils.h     | 41 +++++++++++++++++++++++++++++++++++++++++
  src/service_utils.h   |  4 +++-
- src/waylandclient.cpp |  5 ++++-
+ src/waylandwindow.cpp |  5 ++++-
  3 files changed, 48 insertions(+), 2 deletions(-)
  create mode 100644 src/nixos_utils.h
 
@@ -87,10 +87,10 @@ index 8a70c1f..475b15d 100644
      // needed to be able to use the logging category in a header static function
      static QLoggingCategory KWIN_UTILS ("KWIN_UTILS", QtWarningMsg);
      const auto servicesFound = KApplicationTrader::query([&executablePath] (const KService::Ptr &service) {
-diff --git a/src/waylandclient.cpp b/src/waylandclient.cpp
+diff --git a/src/waylandwindow.cpp b/src/waylandwindow.cpp
 index fd2c0c1..ae8cf96 100644
---- a/src/waylandclient.cpp
-+++ b/src/waylandclient.cpp
+--- a/src/waylandwindow.cpp
++++ b/src/waylandwindow.cpp
 @@ -10,6 +10,7 @@
  #include "screens.h"
  #include "wayland_server.h"
@@ -99,9 +99,9 @@ index fd2c0c1..ae8cf96 100644
  
  #include <KWaylandServer/display.h>
  #include <KWaylandServer/clientbuffer.h>
-@@ -173,7 +174,9 @@ void WaylandClient::updateIcon()
+@@ -173,7 +174,9 @@ void WaylandWindow::updateIcon()
  
- void WaylandClient::updateResourceName()
+ void WaylandWindow::updateResourceName()
  {
 -    const QFileInfo fileInfo(surface()->client()->executablePath());
 +    const QString in_path = surface()->client()->executablePath();
diff --git a/pkgs/desktops/plasma-5/kwin/0002-xwayland.patch b/pkgs/desktops/plasma-5/kwin/0002-xwayland.patch
index 9e37d51c49963..dfd25e727f940 100644
--- a/pkgs/desktops/plasma-5/kwin/0002-xwayland.patch
+++ b/pkgs/desktops/plasma-5/kwin/0002-xwayland.patch
@@ -4,22 +4,22 @@ Date: Mon, 27 Jan 2020 05:31:23 -0600
 Subject: [PATCH 2/3] xwayland
 
 ---
- src/xwl/xwayland.cpp | 2 +-
+ src/xwayland/xwaylandlauncher.cpp | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/src/xwl/xwayland.cpp b/src/xwl/xwayland.cpp
+diff --git a/src/xwayland/xwaylandlauncher.cpp b/src/xwayland/xwaylandlauncher.cpp
 index 57efdde..a211a58 100644
---- a/src/xwl/xwayland.cpp
-+++ b/src/xwl/xwayland.cpp
-@@ -124,7 +124,7 @@ void Xwayland::start()
+--- a/src/xwayland/xwaylandlauncher.cpp
++++ b/src/xwayland/xwaylandlauncher.cpp
+@@ -163,7 +163,7 @@ void Xwayland::start()
  
-     m_xwaylandProcess = new Process(this);
+     m_xwaylandProcess = new QProcess(this);
      m_xwaylandProcess->setProcessChannelMode(QProcess::ForwardedErrorChannel);
 -    m_xwaylandProcess->setProgram(QStringLiteral("Xwayland"));
 +    m_xwaylandProcess->setProgram(QLatin1String(NIXPKGS_XWAYLAND));
-     QProcessEnvironment env = m_app->processStartupEnvironment();
+     QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
      env.insert("WAYLAND_SOCKET", QByteArray::number(wlfd));
-     env.insert("EGL_PLATFORM", QByteArrayLiteral("DRM"));
+     if (qEnvironmentVariableIsSet("KWIN_XWAYLAND_DEBUG")) {
 -- 
 2.29.2
 
diff --git a/pkgs/desktops/plasma-5/kwin/default.nix b/pkgs/desktops/plasma-5/kwin/default.nix
index db0485db8873d..847ef41ee88b7 100644
--- a/pkgs/desktops/plasma-5/kwin/default.nix
+++ b/pkgs/desktops/plasma-5/kwin/default.nix
@@ -4,6 +4,7 @@
 
   libepoxy, lcms2, libICE, libSM, libcap, libdrm, libinput, libxkbcommon, mesa,
   pipewire, udev, wayland, xcb-util-cursor, xwayland,
+  plasma-wayland-protocols, wayland-protocols, libxcvt,
 
   qtdeclarative, qtmultimedia, qtquickcontrols2, qtscript, qtsensors,
   qtvirtualkeyboard, qtx11extras,
@@ -11,8 +12,9 @@
   breeze-qt5, kactivities, kcompletion, kcmutils, kconfig, kconfigwidgets,
   kcoreaddons, kcrash, kdeclarative, kdecoration, kglobalaccel, ki18n,
   kiconthemes, kidletime, kinit, kio, knewstuff, knotifications, kpackage,
-  krunner, kscreenlocker, kservice, kwayland, kwayland-server, kwidgetsaddons,
+  krunner, kscreenlocker, kservice, kwayland, kwidgetsaddons,
   kwindowsystem, kxmlgui, plasma-framework, libqaccessibilityclient,
+  python3
 }:
 
 # TODO (ttuegel): investigate qmlplugindump failure
@@ -23,6 +25,7 @@ mkDerivation {
   buildInputs = [
     libepoxy lcms2 libICE libSM libcap libdrm libinput libxkbcommon mesa pipewire
     udev wayland xcb-util-cursor xwayland
+    libxcvt plasma-wayland-protocols wayland-protocols
 
     qtdeclarative qtmultimedia qtquickcontrols2 qtscript qtsensors
     qtvirtualkeyboard qtx11extras
@@ -30,11 +33,16 @@ mkDerivation {
     breeze-qt5 kactivities kcmutils kcompletion kconfig kconfigwidgets
     kcoreaddons kcrash kdeclarative kdecoration kglobalaccel ki18n kiconthemes
     kidletime kinit kio knewstuff knotifications kpackage krunner kscreenlocker
-    kservice kwayland kwayland-server kwidgetsaddons kwindowsystem kxmlgui
+    kservice kwayland kwidgetsaddons kwindowsystem kxmlgui
     plasma-framework libqaccessibilityclient
 
   ];
   outputs = [ "out" "dev" ];
+
+  postPatch = ''
+    patchShebangs src/effects/strip-effect-metadata.py
+  '';
+
   patches = [
     ./0001-follow-symlinks.patch
     ./0002-xwayland.patch