From aa2b643e4bc334d1b1b0863069920acdce00c9f2 Mon Sep 17 00:00:00 2001 From: David Izquierdo Date: Sat, 17 Jun 2017 23:24:30 +0200 Subject: [PATCH] tdesktop: 1.0.27 -> 1.1.7 --- .../telegram/tdesktop/default.nix | 25 +++++++++++++------ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 19 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 0af0c0b1d1b..446156fbe4c 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix @@ -1,33 +1,35 @@ { mkDerivation, lib, fetchFromGitHub, fetchgit, pkgconfig, gyp, cmake , qtbase, qtimageformats , breakpad, gtk3, libappindicator-gtk3, dee -, ffmpeg, openalSoft, minizip +, ffmpeg, openalSoft, minizip, libopus, alsaLib, libpulseaudio +, gcc }: mkDerivation rec { name = "telegram-desktop-${version}"; - version = "1.0.27"; + version = "1.1.7"; # Submodules src = fetchgit { url = "https://github.com/telegramdesktop/tdesktop"; rev = "refs/tags/v${version}"; - sha256 = "05g88g6h2a7f9biliicg81fqssx0y3akd3y5r2q2b5h8q3igqrfc"; + sha256 = "0y0nc8d4vlhsmzayy26zdxc5jaiwcv0rb2s1v5fwnnx71gf89m2w"; }; tgaur = fetchgit { url = "https://aur.archlinux.org/telegram-desktop-systemqt.git"; - rev = "b4d169076ed12ec01941a95499774d5caa6fc00e"; - sha256 = "0pmm6slabg9xazgs0ffnp8v0hx3vnpdfgymvapwqpm3h9mwk22x9"; + rev = "83af81905de7fc5dc9fbea8f5318d56fa8a6efc6"; + sha256 = "0v7g7y5cmxzp2yrcj6ylwzxlzr9yrqs2badzplm7sg012nc69yf9"; }; buildInputs = [ gtk3 libappindicator-gtk3 dee qtbase qtimageformats ffmpeg openalSoft minizip + libopus alsaLib libpulseaudio ]; - nativeBuildInputs = [ pkgconfig gyp cmake ]; + nativeBuildInputs = [ pkgconfig gyp cmake gcc ]; - patches = [ "${tgaur}/aur-build-fixes.patch" ]; + patches = [ "${tgaur}/tdesktop.patch" ]; enableParallelBuilding = true; @@ -48,10 +50,18 @@ mkDerivation rec { "-I${qtbase.dev}/include/${x}" "-I${qtbase.dev}/include/${x}/${qtbase.version}" "-I${qtbase.dev}/include/${x}/${qtbase.version}/${x}" + "-I${libopus.dev}/include/opus" + "-I${alsaLib.dev}/include/alsa" + "-I${libpulseaudio.dev}/include/pulse" ]) [ "QtCore" "QtGui" ]; CPPFLAGS = NIX_CFLAGS_COMPILE; preConfigure = '' + + pushd "Telegram/ThirdParty/libtgvoip" + patch -Np1 -i "${tgaur}/libtgvoip.patch" + popd + sed -i Telegram/gyp/telegram_linux.gypi \ -e 's,/usr,/does-not-exist,g' \ -e 's,appindicator-0.1,appindicator3-0.1,g' \ @@ -63,6 +73,7 @@ mkDerivation rec { -e "s,/usr/bin/rcc,rcc,g" gyp \ + -Dbuild_defines=${GYP_DEFINES} \ -Gconfig=Release \ --depth=Telegram/gyp \ --generator-output=../.. \ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3e4ebd8889e..9153da77f96 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16024,6 +16024,7 @@ with pkgs; tdesktop = qt5.callPackage ../applications/networking/instant-messengers/telegram/tdesktop { inherit (pythonPackages) gyp; + gcc = gcc6; }; telegram-cli = callPackage ../applications/networking/instant-messengers/telegram/telegram-cli { };