about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDmitry Kalinkin <dmitry.kalinkin@gmail.com>2016-09-06 04:58:34 -0400
committervbgl <vbgl@users.noreply.github.com>2016-09-06 10:58:34 +0200
commite7afac83c95c7ac03a1d82c5bdd94feebb44aec8 (patch)
tree3cb917963f11d2dced58601900e9ab59cc877264
parent28ceb0f31a32f70ac90ac68fe405438ae1498ad3 (diff)
downloadnixlib-e7afac83c95c7ac03a1d82c5bdd94feebb44aec8.tar
nixlib-e7afac83c95c7ac03a1d82c5bdd94feebb44aec8.tar.gz
nixlib-e7afac83c95c7ac03a1d82c5bdd94feebb44aec8.tar.bz2
nixlib-e7afac83c95c7ac03a1d82c5bdd94feebb44aec8.tar.lz
nixlib-e7afac83c95c7ac03a1d82c5bdd94feebb44aec8.tar.xz
nixlib-e7afac83c95c7ac03a1d82c5bdd94feebb44aec8.tar.zst
nixlib-e7afac83c95c7ac03a1d82c5bdd94feebb44aec8.zip
ffmpeg3: fix darwin build (#18350)
-rw-r--r--pkgs/development/libraries/ffmpeg/3.1.nix3
-rw-r--r--pkgs/development/libraries/ffmpeg/sdk_detection.patch12
2 files changed, 14 insertions, 1 deletions
diff --git a/pkgs/development/libraries/ffmpeg/3.1.nix b/pkgs/development/libraries/ffmpeg/3.1.nix
index c0e70f1f3486..fd5ce7c19d84 100644
--- a/pkgs/development/libraries/ffmpeg/3.1.nix
+++ b/pkgs/development/libraries/ffmpeg/3.1.nix
@@ -1,4 +1,4 @@
-{ callPackage
+{ stdenv, callPackage
 # Darwin frameworks
 , Cocoa, CoreMedia
 , ...
@@ -9,4 +9,5 @@ callPackage ./generic.nix (args // rec {
   branch = "3.1";
   sha256 = "0f4ajs0c4088nkal4gqagx05wfyhd1izfxmzxxsdh56ibp38kg2q";
   darwinFrameworks = [ Cocoa CoreMedia ];
+  patches = stdenv.lib.optional stdenv.isDarwin ./sdk_detection.patch;
 })
diff --git a/pkgs/development/libraries/ffmpeg/sdk_detection.patch b/pkgs/development/libraries/ffmpeg/sdk_detection.patch
new file mode 100644
index 000000000000..f0b8789c66b5
--- /dev/null
+++ b/pkgs/development/libraries/ffmpeg/sdk_detection.patch
@@ -0,0 +1,12 @@
+diff --git a/libavcodec/audiotoolboxdec.c b/libavcodec/audiotoolboxdec.c
+--- a/libavcodec/audiotoolboxdec.c
++++ b/libavcodec/audiotoolboxdec.c
+@@ -32,7 +32,7 @@
+ #include "libavutil/opt.h"
+ #include "libavutil/log.h"
+ 
+-#ifndef __MAC_10_11
++#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101100
+ #define kAudioFormatEnhancedAC3 'ec-3'
+ #endif
+