about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorSean Link <sean.link@lightdeckdx.com>2024-03-12 09:24:13 -0600
committerSean Link <sean.link@lightdeckdx.com>2024-03-13 10:03:56 -0600
commit5857c130fcc6078ed4d330b75880f2e7a1210351 (patch)
tree29ab64aabae85c1ea9b4f52e9087873c2130a1dc /pkgs
parent08c37ba89950cd10f4eaf6a10f7c8593bee6efb8 (diff)
downloadnixlib-5857c130fcc6078ed4d330b75880f2e7a1210351.tar
nixlib-5857c130fcc6078ed4d330b75880f2e7a1210351.tar.gz
nixlib-5857c130fcc6078ed4d330b75880f2e7a1210351.tar.bz2
nixlib-5857c130fcc6078ed4d330b75880f2e7a1210351.tar.lz
nixlib-5857c130fcc6078ed4d330b75880f2e7a1210351.tar.xz
nixlib-5857c130fcc6078ed4d330b75880f2e7a1210351.tar.zst
nixlib-5857c130fcc6078ed4d330b75880f2e7a1210351.zip
ffmpeg: add mingw support
Part of a larger effort to add mingw support for qtmultimedia.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/ffmpeg/generic.nix12
1 files changed, 7 insertions, 5 deletions
diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix
index 2410547e2df6..8034980c8b18 100644
--- a/pkgs/development/libraries/ffmpeg/generic.nix
+++ b/pkgs/development/libraries/ffmpeg/generic.nix
@@ -71,7 +71,7 @@
 , withOpenmpt ? withFullDeps # Tracked music files decoder
 , withOpus ? withHeadlessDeps # Opus de/encoder
 , withPlacebo ? withFullDeps && !stdenv.isDarwin # libplacebo video processing library
-, withPulse ? withSmallDeps && !stdenv.isDarwin # Pulseaudio input support
+, withPulse ? withSmallDeps && stdenv.isLinux # Pulseaudio input support
 , withRav1e ? withFullDeps # AV1 encoder (focused on speed and safety)
 , withRtmp ? false # RTMP[E] support
 , withSamba ? withFullDeps && !stdenv.isDarwin && withGPLv3 # Samba protocol
@@ -82,13 +82,13 @@
 , withSrt ? withHeadlessDeps # Secure Reliable Transport (SRT) protocol
 , withSsh ? withHeadlessDeps # SFTP protocol
 , withSvg ? withFullDeps # SVG protocol
-, withSvtav1 ? withHeadlessDeps && !stdenv.isAarch64 # AV1 encoder/decoder (focused on speed and correctness)
+, withSvtav1 ? withHeadlessDeps && !stdenv.isAarch64 && !stdenv.hostPlatform.isMinGW # AV1 encoder/decoder (focused on speed and correctness)
 , withTensorflow ? false # Tensorflow dnn backend support
 , withTheora ? withHeadlessDeps # Theora encoder
-, withV4l2 ? withHeadlessDeps && !stdenv.isDarwin # Video 4 Linux support
+, withV4l2 ? withHeadlessDeps && stdenv.isLinux  # Video 4 Linux support
 , withV4l2M2m ? withV4l2
 , withVaapi ? withHeadlessDeps && (with stdenv; isLinux || isFreeBSD) # Vaapi hardware acceleration
-, withVdpau ? withSmallDeps # Vdpau hardware acceleration
+, withVdpau ? withSmallDeps && !stdenv.hostPlatform.isMinGW # Vdpau hardware acceleration
 , withVidStab ? withFullDeps && withGPL # Video stabilization
 , withVmaf ? withFullDeps && !stdenv.isAarch64 && lib.versionAtLeast version "5" # Netflix's VMAF (Video Multi-Method Assessment Fusion)
 , withVoAmrwbenc ? withFullDeps && withVersion3 # AMR-WB encoder
@@ -722,7 +722,7 @@ stdenv.mkDerivation (finalAttrs: {
     addOpenGLRunpath ${placeholder "lib"}/lib/libavutil.so
   ''
   # https://trac.ffmpeg.org/ticket/10809
-  + optionalString (versionAtLeast version "5.0" && withVulkan) ''
+  + optionalString (versionAtLeast version "5.0" && withVulkan && !stdenv.hostPlatform.isMinGW) ''
     patchelf $lib/lib/libavcodec.so --add-needed libvulkan.so --add-rpath ${lib.makeLibraryPath [ vulkan-loader ]}
   '';
 
@@ -749,6 +749,8 @@ stdenv.mkDerivation (finalAttrs: {
       ++ optional (withGPL && withUnfree) unfree;
     pkgConfigModules = [ "libavutil" ];
     platforms = platforms.all;
+    # See https://github.com/NixOS/nixpkgs/pull/295344#issuecomment-1992263658
+    broken = stdenv.hostPlatform.isMinGW && stdenv.hostPlatform.is64bit;
     maintainers = with maintainers; [ atemu arthsmn jopejoe1 ];
     mainProgram = "ffmpeg";
   };