From 9444bd23f2b00e2752fbbddea498de9dabe931bf Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Wed, 27 Aug 2025 18:41:53 +0200 Subject: [PATCH 1/3] ffmpeg: only use asm on x86 platforms ffmpeg only supports using nasm and yasm on x86 based platforms --- pkgs/development/libraries/ffmpeg/generic.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 940dd6c9ffc2..2fb174f92bc0 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -827,7 +827,7 @@ stdenv.mkDerivation ( pkg-config ] # 8.0 is only compatible with nasm, and we don't want to rebuild all older ffmpeg builds at this moment. - ++ (if versionOlder version "8.0" then [ yasm ] else [ nasm ]) + ++ optionals stdenv.hostPlatform.isx86 (if versionOlder version "8.0" then [ yasm ] else [ nasm ]) # Texinfo version 7.1 introduced breaking changes, which older versions of ffmpeg do not handle. ++ (if versionOlder version "5" then [ texinfo6 ] else [ texinfo ]) ++ optionals withCudaLLVM [ clang ] From 2c07b247d3c544293bada8a671182b891d440d50 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Wed, 27 Aug 2025 18:44:48 +0200 Subject: [PATCH 2/3] ffmpeg: allways use nasm and not yasm ffmpeg recommends usig nasm and support for yasm was droped in 8.0 --- pkgs/development/libraries/ffmpeg/generic.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 2fb174f92bc0..9797f53c9284 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -9,7 +9,6 @@ perl, texinfo, texinfo6, - yasm, nasm, # You can fetch any upstream version using this derivation by specifying version and hash @@ -826,8 +825,7 @@ stdenv.mkDerivation ( perl pkg-config ] - # 8.0 is only compatible with nasm, and we don't want to rebuild all older ffmpeg builds at this moment. - ++ optionals stdenv.hostPlatform.isx86 (if versionOlder version "8.0" then [ yasm ] else [ nasm ]) + ++ optionals stdenv.hostPlatform.isx86 [ nasm ] # Texinfo version 7.1 introduced breaking changes, which older versions of ffmpeg do not handle. ++ (if versionOlder version "5" then [ texinfo6 ] else [ texinfo ]) ++ optionals withCudaLLVM [ clang ] From 9192040894caa87e0c6a4a0fce758d86cb72150f Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Wed, 27 Aug 2025 18:50:29 +0200 Subject: [PATCH 3/3] ffmpeg: switch to new source repo --- pkgs/development/libraries/ffmpeg/generic.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 9797f53c9284..d9bfa295972a 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -15,9 +15,11 @@ # NOTICE: Always use this argument to override the version. Do not use overrideAttrs. version, # ffmpeg ABI version. Also declare this if you're overriding the source. hash ? "", # hash of the upstream source for the given ABI version - source ? fetchgit { - url = "https://git.ffmpeg.org/ffmpeg.git"; - rev = "n${version}"; + source ? fetchFromGitea { + domain = "code.ffmpeg.org"; + owner = "FFmpeg"; + repo = "FFmpeg"; + tag = "n${version}"; inherit hash; }, @@ -40,7 +42,7 @@ # instead. withFullDeps ? ffmpegVariant == "full", - fetchgit, + fetchFromGitea, fetchpatch2, # Feature flags