[Backport release-26.05] ffmpeg: fix loongarch64-linux build (#554996)

This commit is contained in:
Weijia Wang
2026-08-21 13:17:32 +00:00
committed by GitHub

View File

@@ -453,6 +453,15 @@ stdenv.mkDerivation (
++ optionals (lib.versionAtLeast version "5.1") [
./nvccflags-cpp14.patch
]
++ optionals (lib.versionAtLeast version "8.1.2" && stdenv.hostPlatform.isLoongArch64) [
# https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23825 (merged, but not backported to 8.1.x or 9.0.x)
# As git.ffmpeg.org deploys Anubis, we cannot fetch this patch reliably from there.
# So instead, we fetch it from Debian.
(fetchpatch2 {
url = "https://salsa.debian.org/multimedia-team/ffmpeg/-/raw/d52aea25bc9123bfaf61f7a7e5a0d9da01c8788d/debian/patches/0001-swscale-loongarch-fix-buffer-underflow-in-yuv2plane1.patch";
hash = "sha256-QRkb7z4Btyd9ZgV/1hh6Fb87IhkygFgVDqQdloXKL6Q=";
})
]
++ optionals (lib.versionAtLeast version "7.0" && lib.versionOlder version "7.1.4") [
(fetchpatch2 {
name = "unbreak-hardcoded-tables.patch";