summary refs log tree commit diff
diff options
context:
space:
mode:
authorxeji <36407913+xeji@users.noreply.github.com>2018-07-16 17:16:56 +0200
committerGitHub <noreply@github.com>2018-07-16 17:16:56 +0200
commitf4fbdf0578105521d0ef4c4af02074c9d25159a3 (patch)
treedec87c3984f0b849e5ae810d3c8a49dc0e514b14
parent862e4e4fdb665981b140fda9dcf7298f09fbc061 (diff)
parent2d9cc7a3bf8573d5b67c923b50bb7307bd74925e (diff)
downloadnixlib-f4fbdf0578105521d0ef4c4af02074c9d25159a3.tar
nixlib-f4fbdf0578105521d0ef4c4af02074c9d25159a3.tar.gz
nixlib-f4fbdf0578105521d0ef4c4af02074c9d25159a3.tar.bz2
nixlib-f4fbdf0578105521d0ef4c4af02074c9d25159a3.tar.lz
nixlib-f4fbdf0578105521d0ef4c4af02074c9d25159a3.tar.xz
nixlib-f4fbdf0578105521d0ef4c4af02074c9d25159a3.tar.zst
nixlib-f4fbdf0578105521d0ef4c4af02074c9d25159a3.zip
Merge pull request #43601 from thefloweringash/ffmpeg-libvpx
ffmpeg, ffmpeg-full: enable libvpx on Darwin
-rw-r--r--pkgs/development/libraries/ffmpeg/generic.nix9
-rw-r--r--pkgs/top-level/all-packages.nix1
2 files changed, 6 insertions, 4 deletions
diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix
index bc70c5ab2371..3d9027db1602 100644
--- a/pkgs/development/libraries/ffmpeg/generic.nix
+++ b/pkgs/development/libraries/ffmpeg/generic.nix
@@ -26,7 +26,7 @@
  * see `ffmpeg-full' for an ffmpeg build with all features included.
  *
  * Need fixes to support Darwin:
- *   libvpx pulseaudio
+ *   pulseaudio
  *
  * Known issues:
  * 0.6     - fails to compile (unresolved) (so far, only disabling a number of
@@ -58,6 +58,8 @@ let
   disDarwinOrArmFix = origArg: minVer: fixArg: if ((isDarwin || isAarch32) && reqMin minVer) then fixArg else origArg;
 
   vaapiSupport = reqMin "0.6" && ((isLinux || isFreeBSD) && !isAarch32);
+
+  vpxSupport = reqMin "0.6" && !isAarch32;
 in
 
 assert openglSupport -> libGLU_combined != null;
@@ -130,7 +132,7 @@ stdenv.mkDerivation rec {
       (ifMinVer "0.6" (enableFeature vaapiSupport "vaapi"))
       "--enable-vdpau"
       "--enable-libvorbis"
-      (disDarwinOrArmFix (ifMinVer "0.6" "--enable-libvpx") "0.6" "--disable-libvpx")
+      (ifMinVer "0.6" (enableFeature vpxSupport "libvpx"))
       (ifMinVer "2.4" "--enable-lzma")
       (ifMinVer "2.2" (enableFeature openglSupport "opengl"))
       (disDarwinOrArmFix (ifMinVer "0.9" "--enable-libpulse") "0.9" "--disable-libpulse")
@@ -159,7 +161,8 @@ stdenv.mkDerivation rec {
     bzip2 fontconfig freetype gnutls libiconv lame libass libogg libtheora
     libvdpau libvorbis lzma soxr x264 x265 xvidcore zlib libopus
   ] ++ optional openglSupport libGLU_combined
-    ++ optionals (!isDarwin && !isAarch32) [ libvpx libpulseaudio ] # Need to be fixed on Darwin and ARM
+    ++ optional vpxSupport libvpx
+    ++ optionals (!isDarwin && !isAarch32) [ libpulseaudio ] # Need to be fixed on Darwin and ARM
     ++ optional ((isLinux || isFreeBSD) && !isAarch32) libva
     ++ optional isLinux alsaLib
     ++ optionals isDarwin darwinFrameworks
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index e0e4bfd40435..2f2c3e952800 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -9138,7 +9138,6 @@ with pkgs;
     game-music-emu = if stdenv.isDarwin then null else game-music-emu;
     libjack2 = if stdenv.isDarwin then null else libjack2;
     libmodplug = if stdenv.isDarwin then null else libmodplug;
-    libvpx = if stdenv.isDarwin then null else libvpx;
     openal = if stdenv.isDarwin then null else openal;
     libpulseaudio = if stdenv.isDarwin then null else libpulseaudio;
     samba = if stdenv.isDarwin then null else samba;