anchor.diff:      (lib.withFeatureAs pythonSupport "python" python)
     ];
   
  +  installFlags = lib.optionals pythonSupport [
  +    "pythondir=\"${placeholder "py"}/lib/${python.libPrefix}/site-packages\""
  +  ];
  +
  +  enableParallelBuilding = true;
  +
  +  doCheck =
  +    (stdenv.hostPlatform == stdenv.buildPlatform) &&
  +    !stdenv.isDarwin &&
  +    stdenv.hostPlatform.libc != "musl";
  +
     preConfigure = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") ''
       MACOSX_DEPLOYMENT_TARGET=10.16
     '';
  -
  -  enableParallelBuilding = true;
   
     # disable test that's problematic with newer pythons: see
     # https://mail.gnome.org/archives/xml/2017-August/msg00014.html
  
positive.code: { stdenv, lib, fetchurl, fetchpatch
  , zlib, xz, libintl, python, gettext, ncurses, findXMLCatalogs
  , libiconv
  , pythonSupport ? enableShared && stdenv.buildPlatform == stdenv.hostPlatform
  , icuSupport ? false, icu ? null
  , enableShared ? stdenv.hostPlatform.libc != "msvcrt" && !stdenv.hostPlatform.isStatic
  , enableStatic ? !enableShared
  }:
  
negative.code:     moveToOutput lib/libxml2.a "$static"
    '';
  
    passthru = {
      inherit version;
      pythonSupport = pythonSupport;
    };
  
    meta = with lib; {
      homepage = "http://xmlsoft.org/";
      description = "XML parsing library for C";
      license = licenses.mit;
      platforms = platforms.all;
      maintainers = with maintainers; [ eelco ];
    };
  }
  