about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix25
1 files changed, 16 insertions, 9 deletions
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
index 693a01f5d89a..4d6e22bd89cd 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
@@ -1,10 +1,11 @@
-{ mkDerivation, lib, fetchurl, callPackage
+{ mkDerivation, lib, fetchurl, fetchpatch, callPackage
 , pkg-config, cmake, ninja, python3, wrapGAppsHook, wrapQtAppsHook, removeReferencesTo
 , qtbase, qtimageformats, gtk3, libsForQt5, enchant2, lz4, xxHash
 , dee, ffmpeg, openalSoft, minizip, libopus, alsaLib, libpulseaudio, range-v3
-, tl-expected, hunspell
-# TODO: Shouldn't be required:
-, pcre, xorg, util-linux, libselinux, libsepol, epoxy, at-spi2-core, libXtst
+, tl-expected, hunspell, glibmm
+# Transitive dependencies:
+, pcre, xorg, util-linux, libselinux, libsepol, epoxy
+, at-spi2-core, libXtst, libthai, libdatrie
 , xdg-utils
 }:
 
@@ -19,15 +20,19 @@ with lib;
 
 let
   tg_owt = callPackage ./tg_owt.nix {};
+  tgcalls-gcc10-fix = fetchpatch { # "Fix build on GCC 10, second attempt."
+    url = "https://github.com/TelegramMessenger/tgcalls/commit/eded7cc540123eaf26361958b9a61c65cb2f7cfc.patch";
+    sha256 = "19n1hvn44pp01zc90g93vq2bcr2gdnscaj5il9f82klgh4llvjli";
+  };
 
 in mkDerivation rec {
   pname = "telegram-desktop";
-  version = "2.5.8";
+  version = "2.7.1";
 
   # Telegram-Desktop with submodules
   src = fetchurl {
     url = "https://github.com/telegramdesktop/tdesktop/releases/download/v${version}/tdesktop-${version}-full.tar.gz";
-    sha256 = "0zj1g24fi4m84p6zj9yk55v8sbhn0jdpdhp33y12d2msz0qwp2cw";
+    sha256 = "01fxzcfz3xankmdar55ja55pb9hkvlf1plgpgjpsda9xwqgbxgs1";
   };
 
   postPatch = ''
@@ -35,6 +40,7 @@ in mkDerivation rec {
       --replace '"libenchant-2.so.2"' '"${enchant2}/lib/libenchant-2.so.2"'
     substituteInPlace Telegram/CMakeLists.txt \
       --replace '"''${TDESKTOP_LAUNCHER_BASENAME}.appdata.xml"' '"''${TDESKTOP_LAUNCHER_BASENAME}.metainfo.xml"'
+    patch -d Telegram/ThirdParty/tgcalls/ -p1 < "${tgcalls-gcc10-fix}"
   '';
 
   # We want to run wrapProgram manually (with additional parameters)
@@ -46,10 +52,11 @@ in mkDerivation rec {
   buildInputs = [
     qtbase qtimageformats gtk3 libsForQt5.kwayland libsForQt5.libdbusmenu enchant2 lz4 xxHash
     dee ffmpeg openalSoft minizip libopus alsaLib libpulseaudio range-v3
-    tl-expected hunspell
+    tl-expected hunspell glibmm
     tg_owt
-    # TODO: Shouldn't be required:
-    pcre xorg.libpthreadstubs xorg.libXdmcp util-linux libselinux libsepol epoxy at-spi2-core libXtst
+    # Transitive dependencies:
+    pcre xorg.libpthreadstubs xorg.libXdmcp util-linux libselinux libsepol epoxy
+    at-spi2-core libXtst libthai libdatrie
   ];
 
   cmakeFlags = [