nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ ffmpeg_5-full
2, nv-codec-headers-11
3, chromaprint
4, fetchFromGitHub
5, lib
6}:
7
8(ffmpeg_5-full.override {
9 nv-codec-headers = nv-codec-headers-11;
10}).overrideAttrs (old: rec {
11 pname = "jellyfin-ffmpeg";
12 version = "5.1.2-8";
13
14 src = fetchFromGitHub {
15 owner = "jellyfin";
16 repo = "jellyfin-ffmpeg";
17 rev = "v${version}";
18 sha256 = "sha256-0ne9Xj9MnB5WOkPRtPX7W30qG1osHd0tyua+5RMrnQc=";
19 };
20
21 buildInputs = old.buildInputs ++ [ chromaprint ];
22
23 configureFlags = old.configureFlags ++ [
24 "--extra-version=Jellyfin"
25 "--disable-ptx-compression" # https://github.com/jellyfin/jellyfin/issues/7944#issuecomment-1156880067
26 "--enable-chromaprint"
27 ];
28
29 postPatch = ''
30 for file in $(cat debian/patches/series); do
31 patch -p1 < debian/patches/$file
32 done
33
34 ${old.postPatch or ""}
35 '';
36
37 meta = with lib; {
38 description = "${old.meta.description} (Jellyfin fork)";
39 homepage = "https://github.com/jellyfin/jellyfin-ffmpeg";
40 license = licenses.gpl3;
41 maintainers = with maintainers; [ justinas ];
42 };
43})