From 8bbb3e7f23423d819cd2cb865dd61c7a6d117dc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 3 Sep 2022 21:35:27 +0200 Subject: [PATCH 1/8] ffmpeg: remove not necessary ? null --- pkgs/development/libraries/ffmpeg/generic.nix | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 855586649b74..2db1ff41c53f 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -2,15 +2,15 @@ , alsa-lib, bzip2, fontconfig, freetype, gnutls, libiconv, lame, libass, libogg , libssh, libtheora, libva, libdrm, libvorbis, libvpx, xz, soxr , x264, x265, xvidcore, zimg, zlib, libopus, speex, nv-codec-headers, dav1d -, srt ? null -, openglSupport ? false, libGLU ? null, libGL ? null -, libmfxSupport ? false, intel-media-sdk ? null -, libaomSupport ? false, libaom ? null +, srt +, openglSupport ? false, libGLU, libGL +, libmfxSupport ? false, intel-media-sdk +, libaomSupport ? false, libaom # Build options , runtimeCpuDetectBuild ? true # Detect CPU capabilities at runtime , multithreadBuild ? true # Multithreading via pthreads/win32 threads -, sdlSupport ? !stdenv.isAarch32, SDL ? null, SDL2 ? null -, vdpauSupport ? !stdenv.isAarch32, libvdpau ? null +, sdlSupport ? !stdenv.isAarch32, SDL, SDL2 +, vdpauSupport ? !stdenv.isAarch32, libvdpau # Developer options , debugDeveloper ? false , optimizationsDeveloper ? true @@ -70,10 +70,6 @@ let vpxSupport = reqMin "0.6" && !isAarch32; in -assert openglSupport -> libGL != null && libGLU != null; -assert libmfxSupport -> intel-media-sdk != null; -assert libaomSupport -> libaom != null; - stdenv.mkDerivation rec { pname = "ffmpeg"; From 8d6cdd8abaa1d944f54330887c301431a404157f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 3 Sep 2022 21:35:40 +0200 Subject: [PATCH 2/8] ffmpeg: cleanup darwin frameworks --- pkgs/development/libraries/ffmpeg/4.nix | 11 +++-------- pkgs/development/libraries/ffmpeg/5.nix | 7 +------ pkgs/development/libraries/ffmpeg/generic.nix | 5 ++--- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/4.nix b/pkgs/development/libraries/ffmpeg/4.nix index b518b7527ac0..e37e90d553a3 100644 --- a/pkgs/development/libraries/ffmpeg/4.nix +++ b/pkgs/development/libraries/ffmpeg/4.nix @@ -1,17 +1,12 @@ -{ callPackage, fetchpatch -# Darwin frameworks -, Cocoa, CoreMedia, VideoToolbox -, stdenv, lib -, ... -}@args: +{ callPackage, fetchpatch, ... }@args: callPackage ./generic.nix (rec { version = "4.4.2"; branch = version; sha256 = "sha256-+YpIJSDEdQdSGpB5FNqp77wThOBZG1r8PaGKqJfeKUg="; - darwinFrameworks = [ Cocoa CoreMedia VideoToolbox ]; + patches = [ - # sdl2 recently changed their versioning + # SDL2 recently changed their versioning (fetchpatch { url = "https://git.videolan.org/?p=ffmpeg.git;a=patch;h=e5163b1d34381a3319214a902ef1df923dd2eeba"; hash = "sha256-nLhP2+34cj5EgpnUrePZp60nYAxmbhZAEDfay4pBVk0="; diff --git a/pkgs/development/libraries/ffmpeg/5.nix b/pkgs/development/libraries/ffmpeg/5.nix index d09d7ccd1cec..b19c22a55f3a 100644 --- a/pkgs/development/libraries/ffmpeg/5.nix +++ b/pkgs/development/libraries/ffmpeg/5.nix @@ -1,12 +1,7 @@ -{ callPackage -# Darwin frameworks -, Cocoa, CoreMedia, VideoToolbox -, ... -}@args: +{ callPackage, ... }@args: callPackage ./generic.nix (rec { version = "5.1.2"; branch = version; sha256 = "sha256-OaC8yNmFSfFsVwYkZ4JGpqxzbAZs69tAn5UC6RWyLys="; - darwinFrameworks = [ Cocoa CoreMedia VideoToolbox ]; } // args) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 2db1ff41c53f..2f4ce0b552db 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -15,8 +15,7 @@ , debugDeveloper ? false , optimizationsDeveloper ? true , extraWarningsDeveloper ? false -# Darwin frameworks -, Cocoa, darwinFrameworks ? [ Cocoa ] +, Cocoa, CoreMedia, VideoToolbox # Inherit generics , branch, sha256, version, patches ? [], knownVulnerabilities ? [] , doCheck ? true @@ -185,7 +184,7 @@ stdenv.mkDerivation rec { ++ optional ((isLinux || isFreeBSD) && !isAarch32) libva ++ optional ((isLinux || isFreeBSD) && !isAarch32) libdrm ++ optional isLinux alsa-lib - ++ optionals isDarwin darwinFrameworks + ++ optionals isDarwin [ Cocoa CoreMedia VideoToolbox ] ++ optional vdpauSupport libvdpau ++ optional sdlSupport (if reqMin "3.2" then SDL2 else SDL) ++ optional (reqMin "4.2") dav1d; From 7719968fb6faf81968db79a9c109edfb1133233c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 3 Sep 2022 21:50:24 +0200 Subject: [PATCH 3/8] ffmpeg: cleanup and improve options, add vaapiSupport vpxSupport srtSupport --- pkgs/development/libraries/ffmpeg/generic.nix | 34 +++++++------------ 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 2f4ce0b552db..acb6e92f9962 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -1,8 +1,10 @@ { lib, stdenv, buildPackages, fetchurl, pkg-config, addOpenGLRunpath, perl, texinfo, yasm , alsa-lib, bzip2, fontconfig, freetype, gnutls, libiconv, lame, libass, libogg -, libssh, libtheora, libva, libdrm, libvorbis, libvpx, xz, soxr +, libssh, libtheora, libva, libdrm, libvorbis, xz, soxr , x264, x265, xvidcore, zimg, zlib, libopus, speex, nv-codec-headers, dav1d -, srt +, vpxSupport ? !stdenv.isAarch32, libvpx +, srtSupport ? true, srt +, vaapiSupport ? ((stdenv.isLinux || stdenv.isFreeBSD) && !stdenv.isAarch32) , openglSupport ? false, libGLU, libGL , libmfxSupport ? false, intel-media-sdk , libaomSupport ? false, libaom @@ -34,12 +36,6 @@ * pulseaudio * * Known issues: - * 0.6 - fails to compile (unresolved) (so far, only disabling a number of - * features works, but that is not a feasible solution) - * 0.6.90 - mmx: compile errors (fix: disable for 0.6.90-rc0) - * 1.1 - libsoxr: compile error (fix: disable for 1.1) - * Support was initially added in 1.1 before soxr api change, fix - * would probably be to add soxr-1.0 * ALL - Cross-compiling will disable features not present on host OS * (e.g. dxva2 support [DirectX] will not be enabled unless natively * compiled on Cygwin) @@ -47,7 +43,6 @@ */ let - inherit (stdenv) isDarwin isFreeBSD isLinux isAarch32; inherit (lib) optional optionals optionalString enableFeature filter; cmpVer = builtins.compareVersions; @@ -63,14 +58,9 @@ let # Disable dependency that needs fixes before it will work on Darwin or Arm 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 stdenv.mkDerivation rec { - pname = "ffmpeg"; inherit version; @@ -96,7 +86,7 @@ stdenv.mkDerivation rec { # Build flags "--enable-shared" (ifMinVer "0.6" "--enable-pic") - (ifMinVer "4.0" (enableFeature (srt != null) "libsrt")) + (ifMinVer "4.0" (enableFeature srtSupport "libsrt")) (enableFeature runtimeCpuDetectBuild "runtime-cpudetect") "--enable-hardcoded-tables" ] ++ @@ -115,7 +105,7 @@ stdenv.mkDerivation rec { "--enable-ffmpeg" "--disable-ffplay" (ifMinVer "0.6" "--enable-ffprobe") - (if reqMin "4" then null else "--disable-ffserver") + (ifVerOlder "4" "--disable-ffserver") # Libraries (ifMinVer "0.6" "--enable-avcodec") (ifMinVer "0.6" "--enable-avdevice") @@ -175,18 +165,18 @@ stdenv.mkDerivation rec { buildInputs = [ bzip2 fontconfig freetype gnutls libiconv lame libass libogg libssh libtheora - libvorbis xz soxr x264 x265 xvidcore zimg zlib libopus speex srt nv-codec-headers + libvorbis xz soxr x264 x265 xvidcore zimg zlib libopus speex nv-codec-headers ] ++ optionals openglSupport [ libGL libGLU ] ++ optional libmfxSupport intel-media-sdk ++ optional libaomSupport libaom ++ optional vpxSupport libvpx - ++ optionals (!isDarwin && !isAarch32 && pulseaudioSupport) [ libpulseaudio ] # Need to be fixed on Darwin and ARM - ++ optional ((isLinux || isFreeBSD) && !isAarch32) libva - ++ optional ((isLinux || isFreeBSD) && !isAarch32) libdrm - ++ optional isLinux alsa-lib - ++ optionals isDarwin [ Cocoa CoreMedia VideoToolbox ] + ++ optionals (!stdenv.isDarwin && !stdenv.isAarch32 && pulseaudioSupport) [ libpulseaudio ] # Need to be fixed on Darwin and ARM + ++ optionals vaapiSupport [ libva libdrm ] + ++ optional stdenv.isLinux alsa-lib + ++ optionals stdenv.isDarwin [ Cocoa CoreMedia VideoToolbox ] ++ optional vdpauSupport libvdpau ++ optional sdlSupport (if reqMin "3.2" then SDL2 else SDL) + ++ optional srtSupport srt ++ optional (reqMin "4.2") dav1d; enableParallelBuilding = true; From d369fa4ab8af86c874155c4c14cee79420d60009 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 3 Sep 2022 21:51:00 +0200 Subject: [PATCH 4/8] ffmpeg: remove SDL1 support --- pkgs/development/libraries/ffmpeg/generic.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index acb6e92f9962..b1f498e9287c 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -11,7 +11,7 @@ # Build options , runtimeCpuDetectBuild ? true # Detect CPU capabilities at runtime , multithreadBuild ? true # Multithreading via pthreads/win32 threads -, sdlSupport ? !stdenv.isAarch32, SDL, SDL2 +, sdlSupport ? !stdenv.isAarch32, SDL2 , vdpauSupport ? !stdenv.isAarch32, libvdpau # Developer options , debugDeveloper ? false @@ -138,7 +138,7 @@ stdenv.mkDerivation rec { (ifMinVer "4.2" (enableFeature libmfxSupport "libmfx")) (ifMinVer "4.2" (enableFeature libaomSupport "libaom")) (disDarwinOrArmFix (ifMinVer "0.9" (lib.optionalString pulseaudioSupport "--enable-libpulse")) "0.9" "--disable-libpulse") - (ifMinVer "2.5" (if sdlSupport && reqMin "3.2" then "--enable-sdl2" else if sdlSupport then "--enable-sdl" else null)) # autodetected before 2.5, SDL1 support removed in 3.2 for SDL2 + (ifMinVer "2.5" (if sdlSupport && reqMin "3.2" then "--enable-sdl2" else null)) (ifMinVer "1.2" "--enable-libsoxr") "--enable-libx264" "--enable-libxvid" @@ -175,7 +175,7 @@ stdenv.mkDerivation rec { ++ optional stdenv.isLinux alsa-lib ++ optionals stdenv.isDarwin [ Cocoa CoreMedia VideoToolbox ] ++ optional vdpauSupport libvdpau - ++ optional sdlSupport (if reqMin "3.2" then SDL2 else SDL) + ++ optional sdlSupport SDL2 ++ optional srtSupport srt ++ optional (reqMin "4.2") dav1d; From eb3fb81016f2df5cbd5890c2be65a9fc2c6326d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 3 Sep 2022 21:56:46 +0200 Subject: [PATCH 5/8] ffmpeg: inputs cleanup --- pkgs/development/libraries/ffmpeg/generic.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index b1f498e9287c..b25e7c47c6a1 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -147,7 +147,7 @@ stdenv.mkDerivation rec { (ifMinVer "2.8" "--enable-libopus") "--enable-libspeex" (ifMinVer "2.8" "--enable-libx265") - (ifMinVer "4.2" (enableFeature (dav1d != null) "libdav1d")) + (ifMinVer "4.2" (enableFeature (reqMin "4.2") "libdav1d")) # Developer flags (enableFeature debugDeveloper "debug") (enableFeature optimizationsDeveloper "optimizations") From 8609c5598f73208a6696a41d4139cab4716c165c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 3 Sep 2022 22:01:14 +0200 Subject: [PATCH 6/8] ffmpeg: remove 0.X conditions --- pkgs/development/libraries/ffmpeg/generic.nix | 36 +++++++------------ 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index b25e7c47c6a1..e6282993d3b7 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -45,19 +45,11 @@ let inherit (lib) optional optionals optionalString enableFeature filter; - cmpVer = builtins.compareVersions; - reqMin = requiredVersion: (cmpVer requiredVersion branch != 1); - reqMatch = requiredVersion: (cmpVer requiredVersion branch == 0); + reqMin = requiredVersion: (builtins.compareVersions requiredVersion branch != 1); ifMinVer = minVer: flag: if reqMin minVer then flag else null; ifVerOlder = maxVer: flag: if (lib.versionOlder branch maxVer) then flag else null; - - # Version specific fix - verFix = withoutFix: fixVer: withFix: if reqMatch fixVer then withFix else withoutFix; - - # Disable dependency that needs fixes before it will work on Darwin or Arm - disDarwinOrArmFix = origArg: minVer: fixArg: if ((isDarwin || isAarch32) && reqMin minVer) then fixArg else origArg; in stdenv.mkDerivation rec { @@ -85,7 +77,7 @@ stdenv.mkDerivation rec { "--enable-version3" # Build flags "--enable-shared" - (ifMinVer "0.6" "--enable-pic") + "--enable-pic" (ifMinVer "4.0" (enableFeature srtSupport "libsrt")) (enableFeature runtimeCpuDetectBuild "runtime-cpudetect") "--enable-hardcoded-tables" @@ -98,46 +90,46 @@ stdenv.mkDerivation rec { else ["--disable-pthreads" "--disable-w32threads"]) ++ [ - (ifMinVer "0.9" "--disable-os2threads") # We don't support OS/2 + "--disable-os2threads" # We don't support OS/2 "--enable-network" (ifMinVer "2.4" "--enable-pixelutils") # Executables "--enable-ffmpeg" "--disable-ffplay" - (ifMinVer "0.6" "--enable-ffprobe") + "--enable-ffprobe" (ifVerOlder "4" "--disable-ffserver") # Libraries - (ifMinVer "0.6" "--enable-avcodec") - (ifMinVer "0.6" "--enable-avdevice") + "--enable-avcodec" + "--enable-avdevice" "--enable-avfilter" - (ifMinVer "0.6" "--enable-avformat") + "--enable-avformat" (ifMinVer "1.0" (ifVerOlder "5.0" "--enable-avresample")) (ifMinVer "1.1" "--enable-avutil") "--enable-postproc" - (ifMinVer "0.9" "--enable-swresample") + "--enable-swresample" "--enable-swscale" # Docs - (ifMinVer "0.6" "--disable-doc") + "--disable-doc" # External Libraries "--enable-libass" "--enable-bzlib" "--enable-gnutls" (ifMinVer "1.0" "--enable-fontconfig") - (ifMinVer "0.7" "--enable-libfreetype") + "--enable-libfreetype" "--enable-libmp3lame" (ifMinVer "1.2" "--enable-iconv") "--enable-libtheora" (ifMinVer "2.1" "--enable-libssh") - (ifMinVer "0.6" (enableFeature vaapiSupport "vaapi")) + (enableFeature vaapiSupport "vaapi") (ifMinVer "3.4" (enableFeature vaapiSupport "libdrm")) (enableFeature vdpauSupport "vdpau") "--enable-libvorbis" - (ifMinVer "0.6" (enableFeature vpxSupport "libvpx")) + (enableFeature vpxSupport "libvpx") (ifMinVer "2.4" "--enable-lzma") (ifMinVer "2.2" (enableFeature openglSupport "opengl")) (ifMinVer "4.2" (enableFeature libmfxSupport "libmfx")) (ifMinVer "4.2" (enableFeature libaomSupport "libaom")) - (disDarwinOrArmFix (ifMinVer "0.9" (lib.optionalString pulseaudioSupport "--enable-libpulse")) "0.9" "--disable-libpulse") + (lib.optionalString pulseaudioSupport "--enable-libpulse") (ifMinVer "2.5" (if sdlSupport && reqMin "3.2" then "--enable-sdl2" else null)) (ifMinVer "1.2" "--enable-libsoxr") "--enable-libx264" @@ -153,8 +145,6 @@ stdenv.mkDerivation rec { (enableFeature optimizationsDeveloper "optimizations") (enableFeature extraWarningsDeveloper "extra-warnings") "--disable-stripping" - # Disable mmx support for 0.6.90 - (verFix null "0.6.90" "--disable-mmx") ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "--cross-prefix=${stdenv.cc.targetPrefix}" "--enable-cross-compile" From 77e8784f4efd776bdadb48ce69f3b29d867ae3b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 3 Sep 2022 22:02:11 +0200 Subject: [PATCH 7/8] ffmpeg: remove 1.X conditions --- pkgs/development/libraries/ffmpeg/generic.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index e6282993d3b7..a7086e12a4bc 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -64,8 +64,7 @@ stdenv.mkDerivation rec { postPatch = "patchShebangs ."; inherit patches; - outputs = [ "bin" "dev" "out" "man" ] - ++ optional (reqMin "1.0") "doc" ; # just dev-doc + outputs = [ "bin" "dev" "out" "man" "doc" ]; setOutputFlags = false; # doesn't accept all and stores configureFlags in libs! configurePlatforms = []; @@ -103,8 +102,8 @@ stdenv.mkDerivation rec { "--enable-avdevice" "--enable-avfilter" "--enable-avformat" - (ifMinVer "1.0" (ifVerOlder "5.0" "--enable-avresample")) - (ifMinVer "1.1" "--enable-avutil") + (ifVerOlder "5.0" "--enable-avresample") + "--enable-avutil" "--enable-postproc" "--enable-swresample" "--enable-swscale" @@ -114,10 +113,10 @@ stdenv.mkDerivation rec { "--enable-libass" "--enable-bzlib" "--enable-gnutls" - (ifMinVer "1.0" "--enable-fontconfig") + "--enable-fontconfig" "--enable-libfreetype" "--enable-libmp3lame" - (ifMinVer "1.2" "--enable-iconv") + "--enable-iconv" "--enable-libtheora" (ifMinVer "2.1" "--enable-libssh") (enableFeature vaapiSupport "vaapi") @@ -131,7 +130,7 @@ stdenv.mkDerivation rec { (ifMinVer "4.2" (enableFeature libaomSupport "libaom")) (lib.optionalString pulseaudioSupport "--enable-libpulse") (ifMinVer "2.5" (if sdlSupport && reqMin "3.2" then "--enable-sdl2" else null)) - (ifMinVer "1.2" "--enable-libsoxr") + "--enable-libsoxr" "--enable-libx264" "--enable-libxvid" "--enable-libzimg" From 26a3bafb69845f66140bf57d21fc022b08309775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 29 Sep 2022 11:32:17 +0200 Subject: [PATCH 8/8] ffmpeg: remove 2.X and 3.X conditions --- pkgs/development/libraries/ffmpeg/generic.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index a7086e12a4bc..594adc046306 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -91,7 +91,7 @@ stdenv.mkDerivation rec { ++ [ "--disable-os2threads" # We don't support OS/2 "--enable-network" - (ifMinVer "2.4" "--enable-pixelutils") + "--enable-pixelutils" # Executables "--enable-ffmpeg" "--disable-ffplay" @@ -118,26 +118,26 @@ stdenv.mkDerivation rec { "--enable-libmp3lame" "--enable-iconv" "--enable-libtheora" - (ifMinVer "2.1" "--enable-libssh") + "--enable-libssh" (enableFeature vaapiSupport "vaapi") - (ifMinVer "3.4" (enableFeature vaapiSupport "libdrm")) + (enableFeature vaapiSupport "libdrm") (enableFeature vdpauSupport "vdpau") "--enable-libvorbis" (enableFeature vpxSupport "libvpx") - (ifMinVer "2.4" "--enable-lzma") - (ifMinVer "2.2" (enableFeature openglSupport "opengl")) + "--enable-lzma" + (enableFeature openglSupport "opengl") (ifMinVer "4.2" (enableFeature libmfxSupport "libmfx")) (ifMinVer "4.2" (enableFeature libaomSupport "libaom")) (lib.optionalString pulseaudioSupport "--enable-libpulse") - (ifMinVer "2.5" (if sdlSupport && reqMin "3.2" then "--enable-sdl2" else null)) + (enableFeature sdlSupport "sdl2") "--enable-libsoxr" "--enable-libx264" "--enable-libxvid" "--enable-libzimg" "--enable-zlib" - (ifMinVer "2.8" "--enable-libopus") + "--enable-libopus" "--enable-libspeex" - (ifMinVer "2.8" "--enable-libx265") + "--enable-libx265" (ifMinVer "4.2" (enableFeature (reqMin "4.2") "libdav1d")) # Developer flags (enableFeature debugDeveloper "debug")