summary refs log tree commit diff
path: root/pkgs/development/libraries/ffmpeg/generic.nix
diff options
context:
space:
mode:
authortilpner <git@tilpner.com>2023-03-22 16:04:16 +0100
committertilpner <git@tilpner.com>2023-03-23 12:34:51 +0100
commitc6c2c7a293cb8816c42d20049c6d5e78916cb24d (patch)
tree3e90fee21bd8a0d010056a3edc97f8db7c94dda2 /pkgs/development/libraries/ffmpeg/generic.nix
parent396918ad019dc1f84fa65d3c548bc9c22f84a73b (diff)
downloadnixpkgs-c6c2c7a293cb8816c42d20049c6d5e78916cb24d.tar
nixpkgs-c6c2c7a293cb8816c42d20049c6d5e78916cb24d.tar.gz
nixpkgs-c6c2c7a293cb8816c42d20049c6d5e78916cb24d.tar.bz2
nixpkgs-c6c2c7a293cb8816c42d20049c6d5e78916cb24d.tar.lz
nixpkgs-c6c2c7a293cb8816c42d20049c6d5e78916cb24d.tar.xz
nixpkgs-c6c2c7a293cb8816c42d20049c6d5e78916cb24d.tar.zst
nixpkgs-c6c2c7a293cb8816c42d20049c6d5e78916cb24d.zip
ffmpeg_6: init at 6.0
Diffstat (limited to 'pkgs/development/libraries/ffmpeg/generic.nix')
-rw-r--r--pkgs/development/libraries/ffmpeg/generic.nix12
1 files changed, 10 insertions, 2 deletions
diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix
index de78e8b75c4..0ece46f3266 100644
--- a/pkgs/development/libraries/ffmpeg/generic.nix
+++ b/pkgs/development/libraries/ffmpeg/generic.nix
@@ -227,6 +227,7 @@
 , libxml2
 , xz
 , nv-codec-headers
+, nv-codec-headers-11
 , openal
 , ocl-icd # OpenCL ICD
 , opencl-headers  # OpenCL headers
@@ -348,7 +349,14 @@ stdenv.mkDerivation (finalAttrs: {
       --replace VK_EXT_VIDEO_DECODE VK_KHR_VIDEO_DECODE
   '';
 
-  patches = map (patch: fetchpatch patch) extraPatches;
+  patches = map (patch: fetchpatch patch) (extraPatches
+    ++ (lib.optional (lib.versionAtLeast version "6" && lib.versionOlder version "6.1")
+      { # this can be removed post 6.1
+        name = "fix_aacps_tablegen";
+        url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/814178f92647be2411516bbb82f48532373d2554";
+        hash = "sha256-FQV9/PiarPXCm45ldtCsxGHjlrriL8DKpn1LaKJ8owI=";
+      }
+    ));
 
   configurePlatforms = [];
   setOutputFlags = false; # Only accepts some of them
@@ -539,7 +547,7 @@ stdenv.mkDerivation (finalAttrs: {
   # TODO This was always in buildInputs before, why?
   buildInputs = optionals withFullDeps [ libdc1394 ]
   ++ optionals (withFullDeps && !stdenv.isDarwin) [ libraw1394 ] # TODO where does this belong to
-  ++ optionals (withNvdec || withNvenc) [ nv-codec-headers ]
+  ++ optionals (withNvdec || withNvenc) [ (if (lib.versionAtLeast version "6") then nv-codec-headers-11 else nv-codec-headers) ]
   ++ optionals withAlsa [ alsa-lib ]
   ++ optionals withAom [ libaom ]
   ++ optionals withAss [ libass ]