anchor.diff:    docbook_xsl_ns != null &&
     docbook_xsl != null &&
     (fop != null || !enableJava) &&
  -# TODO: Package this:
  -#  epubcheck != null &&
  +  epubcheck != null &&
     gnused != null &&
     coreutils != null;
   
  
positive.code:     sha256 = "08ya4bskygzqkfqwjllpg31qc5k08xp2k78z9b2480g8y57bfy10";
    };
  
  in
  
  stdenv.mkDerivation rec {
    pname = "asciidoc"
      + lib.optionalString enableStandardFeatures "-full"
      + lib.optionalString enableExtraPlugins "-with-plugins";
    version = "9.1.0";
  
    # Note: a substitution to improve reproducibility should be updated once 10.0.0 is
    # released. See the comment in `patchPhase` for more information.
    src = fetchFromGitHub {
      owner = "asciidoc";
      repo = "asciidoc-py3";
      rev = version;
      sha256 = "1clf1axkns23wfmh48xfspzsnw04pjh4mq1pshpzvj0cwxhz0yaq";
    };
  
    strictDeps = true;
    nativeBuildInputs = [ python3 unzip autoreconfHook ];
    buildInputs = [ python3 ];
  
    # install filters early, so their shebangs are patched too
    postPatch = with lib; ''
  
negative.code: { fetchurl, lib, stdenv, python3
  , fetchFromGitHub, autoreconfHook
  , installShellFiles
  , enableStandardFeatures ? false
  , sourceHighlight ? null
  , highlight ? null
  