1{
2 callPackage,
3 darwin,
4 cudaPackages,
5}:
6
7let
8 mkFFmpeg =
9 initArgs: ffmpegVariant:
10 callPackage ./generic.nix (
11 {
12 inherit (darwin) xcode;
13 inherit (cudaPackages) cuda_cudart cuda_nvcc libnpp;
14 }
15 // (initArgs // { inherit ffmpegVariant; })
16 );
17
18 v4 = {
19 version = "4.4.6";
20 hash = "sha256-IM+1+WJWHuUNHZCVs+eKlmaEkfbvay4vQ2I/GbV1fqk=";
21 };
22
23 v6 = {
24 version = "6.1.2";
25 hash = "sha256-h/N56iKkAR5kH+PRQceWZvHe3k+70KWMDEP5iVq/YFQ=";
26 };
27
28 v7 = {
29 version = "7.1.1";
30 hash = "sha256-GyS8imOqfOUPxXrzCiQtzCQIIH6bvWmQAB0fKUcRsW4=";
31 };
32in
33
34rec {
35 # We keep FFmpeg 4 around for now mainly for a couple of binary
36 # packages (Spotify and REAPER). Please don’t add new source packages
37 # that depend on this version.
38 ffmpeg_4 = mkFFmpeg v4 "small";
39 ffmpeg_4-headless = mkFFmpeg v4 "headless";
40 ffmpeg_4-full = mkFFmpeg v4 "full";
41
42 ffmpeg_6 = mkFFmpeg v6 "small";
43 ffmpeg_6-headless = mkFFmpeg v6 "headless";
44 ffmpeg_6-full = mkFFmpeg v6 "full";
45
46 ffmpeg_7 = mkFFmpeg v7 "small";
47 ffmpeg_7-headless = mkFFmpeg v7 "headless";
48 ffmpeg_7-full = mkFFmpeg v7 "full";
49
50 # Please make sure this is updated to new major versions once they
51 # build and work on all the major platforms. If absolutely necessary
52 # due to severe breaking changes, the bump can wait a little bit to
53 # give the most proactive users time to migrate, but don’t hold off
54 # for too long.
55 #
56 # Packages which depend on FFmpeg should generally use these
57 # unversioned aliases to allow for quicker migration to new releases,
58 # but can pin one of the versioned variants if they do not work with
59 # the current default version.
60 ffmpeg = ffmpeg_7;
61 ffmpeg-headless = ffmpeg_7-headless;
62 ffmpeg-full = ffmpeg_7-full;
63}