diff --git a/pkgs/development/libraries/ffmpeg/0001-avfoundation.m-macOS-SDK-10.12-compatibility.patch b/pkgs/development/libraries/ffmpeg/0001-avfoundation.m-macOS-SDK-10.12-compatibility.patch deleted file mode 100644 index 60004b1766ca2..0000000000000 --- a/pkgs/development/libraries/ffmpeg/0001-avfoundation.m-macOS-SDK-10.12-compatibility.patch +++ /dev/null @@ -1,25 +0,0 @@ -From a804dd05351716b1fd9a7c2b7ed636613edd9c0f Mon Sep 17 00:00:00 2001 -From: toonn -Date: Fri, 21 Jun 2024 18:59:49 +0000 -Subject: [PATCH] avfoundation.m: macOS SDK 10.12 compatibility - ---- - libavdevice/avfoundation.m | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m -index d9b17ccdae..2a1f66d751 100644 ---- a/libavdevice/avfoundation.m -+++ b/libavdevice/avfoundation.m -@@ -762,7 +762,7 @@ static int get_audio_config(AVFormatContext *s) - return 0; - } - --static NSArray* getDevicesWithMediaType(AVMediaType mediaType) { -+static NSArray* getDevicesWithMediaType(NSString * mediaType) { - #if ((TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000) || (TARGET_OS_OSX && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500)) - NSMutableArray *deviceTypes = nil; - if (mediaType == AVMediaTypeVideo) { --- -2.44.0 - diff --git a/pkgs/development/libraries/ffmpeg/default.nix b/pkgs/development/libraries/ffmpeg/default.nix index eac16d659dac9..d07551608a54d 100644 --- a/pkgs/development/libraries/ffmpeg/default.nix +++ b/pkgs/development/libraries/ffmpeg/default.nix @@ -9,14 +9,6 @@ let initArgs: ffmpegVariant: callPackage ./generic.nix ( { - inherit (darwin.apple_sdk.frameworks) - Accelerate - AppKit - AudioToolbox - AVFoundation - CoreImage - VideoToolbox - ; inherit (darwin) xcode; inherit (cudaPackages) cuda_cudart cuda_nvcc libnpp; } diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index f6f85b5b8e2a4..52104529e162a 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -36,12 +36,9 @@ , withAlsa ? withHeadlessDeps && stdenv.hostPlatform.isLinux # Alsa in/output supporT , withAmf ? lib.meta.availableOn stdenv.hostPlatform amf # AMD Media Framework video encoding , withAom ? withHeadlessDeps # AV1 reference encoder -, withAppKit ? withHeadlessDeps && stdenv.hostPlatform.isDarwin # Apple AppKit framework , withAribb24 ? withFullDeps # ARIB text and caption decoding , withAribcaption ? withFullDeps && lib.versionAtLeast version "6.1" # ARIB STD-B24 Caption Decoder/Renderer , withAss ? withHeadlessDeps && stdenv.hostPlatform == stdenv.buildPlatform # (Advanced) SubStation Alpha subtitle rendering -, withAudioToolbox ? withHeadlessDeps && stdenv.hostPlatform.isDarwin # Apple AudioToolbox -, withAvFoundation ? withHeadlessDeps && stdenv.hostPlatform.isDarwin # Apple AVFoundation framework , withAvisynth ? withFullDeps # AviSynth script files reading , withBluray ? withFullDeps # BluRay reading , withBs2b ? withFullDeps # bs2b DSP library @@ -51,7 +48,6 @@ , withCelt ? withHeadlessDeps # CELT decoder , withChromaprint ? withFullDeps # Audio fingerprinting , withCodec2 ? withFullDeps # codec2 en/decoding -, withCoreImage ? withHeadlessDeps && stdenv.hostPlatform.isDarwin # Apple CoreImage framework , withCuda ? withFullDeps && withNvcodec , withCudaLLVM ? withFullDeps , withCudaNVCC ? withFullDeps && withUnfree && config.cudaSupport @@ -121,7 +117,6 @@ , withV4l2M2m ? withV4l2 , withVaapi ? withHeadlessDeps && (with stdenv; isLinux || isFreeBSD) # Vaapi hardware acceleration , withVdpau ? withSmallDeps && !stdenv.hostPlatform.isMinGW # Vdpau hardware acceleration -, withVideoToolbox ? withHeadlessDeps && stdenv.hostPlatform.isDarwin # Apple VideoToolbox , withVidStab ? withHeadlessDeps && withGPL # Video stabilization , withVmaf ? withFullDeps && !stdenv.hostPlatform.isAarch64 && lib.versionAtLeast version "5" # Netflix's VMAF (Video Multi-Method Assessment Fusion) , withVoAmrwbenc ? withFullDeps && withVersion3 # AMR-WB encoder @@ -333,14 +328,9 @@ , zlib , zvbi /* - * Darwin frameworks + * Darwin */ -, Accelerate -, AppKit -, AudioToolbox -, AVFoundation -, CoreImage -, VideoToolbox +, apple-sdk_15 , xcode # unfree contains metalcc and metallib /* * Cuda Packages @@ -465,7 +455,6 @@ stdenv.mkDerivation (finalAttrs: { }) ] ++ optionals (lib.versionAtLeast version "7.1") [ - ./0001-avfoundation.m-macOS-SDK-10.12-compatibility.patch ./fix-fate-ffmpeg-spec-disposition-7.1.patch # Expose a private API for Chromium / Qt WebEngine. @@ -560,14 +549,11 @@ stdenv.mkDerivation (finalAttrs: { (enableFeature withAlsa "alsa") (enableFeature withAmf "amf") (enableFeature withAom "libaom") - (enableFeature withAppKit "appkit") (enableFeature withAribb24 "libaribb24") ] ++ optionals (versionAtLeast version "6.1") [ (enableFeature withAribcaption "libaribcaption") ] ++ [ (enableFeature withAss "libass") - (enableFeature withAudioToolbox "audiotoolbox") - (enableFeature withAvFoundation "avfoundation") (enableFeature withAvisynth "avisynth") (enableFeature withBluray "libbluray") (enableFeature withBs2b "libbs2b") @@ -577,7 +563,6 @@ stdenv.mkDerivation (finalAttrs: { (enableFeature withCelt "libcelt") (enableFeature withChromaprint "chromaprint") (enableFeature withCodec2 "libcodec2") - (enableFeature withCoreImage "coreimage") (enableFeature withCuda "cuda") (enableFeature withCudaLLVM "cuda-llvm") (enableFeature withCudaNVCC "cuda-nvcc") @@ -667,7 +652,6 @@ stdenv.mkDerivation (finalAttrs: { ] ++ optionals (versionAtLeast version "6.0") [ (enableFeature withVpl "libvpl") ] ++ [ - (enableFeature withVideoToolbox "videotoolbox") (enableFeature withVidStab "libvidstab") # Actual min. version 2.0 (enableFeature withVmaf "libvmaf") (enableFeature withVoAmrwbenc "libvo-amrwbenc") @@ -732,15 +716,13 @@ stdenv.mkDerivation (finalAttrs: { ++ optionals withCudaNVCC [ cuda_nvcc ]; buildInputs = [] + ++ optionals stdenv.hostPlatform.isDarwin [ apple-sdk_15 ] ++ optionals withAlsa [ alsa-lib ] ++ optionals withAmf [ amf-headers ] ++ optionals withAom [ libaom ] - ++ optionals withAppKit [ AppKit ] ++ optionals withAribb24 [ aribb24 ] ++ optionals withAribcaption [ libaribcaption ] ++ optionals withAss [ libass ] - ++ optionals withAudioToolbox [ AudioToolbox ] - ++ optionals withAvFoundation [ AVFoundation ] ++ optionals withAvisynth [ avisynthplus ] ++ optionals withBluray [ libbluray ] ++ optionals withBs2b [ libbs2b ] @@ -750,7 +732,6 @@ stdenv.mkDerivation (finalAttrs: { ++ optionals withCelt [ celt ] ++ optionals withChromaprint [ chromaprint ] ++ optionals withCodec2 [ codec2 ] - ++ optionals withCoreImage [ CoreImage ] ++ optionals withCudaNVCC [ cuda_cudart cuda_nvcc ] ++ optionals withDav1d [ dav1d ] ++ optionals withDc1394 [ libdc1394 libraw1394 ] @@ -794,7 +775,7 @@ stdenv.mkDerivation (finalAttrs: { ++ optionals withQuirc [ quirc ] ++ optionals withRav1e [ rav1e ] ++ optionals withRtmp [ rtmpdump ] - ++ optionals withRubberband ([ rubberband ] ++ lib.optional stdenv.hostPlatform.isDarwin Accelerate) + ++ optionals withRubberband [ rubberband ] ++ optionals withSamba [ samba ] ++ optionals withSdl2 [ SDL2 ] ++ optionals withShaderc [ shaderc ] @@ -812,7 +793,6 @@ stdenv.mkDerivation (finalAttrs: { ++ optionals withV4l2 [ libv4l ] ++ optionals withVaapi [ (if withSmallDeps then libva else libva-minimal) ] ++ optionals withVdpau [ libvdpau ] - ++ optionals withVideoToolbox [ VideoToolbox ] ++ optionals withVidStab [ vid-stab ] ++ optionals withVmaf [ libvmaf ] ++ optionals withVoAmrwbenc [ vo-amrwbenc ]