summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers/telegram/tdesktop
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2022-04-18 11:47:53 +0300
committerK900 <me@0upti.me>2022-04-18 11:47:53 +0300
commita77406f1f203da1c423adb25ea48fea634a206ef (patch)
treec538ec65d1a1293a957aa83ee78c8144f68c0ff9 /pkgs/applications/networking/instant-messengers/telegram/tdesktop
parentf3696771fe12a0f2a2b46324fcf182bc102ee3c2 (diff)
downloadnixpkgs-a77406f1f203da1c423adb25ea48fea634a206ef.tar
nixpkgs-a77406f1f203da1c423adb25ea48fea634a206ef.tar.gz
nixpkgs-a77406f1f203da1c423adb25ea48fea634a206ef.tar.bz2
nixpkgs-a77406f1f203da1c423adb25ea48fea634a206ef.tar.lz
nixpkgs-a77406f1f203da1c423adb25ea48fea634a206ef.tar.xz
nixpkgs-a77406f1f203da1c423adb25ea48fea634a206ef.tar.zst
nixpkgs-a77406f1f203da1c423adb25ea48fea634a206ef.zip
tdesktop: fix build with kwayland 5.94
Hopefully a temporary hack until upstream fixes this
(or nixpkgs ships qt6)
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/telegram/tdesktop')
-rw-r--r--pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix8
-rw-r--r--pkgs/applications/networking/instant-messengers/telegram/tdesktop/kf594.diff57
2 files changed, 65 insertions, 0 deletions
diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
index c23e416d2c6..b5b30b08348 100644
--- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
+++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
@@ -82,6 +82,14 @@ env.mkDerivation rec {
     sha256 = "0zcjm08nfdlxrsv0fi6dqg3lk52bcvsxnsf6jm5fv6gf5v9ia3hq";
   };
 
+  patches = [
+    # fix build with KWayland 5.94+
+    # cf. https://invent.kde.org/frameworks/kwayland/-/commit/de442e4a94e249a29cf2e005db8e0a5e4a6a13ed
+    # upstream bug: https://github.com/telegramdesktop/tdesktop/issues/24375
+    # FIXME remove when no longer necessary
+    ./kf594.diff
+  ];
+
   postPatch = ''
     substituteInPlace Telegram/CMakeLists.txt \
       --replace '"''${TDESKTOP_LAUNCHER_BASENAME}.appdata.xml"' '"''${TDESKTOP_LAUNCHER_BASENAME}.metainfo.xml"'
diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/kf594.diff b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/kf594.diff
new file mode 100644
index 00000000000..0fa2d8bc8f6
--- /dev/null
+++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/kf594.diff
@@ -0,0 +1,57 @@
+diff --git a/Telegram/SourceFiles/platform/linux/linux_wayland_integration.cpp b/Telegram/SourceFiles/platform/linux/linux_wayland_integration.cpp
+index 7641579aa..3c195e397 100644
+--- a/Telegram/SourceFiles/platform/linux/linux_wayland_integration.cpp
++++ b/Telegram/SourceFiles/platform/linux/linux_wayland_integration.cpp
+@@ -9,10 +9,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
+ 
+ #include "base/platform/base_platform_info.h"
+ 
+-#include <connection_thread.h>
+-#include <registry.h>
+-#include <surface.h>
+-#include <plasmashell.h>
++#include <KWayland/Client/connection_thread.h>
++#include <KWayland/Client/registry.h>
++#include <KWayland/Client/surface.h>
++#include <KWayland/Client/plasmashell.h>
+ 
+ using namespace KWayland::Client;
+ 
+Submodule Telegram/lib_base contains modified content
+diff --git a/Telegram/lib_base/base/platform/linux/base_linux_wayland_integration.cpp b/Telegram/lib_base/base/platform/linux/base_linux_wayland_integration.cpp
+index 32f0de6..30a087f 100644
+--- a/Telegram/lib_base/base/platform/linux/base_linux_wayland_integration.cpp
++++ b/Telegram/lib_base/base/platform/linux/base_linux_wayland_integration.cpp
+@@ -13,11 +13,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
+ #include <QtCore/QPointer>
+ #include <QtGui/QWindow>
+ 
+-#include <connection_thread.h>
+-#include <registry.h>
+-#include <surface.h>
+-#include <xdgforeign.h>
+-#include <idleinhibit.h>
++#include <KWayland/Client/connection_thread.h>
++#include <KWayland/Client/registry.h>
++#include <KWayland/Client/surface.h>
++#include <KWayland/Client/xdgforeign.h>
++#include <KWayland/Client/idleinhibit.h>
+ 
+ using namespace KWayland::Client;
+ 
+Submodule Telegram/lib_ui contains modified content
+diff --git a/Telegram/lib_ui/ui/platform/linux/ui_linux_wayland_integration.cpp b/Telegram/lib_ui/ui/platform/linux/ui_linux_wayland_integration.cpp
+index 01f1e80..163cb6a 100644
+--- a/Telegram/lib_ui/ui/platform/linux/ui_linux_wayland_integration.cpp
++++ b/Telegram/lib_ui/ui/platform/linux/ui_linux_wayland_integration.cpp
+@@ -24,8 +24,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
+ #include <private/qwaylandwindow_p.h>
+ #include <private/qwaylandshellsurface_p.h>
+ 
+-#include <connection_thread.h>
+-#include <registry.h>
++#include <KWayland/Client/connection_thread.h>
++#include <KWayland/Client/registry.h>
+ 
+ Q_DECLARE_METATYPE(QMargins);
+