Loading
+4 −13
Original line number Diff line number Diff line
{ ffmpeg_6-full
{ ffmpeg_7-full
, fetchFromGitHub
, fetchpatch
, lib
}:

let
  version = "6.0.1-8";
  version = "7.0.2-5";
in

(ffmpeg_6-full.override {
(ffmpeg_7-full.override {
  inherit version; # Important! This sets the ABI.
  source = fetchFromGitHub {
    owner = "jellyfin";
    repo = "jellyfin-ffmpeg";
    rev = "v${version}";
    hash = "sha256-29g3BUdNcFEGjHkc/1qxOGazIfg0DLDIwoiDCI/aEKc=";
    hash = "sha256-cqyXQNx65eLEumOoSCucNpAqShMhiPqzsKc/GjKKQOA=";
  };
}).overrideAttrs (old: {
  pname = "jellyfin-ffmpeg";

  # Clobber upstream patches as they don't apply to the Jellyfin fork
  patches = [
    (fetchpatch {
      name = "fix_build_failure_due_to_libjxl_version_to_new";
      url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/75b1a555a70c178a9166629e43ec2f6250219eb2";
      hash = "sha256-+2kzfPJf5piim+DqEgDuVEEX5HLwRsxq0dWONJ4ACrU=";
    })
  ];

  configureFlags = old.configureFlags ++ [
    "--extra-version=Jellyfin"
    "--disable-ptx-compression" # https://github.com/jellyfin/jellyfin/issues/7944#issuecomment-1156880067