depot/third_party/nixpkgs/pkgs/development/libraries/jellyfin-ffmpeg/default.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

51 lines
1.3 KiB
Nix

{ ffmpeg_6-full
, fetchFromGitHub
, fetchpatch
, lib
}:
let
version = "6.0.1-6";
in
(ffmpeg_6-full.override {
inherit version; # Important! This sets the ABI.
source = fetchFromGitHub {
owner = "jellyfin";
repo = "jellyfin-ffmpeg";
rev = "v${version}";
hash = "sha256-jy5LPurjuSIMZlzVZcuaqAwAZunbYc9/6aJf+hna0Kw=";
};
}).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
];
postPatch = ''
for file in $(cat debian/patches/series); do
patch -p1 < debian/patches/$file
done
${old.postPatch or ""}
'';
meta = with lib; {
description = "${old.meta.description} (Jellyfin fork)";
homepage = "https://github.com/jellyfin/jellyfin-ffmpeg";
license = licenses.gpl3;
maintainers = with maintainers; [ justinas ];
pkgConfigModules = [ "libavutil" ];
};
})