about summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers/telegram
diff options
context:
space:
mode:
authorMichael Weiss <dev.primeos@gmail.com>2019-06-01 14:35:49 +0200
committerMichael Weiss <dev.primeos@gmail.com>2019-06-04 22:03:34 +0200
commit28556f054f37510da5a0ebfe7fd2af7c20d3e8e3 (patch)
tree39b18ec36f069e994063b6f62202774955eab73a /pkgs/applications/networking/instant-messengers/telegram
parentf8d26961de4e4e20811c4eed0db0412abc84c505 (diff)
tdesktop: 1.7.0 -> 1.7.3
GCC 8.x is required to avoid the following error:

cc1plus: error: -Werror=class-memaccess: no option -Wclass-memaccess

If we build without "-Wno-error=class-memaccess" the build should fail
and the upstream requirements were raised from GCC 7 to GCC 8 anyway:
https://github.com/telegramdesktop/tdesktop/commit/b2f821d3deb65ade7416d28a18148176f6c40b34

The two additional patches are required to avoid build errors like this:

/build/source/Telegram/ThirdParty/qtlottie/src/bodymovin/bmbase.cpp:123:12:
error: invalid use of incomplete type 'class QDebug'
   qWarning()
            ^
In file included from
/nix/store/1qk60bhxcf95iicms7mkyjq3h7lz136p-qtbase-5.12.0-dev/include/QtCore/qglobal.h:1200,
                 from
/nix/store/1qk60bhxcf95iicms7mkyjq3h7lz136p-qtbase-5.12.0-dev/include/QtCore/qalgorithms.h:43,
                 from
/nix/store/1qk60bhxcf95iicms7mkyjq3h7lz136p-qtbase-5.12.0-dev/include/QtCore/qlist.h:43,
                 from
/nix/store/1qk60bhxcf95iicms7mkyjq3h7lz136p-qtbase-5.12.0-dev/include/QtCore/QList:1,
                 from
/build/source/Telegram/ThirdParty/qtlottie/src/bodymovin/bmbase.h:31,
                 from
/build/source/Telegram/ThirdParty/qtlottie/src/bodymovin/bmbase.cpp:29:
/nix/store/1qk60bhxcf95iicms7mkyjq3h7lz136p-qtbase-5.12.0-dev/include/QtCore/qlogging.h:57:7:
note: forward declaration of 'class QDebug'
 class QDebug;
       ^~~~~~
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/telegram')
-rw-r--r--pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix8
-rw-r--r--pkgs/applications/networking/instant-messengers/telegram/tdesktop/generic.nix10
2 files changed, 11 insertions, 7 deletions
diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
index c7b990db60221..f906d4712f999 100644
--- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
+++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
@@ -4,11 +4,11 @@ let
   mkTelegram = args: qt5.callPackage (import ./generic.nix args) { };
   stableVersion = {
     stable = true;
-    version = "1.7.0";
-    sha256Hash = "1plfby243hf65wjmppq1qnqmp25pgi4x3awqd4h83ly9hn8qdwfk";
+    version = "1.7.3";
+    sha256Hash = "0y0chdfxq75ydx8lz40yfpbx8ycm8vdkl5dvll6glxjq5m21kxf9";
     # svn log svn://svn.archlinux.org/community/telegram-desktop/trunk
-    archPatchesRevision = "464796";
-    archPatchesHash = "1bq7r69k3i9p1csdsca0w41jyz6fbyn4qriv3lg7s28j9s803kw8";
+    archPatchesRevision = "476826";
+    archPatchesHash = "1vnlvba60hxd5jlh0fvsa50xmb9xgcphdsx6j1ld7f12m7ik68zr";
   };
 in {
   stable = mkTelegram stableVersion;
diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/generic.nix b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/generic.nix
index c32e6b186b7a2..8276e839940f9 100644
--- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/generic.nix
+++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/generic.nix
@@ -1,7 +1,7 @@
 { stable, version, sha256Hash, archPatchesRevision, archPatchesHash }:
 
 { mkDerivation, lib, fetchFromGitHub, fetchsvn
-, pkgconfig, pythonPackages, cmake, wrapGAppsHook
+, pkgconfig, pythonPackages, cmake, wrapGAppsHook, gcc8
 , qtbase, qtimageformats, gtk3, libappindicator-gtk3, libnotify, xdg_utils
 , dee, ffmpeg, openalSoft, minizip, libopus, alsaLib, libpulseaudio, range-v3
 }:
@@ -29,7 +29,8 @@ mkDerivation rec {
   };
 
   # TODO: libtgvoip.patch no-gtk2.patch
-  patches = [ "${archPatches}/tdesktop.patch" ];
+  # TODO: Avoid tdesktop_lottie_animation_qtdebug.patch and tdesktop_qtlottie_qtdebug.patch
+  patches = [ "${archPatches}/tdesktop.patch" "${archPatches}/tdesktop_lottie_animation_qtdebug.patch" ];
 
   postPatch = ''
     substituteInPlace Telegram/SourceFiles/platform/linux/linux_libs.cpp \
@@ -38,7 +39,7 @@ mkDerivation rec {
       --replace '"notify"' '"${libnotify}/lib/libnotify.so"'
   '';
 
-  nativeBuildInputs = [ pkgconfig pythonPackages.gyp cmake wrapGAppsHook ];
+  nativeBuildInputs = [ pkgconfig pythonPackages.gyp cmake wrapGAppsHook gcc8 ];
 
   # We want to run wrapProgram manually (with additional parameters)
   dontWrapGApps = true;
@@ -77,6 +78,9 @@ mkDerivation rec {
     pushd "Telegram/ThirdParty/libtgvoip"
     patch -Np1 -i "${archPatches}/libtgvoip.patch"
     popd
+    pushd "Telegram/ThirdParty/qtlottie"
+    patch -Np1 -i "${archPatches}/tdesktop_qtlottie_qtdebug.patch"
+    popd
 
     sed -i Telegram/gyp/telegram_linux.gypi \
       -e 's,/usr,/does-not-exist,g' \