summary refs log tree commit diff
path: root/pkgs/development/libraries/ffmpeg
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2020-01-03 15:34:20 -0500
committerMatthew Bauer <mjbauer95@gmail.com>2020-01-03 15:34:20 -0500
commit9c1a2ac51e365d7ef78315bb8eb24874823a6176 (patch)
tree341d952a81e3f453bff9196be1672dc3bd60ee7b /pkgs/development/libraries/ffmpeg
parent8b41b16a9f1210d8a4556a9c412072fffbf4fb95 (diff)
parentba9fdecba34d52cb157a8da9992a9ea93c549fe8 (diff)
downloadnixpkgs-9c1a2ac51e365d7ef78315bb8eb24874823a6176.tar
nixpkgs-9c1a2ac51e365d7ef78315bb8eb24874823a6176.tar.gz
nixpkgs-9c1a2ac51e365d7ef78315bb8eb24874823a6176.tar.bz2
nixpkgs-9c1a2ac51e365d7ef78315bb8eb24874823a6176.tar.lz
nixpkgs-9c1a2ac51e365d7ef78315bb8eb24874823a6176.tar.xz
nixpkgs-9c1a2ac51e365d7ef78315bb8eb24874823a6176.tar.zst
nixpkgs-9c1a2ac51e365d7ef78315bb8eb24874823a6176.zip
Merge remote-tracking branch 'origin/master' into ios-with-xcode-11
Diffstat (limited to 'pkgs/development/libraries/ffmpeg')
-rw-r--r--pkgs/development/libraries/ffmpeg/2.8.nix4
-rw-r--r--pkgs/development/libraries/ffmpeg/3.4.nix8
-rw-r--r--pkgs/development/libraries/ffmpeg/4.nix8
-rw-r--r--pkgs/development/libraries/ffmpeg/generic.nix26
4 files changed, 29 insertions, 17 deletions
diff --git a/pkgs/development/libraries/ffmpeg/2.8.nix b/pkgs/development/libraries/ffmpeg/2.8.nix
index 5ffbc215d8b..98ada9a3f09 100644
--- a/pkgs/development/libraries/ffmpeg/2.8.nix
+++ b/pkgs/development/libraries/ffmpeg/2.8.nix
@@ -1,7 +1,7 @@
 { callPackage, ... } @ args:
 
-callPackage ./generic.nix (args // rec {
+callPackage ./generic.nix (rec {
   version = "${branch}.14";
   branch = "2.8";
   sha256 = "1g6x3lyjl1zlfksizj1ys61kj97yg0xf4dlr6sr5acpbja3a26yn";
-})
+} // args)
diff --git a/pkgs/development/libraries/ffmpeg/3.4.nix b/pkgs/development/libraries/ffmpeg/3.4.nix
index bea367b2554..6c16b55dfe8 100644
--- a/pkgs/development/libraries/ffmpeg/3.4.nix
+++ b/pkgs/development/libraries/ffmpeg/3.4.nix
@@ -4,9 +4,9 @@
 , ...
 }@args:
 
-callPackage ./generic.nix (args // rec {
+callPackage ./generic.nix (rec {
   version = branch;
-  branch = "3.4.6";
-  sha256 = "1s20wzgxxrm56gckyb8cf1lh36hdnkdxvmmnnvdxvia4zb3grf1b";
+  branch = "3.4.7";
+  sha256 = "0hj91gjps92f4w3yyqss89yrs6s75574hbj5gz9g5affd6294yhc";
   darwinFrameworks = [ Cocoa CoreMedia ];
-})
+} // args)
diff --git a/pkgs/development/libraries/ffmpeg/4.nix b/pkgs/development/libraries/ffmpeg/4.nix
index 670f51000a6..387069d1618 100644
--- a/pkgs/development/libraries/ffmpeg/4.nix
+++ b/pkgs/development/libraries/ffmpeg/4.nix
@@ -4,9 +4,9 @@
 , ...
 }@args:
 
