Skip to content

jellyfin-ffmpeg fails to build: Unknown option "--enable-libaribcaption". #280645

@anund

Description

@anund

Describe the bug

Jellyfin-ffmpeg overrides ffmpeg_6-full in a way that passes one version value (6.1) to the outer scope and a different value to the derivation scope (6.0.1). As a result withAribcaption = true is set and the build fails with Unknown option "--enable-libaribcaption"..

A rough fix looks like:

diff --git a/pkgs/development/libraries/jellyfin-ffmpeg/default.nix b/pkgs/development/libraries/jellyfin-ffmpeg/default.nix
index 7109a5d6dfd1..0b398b41f73a 100644
--- a/pkgs/development/libraries/jellyfin-ffmpeg/default.nix
+++ b/pkgs/development/libraries/jellyfin-ffmpeg/default.nix
@@ -4,7 +4,9 @@
 , lib
 }:
 
-ffmpeg_6-full.overrideAttrs (old: rec {
+(ffmpeg_6-full.override{
+  withAribcaption = false; # ffmpeg_6-full sets this to true based on a meta version value of '6.1' not the '6.0.1' used below  
+}).overrideAttrs (old: rec {
   pname = "jellyfin-ffmpeg";
   version = "6.0.1-1";

Looks like #271863 also may change things in this area.

Steps To Reproduce

Steps to reproduce the behavior:

  1. nix build -f <localnixpkgscheckout> jellyfin-ffmpeg
  2. build fails with Unknown option "--enable-libaribcaption".

Expected behavior

Jellyfin-ffmpeg builds

Additional context

#271905 bumped ffmpeg in several places. It uses the existing pattern for guarding against version inconsistencies:

, withAribcaption ? withFullDeps && lib.versionAtLeast version "6.1" # ARIB STD-B24 Caption Decoder/Renderer
This doesn't work as the version value referenced is from the outer function scope passed in when creating ffmpeg_6-full = ffmpeg_6.override{ ...
import ./generic.nix {
version = "6.1";
hash = "sha256-NzhD2D16bCVCyCXo0TRwZYp3Ta5eFSfoQPa+iRkeNZg=";
}
not the library version value set later in
ffmpeg_6-full.overrideAttrs (old: rec {
pname = "jellyfin-ffmpeg";
version = "6.0.1-1";
.

Notify maintainers

@arthsmn @justinas @Atemu

Metadata

Building from current master


Add a 👍 reaction to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions