anchor.diff:  { 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, libpulseaudio, soxr
  +, 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
  
positive.code:       (ifMinVer "2.2" (enableFeature openglSupport "opengl"))
        (ifMinVer "4.2" (enableFeature libmfxSupport "libmfx"))
        (ifMinVer "4.2" (enableFeature libaomSupport "libaom"))
        (disDarwinOrArmFix (ifMinVer "0.9" "--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 "1.2" "--enable-libsoxr")
        "--enable-libx264"
  
negative.code:     ++ 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
  