-callPackage ./generic.nix (args // rec {
-  version = branch;
+callPackage ./generic.nix (rec {
+  version = "4.2.1";
   branch = "4.2";
-  sha256 = "1f3glany3p2j832a9wia5vj8ds9xpm0xxlyia91y17hy85gxwsrh";
+  sha256 = "090naa6rj46pzkgh03bf51hbqdz356qqckr2pw6pykc6ysiryak8";
   darwinFrameworks = [ Cocoa CoreMedia VideoToolbox ];
-})
+} // args)
diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix
index 4c0ca0210cc..3424493c209 100644
--- a/pkgs/development/libraries/ffmpeg/generic.nix
+++ b/pkgs/development/libraries/ffmpeg/generic.nix
@@ -1,8 +1,10 @@
-{ stdenv, fetchurl, pkgconfig, perl, texinfo, yasm
+{ stdenv, fetchurl, pkgconfig, addOpenGLRunpath, perl, texinfo, yasm
 , alsaLib, bzip2, fontconfig, freetype, gnutls, libiconv, lame, libass, libogg
 , libssh, libtheora, libva, libdrm, libvorbis, libvpx, lzma, libpulseaudio, soxr
 , x264, x265, xvidcore, zlib, libopus, speex, nv-codec-headers, dav1d
-, openglSupport ? false, libGLU_combined ? null
+, openglSupport ? false, libGLU ? null, libGL ? null
+, libmfxSupport ? false, intel-media-sdk ? null
+, libaomSupport ? false, libaom ? null
 # Build options
 , runtimeCpuDetectBuild ? true # Detect CPU capabilities at runtime
 , multithreadBuild ? true # Multithreading via pthreads/win32 threads
@@ -42,7 +44,7 @@
 
 let
   inherit (stdenv) isDarwin isFreeBSD isLinux isAarch32;
-  inherit (stdenv.lib) optional optionals enableFeature;
+  inherit (stdenv.lib) optional optionals optionalString enableFeature;
 
   cmpVer = builtins.compareVersions;
   reqMin = requiredVersion: (cmpVer requiredVersion branch != 1);
@@ -61,7 +63,9 @@ let
   vpxSupport = reqMin "0.6" && !isAarch32;
 in
 
-assert openglSupport -> libGLU_combined != null;
+assert openglSupport -> libGL != null && libGLU != null;
+assert libmfxSupport -> intel-media-sdk != null;
+assert libaomSupport -> libaom != null;
 
 stdenv.mkDerivation rec {
 
@@ -135,6 +139,8 @@ stdenv.mkDerivation rec {
       (ifMinVer "0.6" (enableFeature vpxSupport "libvpx"))
       (ifMinVer "2.4" "--enable-lzma")
       (ifMinVer "2.2" (enableFeature openglSupport "opengl"))
+      (ifMinVer "4.2" (enableFeature libmfxSupport "libmfx"))
+      (ifMinVer "4.2" (enableFeature libaomSupport "libaom"))
       (disDarwinOrArmFix (ifMinVer "0.9" "--enable-libpulse") "0.9" "--disable-libpulse")
       (ifMinVer "2.5" (if sdlSupport && reqMin "3.2" then "--enable-sdl2" else if sdlSupport then "--enable-sdl" else null)) # autodetected before 2.5, SDL1 support removed in 3.2 for SDL2
       (ifMinVer "1.2" "--enable-libsoxr")
@@ -157,12 +163,14 @@ stdenv.mkDerivation rec {
       "--enable-cross-compile"
   ] ++ optional stdenv.cc.isClang "--cc=clang";
 
-  nativeBuildInputs = [ perl pkgconfig texinfo yasm ];
+  nativeBuildInputs = [ addOpenGLRunpath perl pkgconfig texinfo yasm ];
 
   buildInputs = [
     bzip2 fontconfig freetype gnutls libiconv lame libass libogg libssh libtheora
     libvdpau libvorbis lzma soxr x264 x265 xvidcore zlib libopus speex nv-codec-headers
-  ] ++ optional openglSupport libGLU_combined
+  ] ++ optionals openglSupport [ libGL libGLU ]
+    ++ optional libmfxSupport intel-media-sdk
+    ++ optional vpxSupport libaom
     ++ optional vpxSupport libvpx
     ++ optionals (!isDarwin && !isAarch32) [ libpulseaudio ] # Need to be fixed on Darwin and ARM
     ++ optional ((isLinux || isFreeBSD) && !isAarch32) libva
@@ -186,6 +194,10 @@ stdenv.mkDerivation rec {
       substituteInPlace $pc \
         --replace "includedir=$out" "includedir=''${!outputInclude}"
     done
+  '' + optionalString stdenv.isLinux ''
+    # Set RUNPATH so that libnvcuvid in /run/opengl-driver(-32)/lib can be found.
+    # See the explanation in addOpenGLRunpath.
+    addOpenGLRunpath $out/lib/libavcodec.so*
   '';
 
   installFlags = [ "install-man" ];
@@ -206,7 +218,7 @@ stdenv.mkDerivation rec {
     '';
     license = licenses.gpl3;
     platforms = platforms.all;
-    maintainers = with maintainers; [ codyopel fuuzetsu ];
+    maintainers = with maintainers; [ codyopel ];
     inherit branch;
   };
 }