From b1a93bb5c45a955dccdae4b70e6e4f85968a4933 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 7 Sep 2024 22:46:33 +0100 Subject: [PATCH] {telegram-desktop,kotatogram-desktop}.tg_owt: add patch for FFmpeg 7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These are forks of WebRTC, so include the same upstream patch we use for FFmpeg 7 support in Qt 5’s WebEngine. I didn’t bother deduplicating it across these two copy‐pasted expressions since the original authors didn’t either. --- .../telegram/kotatogram-desktop/tg_owt.nix | 13 +++++++++++++ .../telegram/telegram-desktop/tg_owt.nix | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/tg_owt.nix b/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/tg_owt.nix index e2f3c4ba884e..5dcfd895f5ed 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/tg_owt.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/tg_owt.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, fetchpatch2 , pkg-config , cmake , ninja @@ -42,6 +43,18 @@ stdenv.mkDerivation { fetchSubmodules = true; }; + patches = [ + # Remove usage of AVCodecContext::reordered_opaque + (fetchpatch2 { + name = "webrtc-ffmpeg-7.patch"; + url = "https://webrtc.googlesource.com/src/+/e7d10047096880feb5e9846375f2da54aef91202%5E%21/?format=TEXT"; + decode = "base64 -d"; + stripLen = 1; + extraPrefix = "src/"; + hash = "sha256-EdwHeVko8uDsP5GTw2ryWiQgRVCAdPc1me6hySdiwMU="; + }) + ]; + postPatch = lib.optionalString stdenv.isLinux '' substituteInPlace src/modules/desktop_capture/linux/wayland/egl_dmabuf.cc \ --replace '"libEGL.so.1"' '"${libGL}/lib/libEGL.so.1"' \ diff --git a/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/tg_owt.nix b/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/tg_owt.nix index 64541fc79e97..425b82f15d9b 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/tg_owt.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/tg_owt.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch2, pkg-config, cmake, crc32c, @@ -41,6 +42,18 @@ stdenv.mkDerivation { fetchSubmodules = true; }; + patches = [ + # Remove usage of AVCodecContext::reordered_opaque + (fetchpatch2 { + name = "webrtc-ffmpeg-7.patch"; + url = "https://webrtc.googlesource.com/src/+/e7d10047096880feb5e9846375f2da54aef91202%5E%21/?format=TEXT"; + decode = "base64 -d"; + stripLen = 1; + extraPrefix = "src/"; + hash = "sha256-EdwHeVko8uDsP5GTw2ryWiQgRVCAdPc1me6hySdiwMU="; + }) + ]; + outputs = [ "out" "dev"