Unverified Commit c2e0c0ba authored by Atemu's avatar Atemu Committed by GitHub
Browse files

Merge pull request #295344 from seanybaggins/add-mingw-support-ffmpeg

ffmpeg: add `mingw` support 
parents 30d91b59 5857c130
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -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";
  };