From 71b47cb872ce162ca3fbfaaefb5a7d7e95ec3571 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Sat, 9 Mar 2024 16:42:01 +0100 Subject: [PATCH] ffmpeg: apply binutils patch only to ffmpeg_4 --- pkgs/development/libraries/ffmpeg/4.nix | 6 ++++++ pkgs/development/libraries/ffmpeg/generic.nix | 8 -------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/4.nix b/pkgs/development/libraries/ffmpeg/4.nix index e57c0fcff5bc..b5d169b59744 100644 --- a/pkgs/development/libraries/ffmpeg/4.nix +++ b/pkgs/development/libraries/ffmpeg/4.nix @@ -7,6 +7,12 @@ import ./generic.nix { url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/031f1561cd286596cdb374da32f8aa816ce3b135"; hash = "sha256-mSnmAkoNikDpxcN+A/hpB7mUbbtcMvm4tG6gZFuroe8="; } + { + # Backport fix for binutils-2.41. + name = "binutils-2.41.patch"; + url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/effadce6c756247ea8bae32dc13bb3e6f464f0eb"; + hash = "sha256-vlBUMJ1bORQHRNpuzc5iXsTWwS/CN5BmGIA8g7H7mJE="; + } # The upstream patch isn’t for ffmpeg 4, but it will apply with a few tweaks. # Fixes a crash when built with clang 16 due to UB in ff_seek_frame_binary. { diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 2410547e2df6..24ea17d0d86e 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -363,14 +363,6 @@ stdenv.mkDerivation (finalAttrs: { ''; patches = map (patch: fetchpatch patch) (extraPatches - ++ (lib.optional (lib.versionOlder version "6.1") - { - # Backport fix for binutils-2.41. - name = "binutils-2.41.patch"; - url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/effadce6c756247ea8bae32dc13bb3e6f464f0eb"; - hash = "sha256-vlBUMJ1bORQHRNpuzc5iXsTWwS/CN5BmGIA8g7H7mJE="; - } - ) ++ (lib.optional (lib.versionAtLeast finalAttrs.version "6" && lib.versionOlder finalAttrs.version "6.1") { # this can be removed post 6.1 name = "fix_aacps_tablegen";