From d8f1a7b5b2e1597c69c3562890a76eb6a17612bc Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 25 Oct 2025 10:37:05 +0100 Subject: [PATCH] mpv: backport ffmpeg-8 support Without the change `mpv` fails to build on` staging` as: ../demux/demux_mkv.c: In function 'demux_mkv_open_sub': ../demux/demux_mkv.c:2203:32: error: 'FF_PROFILE_ARIB_PROFILE_A' undeclared (first use in this function); did you mean 'AV_PROFILE_ARIB_PROFILE_A'? 2203 | lav->profile = FF_PROFILE_ARIB_PROFILE_A; | ^~~~~~~~~~~~~~~~~~~~~~~~~ | AV_PROFILE_ARIB_PROFILE_A --- pkgs/applications/video/mpv/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/applications/video/mpv/default.nix b/pkgs/applications/video/mpv/default.nix index b11bccf732b1..0ea229fa5f45 100644 --- a/pkgs/applications/video/mpv/default.nix +++ b/pkgs/applications/video/mpv/default.nix @@ -9,6 +9,7 @@ config, docutils, fetchFromGitHub, + fetchpatch, ffmpeg, freefont_ttf, freetype, @@ -112,6 +113,16 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-x8cDczKIX4+KrvRxZ+72TGlEQHd4Kx7naq0CSoOZGHA="; }; + patches = [ + # ffmpeg-8 compat: + # https://github.com/mpv-player/mpv/pull/16145 + (fetchpatch { + name = "ffmpeg-8.patch"; + url = "https://github.com/mpv-player/mpv/commit/26b29fba02a2782f68e2906f837d21201fc6f1b9.patch"; + hash = "sha256-ANNoTtIJBARHbm5IgrE0eEZyzmNhOnbVgve7iqCBzQg="; + }) + ]; + postPatch = lib.concatStringsSep "\n" [ # Don't reference compile time dependencies or create a build outputs cycle # between out and dev