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 };
32 v8 = {
33 version = "8.0";
34 hash = "sha256-okNZ1/m/thFAY3jK/GSV0+WZFnjrMr8uBPsOdH6Wq9E=";
35 };
36in
37
38rec {
39 # We keep FFmpeg 4 around for now mainly for a couple of binary
40 # packages (Spotify and REAPER). Please don’t add new source packages
41 # that depend on this version.
42 ffmpeg_4 = mkFFmpeg v4 "small";
43 ffmpeg_4-headless = mkFFmpeg v4 "headless";
44 ffmpeg_4-full = mkFFmpeg v4 "full";
45
46 ffmpeg_6 = mkFFmpeg v6 "small";
47 ffmpeg_6-headless = mkFFmpeg v6 "headless";
48 ffmpeg_6-full = mkFFmpeg v6 "full";
49
50 ffmpeg_7 = mkFFmpeg v7 "small";
51 ffmpeg_7-headless = mkFFmpeg v7 "headless";
52 ffmpeg_7-full = mkFFmpeg v7 "full";
53
54 ffmpeg_8 = mkFFmpeg v8 "small";
55 ffmpeg_8-headless = mkFFmpeg v8 "headless";
56 ffmpeg_8-full = mkFFmpeg v8 "full";
57
58 # Please make sure this is updated to new major versions once they
59 # build and work on all the major platforms. If absolutely necessary
60 # due to severe breaking changes, the bump can wait a little bit to
61 # give the most proactive users time to migrate, but don’t hold off
62 # for too long.
63 #
64 # Packages which depend on FFmpeg should generally use these
65 # unversioned aliases to allow for quicker migration to new releases,
66 # but can pin one of the versioned variants if they do not work with
67 # the current default version.
68 ffmpeg = ffmpeg_7;
69 ffmpeg-headless = ffmpeg_7-headless;
70 ffmpeg-full = ffmpeg_7-full;
71}