anchor.diff:          -e "s|^XMLLINT =.*|XMLLINT = '${libxml2.bin}/bin/xmllint'|" \
           -i a2x.py
     '') + ''
  -    patchShebangs .
  +    patchShebangs --host \
  +      asciidoc.py \
  +      a2x.py \
  +      tests/testasciidoc.py \
  +      filters/code/code-filter.py \
  +      filters/latex/latex2img.py \
  +      filters/music/music2png.py \
  +      filters/unwraplatex.py \
  +      filters/graphviz/graphviz2png.py
  +
  +    # Hardcode the path to its own asciidoc.
  +    # This helps with cross-compilation.
  +    substituteInPlace a2x.py \
  +      --replace "find_executable(ASCIIDOC)" "'${placeholder "out"}/bin/asciidoc'"
   
       # Note: this substitution will not work in the planned 10.0.0 release:
       #
  
positive.code:     sha256 = "1clf1axkns23wfmh48xfspzsnw04pjh4mq1pshpzvj0cwxhz0yaq";
    };
  
    nativeBuildInputs = [ python3 unzip autoreconfHook ];
  
    # install filters early, so their shebangs are patched too
    postPatch = with lib; ''
  
negative.code: 
  # java is problematic on some platforms, where it is unfree
  , enableJava ? true
  
  , buildPackages
  }:
  
  assert enableStandardFeatures ->
  