anchor.diff:  { stdenv, lib, fetchurl, fetchpatch,
     # Main build tools
     python2, pkgconfig, autoconf, automake, cmake, nasm, libtool, m4, lzma,
  +  numactl,
     # Processing, video codecs, containers
  -  ffmpeg-full, nv-codec-headers, libogg, x264, x265, libvpx, libtheora,
  +  ffmpeg-full, nv-codec-headers, libogg, x264, x265, libvpx, libtheora, dav1d,
     # Codecs, audio
     libopus, lame, libvorbis, a52dec, speex, libsamplerate,
     # Text processing
  
positive.code:   # cp: cannot create regular file './internal_defaults.json': File exists
    enableParallelBuilding = false;
  
    # The samplerate patch should be removed when HandBrake 1.3.0 is released
    patches = [(fetchpatch {
      name = "set-ffmpeg-samplerate.patch";
      url = "https://patch-diff.githubusercontent.com/raw/HandBrake/HandBrake/pull/2126.patch";
      sha256 = "00lds9h27cvyr53qpvv8gbv01hfxdxd8gphxcwbwg8akqrvk9gbf";
    })];
  
    preConfigure = ''
      patchShebangs scripts
  
  
negative.code:   ] ++ lib.optionals useGtk [ intltool wrapGAppsHook ];
  
    buildInputs = [
      ffmpeg-full libogg libtheora x264 x265 libvpx dav1d
      libopus lame libvorbis a52dec speex libsamplerate
      libiconv fribidi fontconfig freetype libass jansson libxml2 harfbuzz
      libdvdread libdvdnav libdvdcss libbluray lzma numactl
    ] ++ lib.optionals useGtk [
      glib gtk3 libappindicator-gtk3 libnotify
      gst_all_1.gstreamer gst_all_1.gst-plugins-base dbus-glib udev
  