anchor.diff:      (enableFeature stdenv.isLinux  "dvbin")
     ];
   
  -  configurePhase = ''
  -    python3 ${waf} configure --prefix=$out $configureFlags
  -  '';
  -
     nativeBuildInputs = [
  -    addOpenGLRunpath docutils makeWrapper perl pkgconfig python3 which
  +    addOpenGLRunpath docutils makeWrapper perl pkgconfig python3 wafHook which
     ];
   
     buildInputs = [
  
positive.code: assert zimgSupport        -> available zimg;
  
  let
    # Purity: Waf is normally downloaded by bootstrap.py, but
    # for purity reasons this behavior should be avoided.
    wafVersion = "2.0.9";
    waf = fetchurl {
      urls = [ "https://waf.io/waf-${wafVersion}"
               "http://www.freehackers.org/~tnagy/release/waf-${wafVersion}" ];
      sha256 = "0j7sbn3w6bgslvwwh5v9527w3gi2sd08kskrgxamx693y0b0i3ia";
    };
    luaEnv = lua.withPackages (ps: with ps; [ luasocket ]);
  
  in stdenv.mkDerivation rec {
  
negative.code:   NIX_LDFLAGS = optionalString x11Support "-lX11 -lXext "
                + optionalString stdenv.isDarwin "-framework CoreFoundation";
  
    wafConfigureFlags = [
      "--enable-libmpv-shared"
      "--enable-manpage-build"
      "--disable-libmpv-static"
  