summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/ff/ffmpeg-livepeer/package.nix
blob: 2545fd2e28f3d65e18c21897e88f1cc00feb233e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
  ffmpeg_7-headless,
  lib,
  fetchFromGitHub,
}:

(ffmpeg_7-headless.override {
  version = "7.0.1-unstable-2024-07-10";
  withCudaLLVM = true;
  source = fetchFromGitHub {
    owner = "livepeer";
    repo = "FFmpeg";
    rev = "d9751c73e714b01b363483db358b1ea8022c9bea"; # From branch n*-livepeer
    hash = "sha256-IJVpb/k+obGFD9uOoIVHCd2ZiGL3CA4CV3D+Q9vMbQM=";
  };
}).overrideAttrs
  (old: {
    pname = "ffmpeg-livepeer";

    postPatch = (old.postPatch or "") + ''
            substituteInPlace libavcodec/tableprint_vlc.h \
              --replace-fail 'define av_mallocz(s) NULL' 'define av_mallocz(s) NULL
      #define av_malloc(s) NULL'
    '';

    meta = {
      inherit (old.meta)
        license
        mainProgram
        pkgConfigModules
        platforms
        ;
      maintainers = with lib.maintainers; [ bot-wxt1221 ];
    };
  })