tdesktop: 2.7.5 -> 2.8.0

This commit is contained in:
Michael Weiss 2021-06-26 16:17:07 +02:00
parent e50f34959a
commit 0d509d366d
No known key found for this signature in database
GPG Key ID: 5BE487C4D4771D83
3 changed files with 50 additions and 31 deletions

View File

@ -1,8 +1,9 @@
{ mkDerivation, lib, fetchurl, fetchpatch, callPackage
{ mkDerivation, lib, fetchurl, callPackage
, pkg-config, cmake, ninja, python3, wrapGAppsHook, wrapQtAppsHook, removeReferencesTo
, qtbase, qtimageformats, gtk3, libsForQt5, enchant2, lz4, xxHash
, dee, ffmpeg, openalSoft, minizip, libopus, alsa-lib, libpulseaudio, range-v3
, tl-expected, hunspell, glibmm, webkitgtk, libtgvoip
, tl-expected, hunspell, glibmm, webkitgtk
, libtgvoip, rnnoise, abseil-cpp, extra-cmake-modules
# Transitive dependencies:
, pcre, xorg, util-linux, libselinux, libsepol, epoxy
, at-spi2-core, libXtst, libthai, libdatrie
@ -22,26 +23,14 @@ let
tg_owt = callPackage ./tg_owt.nix {};
in mkDerivation rec {
pname = "telegram-desktop";
version = "2.7.5";
version = "2.8.0";
# Telegram-Desktop with submodules
src = fetchurl {
url = "https://github.com/telegramdesktop/tdesktop/releases/download/v${version}/tdesktop-${version}-full.tar.gz";
sha256 = "sha256-9GxBw5ii9Musjq7D3KMf/P5BA4h690EgXRbhynHwO98=";
sha256 = "0689bmdpsj8qmv9ih6ckay23mivhlps8c081qljb8wqplmf2c4ds";
};
patches = [
# fixes issue with ffmpeg>=4.4 crashes, hasn't been upstreamed yet
(fetchpatch {
url = "https://raw.githubusercontent.com/gentoo/gentoo/1c91884873968997be4b0c954169d04dc839f1db/net-im/telegram-desktop/files/tdesktop-2.7.4-voice-crash.patch";
sha256 = "sha256-inLXcP70yJlkkmdeXlc3HRL7Vt+Sf00LLJG33gwBKdY=";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/gentoo/gentoo/1c91884873968997be4b0c954169d04dc839f1db/net-im/telegram-desktop/files/tdesktop-2.7.4-voice-ffmpeg44.patch";
sha256 = "sha256-p57LipNf7BDhVvNKRuicVqx0vU6IBL/Cvr5BAfLF4Hs=";
})
];
postPatch = ''
substituteInPlace Telegram/lib_spellcheck/spellcheck/platform/linux/linux_enchant.cpp \
--replace '"libenchant-2.so.2"' '"${enchant2}/lib/libenchant-2.so.2"'
@ -59,7 +48,8 @@ in mkDerivation rec {
qtbase qtimageformats gtk3 libsForQt5.kwayland libsForQt5.libdbusmenu enchant2 lz4 xxHash
dee ffmpeg openalSoft minizip libopus alsa-lib libpulseaudio range-v3
tl-expected hunspell glibmm webkitgtk
tg_owt libtgvoip
libtgvoip rnnoise abseil-cpp extra-cmake-modules
tg_owt
# Transitive dependencies:
pcre xorg.libpthreadstubs xorg.libXdmcp util-linux libselinux libsepol epoxy
at-spi2-core libXtst libthai libdatrie libsysprof-capture libpsl brotli

View File

@ -1,30 +1,42 @@
{ lib, stdenv, fetchFromGitHub, pkg-config, cmake, ninja, yasm
{ lib, stdenv, fetchFromGitHub, fetchpatch
, pkg-config, cmake, ninja, yasm
, libjpeg, openssl, libopus, ffmpeg, alsa-lib, libpulseaudio, protobuf
, xorg, libXtst
, xorg, libXtst, libXcomposite, libXdamage, libXext, libXrender, libXrandr
, glib, abseil-cpp, pcre, util-linuxMinimal, libselinux, libsepol, pipewire
}:
let
rev = "2d804d2c9c5d05324c8ab22f2e6ff8306521b3c3";
sha256 = "0kz0i381iwsgcc3yzsq7njx3gkqja4bb9fsgc24vhg0md540qhyn";
in stdenv.mkDerivation {
stdenv.mkDerivation {
pname = "tg_owt";
version = "git-${rev}";
version = "unstable-2021-06-17";
src = fetchFromGitHub {
owner = "desktop-app";
repo = "tg_owt";
inherit rev sha256;
rev = "f03ef05abf665437649a4f71886db1343590e862";
sha256 = "0s6ajw52b95lcq4mn6lv8gj6lhv62bvwjh43w7az2k5pbm14v7vv";
fetchSubmodules = true;
};
patches = [
# Our libXtst seems broken:
# /nix/store/rd3swxwmzjgjvwhz8svyc8ghc0brq293-libXtst-1.2.3/include/X11/extensions/XTest.h:32:10: fatal error: X11/extensions/XInput.h: No such file or directory
(fetchpatch {
# Copy updated source files.
url = "https://github.com/desktop-app/tg_owt/commit/2c0fbe4d3d1c33d0cc9ff7c112b4db1963bea535.patch";
sha256 = "0apd6hfv3a1s3qy10kjwk4z8bg835cpk0ql9qxjnxf4gq183bhif";
revert = true;
includes = [ "src/modules/desktop_capture/linux/shared_x_display.cc" ];
})
];
outputs = [ "out" "dev" ];
nativeBuildInputs = [ pkg-config cmake ninja yasm ];
buildInputs = [
libjpeg openssl libopus ffmpeg alsa-lib libpulseaudio protobuf
xorg.libX11 libXtst
xorg.libX11 libXtst libXcomposite libXdamage libXext libXrender libXrandr
glib abseil-cpp pcre util-linuxMinimal libselinux libsepol pipewire
];
cmakeFlags = [

View File

@ -1,4 +1,5 @@
{ stdenv, lib, fetchFromGitHub, pkg-config, autoreconfHook
{ stdenv, lib, fetchFromGitHub, fetchpatch
, pkg-config, autoreconfHook
, openssl, libopus, alsa-lib, libpulseaudio
}:
@ -6,15 +7,31 @@ with lib;
stdenv.mkDerivation rec {
pname = "libtgvoip";
version = "unstable-2020-03-02";
version = "unstable-2021-01-01";
src = fetchFromGitHub {
owner = "telegramdesktop";
repo = "libtgvoip";
rev = "e422d2a80546a32ab7166a9b1058bacfc5daeefc";
sha256 = "0n6f7215k74039j0zmicjzhj6f45mq6fvkrwzyzibcrv87ib17fc";
rev = "13a5fcb16b04472d808ce122abd695dbf5d206cd";
sha256 = "12p6s7vxkf1gh1spdckkdxrx7bjzw881ds9bky7l5fw751cwb3xd";
};
# To fix the build without external webrtc:
patches = [
(fetchpatch {
# Use methods from updated webrtc.
url = "https://github.com/telegramdesktop/libtgvoip/commit/13a5fcb16b04472d808ce122abd695dbf5d206cd.patch";
sha256 = "0wapqvml3yyv5dlp2q8iih5rfvfnkngll69krhnw5xsdjy22sp7r";
revert = true;
})
(fetchpatch {
# Allow working with external webrtc.
url = "https://github.com/telegramdesktop/libtgvoip/commit/6e82b6e45664c1f80b9039256c99bebc76d34672.patch";
sha256 = "0m87ixja70vnm80a9z4gxk0yl7n64y59smczxb88lxnj6kdgih7x";
revert = true;
})
];
outputs = [ "out" "dev" ];
nativeBuildInputs = [ pkg-config autoreconfHook ];