anchor.diff:          ${manualXsltprocOptions} \
           --stringparam target.database.document "${olinkDB}/olinkdb.xml" \
           --nonet --xinclude --output $dst/epub/ \
  -        ${docbook5_xsl}/xml/xsl/docbook/epub/docbook.xsl ./manual.xml
  +        ${docbook5_xsl}/xml/xsl/docbook/epub/docbook.xsl \
  +        ${manual-combined}/manual-combined.xml
   
         mkdir -p $dst/epub/OEBPS/images/callouts
  -      cp -r ${docbook5_xsl}/xml/xsl/docbook/images/callouts/*.gif $dst/epub/OEBPS/images/callouts
  +      cp -r ${docbook5_xsl}/xml/xsl/docbook/images/callouts/*.gif $dst/epub/OEBPS/images/callouts # */
         echo "application/epub+zip" > mimetype
         manual="$dst/nixos-manual.epub"
         zip -0Xq "$manual" mimetype
  
positive.code:       buildInputs = [ libxml2 libxslt zip ];
      }
      ''
        ${copySources}
  
        # Check the validity of the manual sources.
        xmllint --noout --nonet --xinclude --noxincludenode \
          --relaxng ${docbook5}/xml/rng/docbook/docbook.rng \
          manual.xml
  
        # Generate the epub manual.
        dst=$out/share/doc/nixos
  
  
negative.code:       allowedReferences = ["out"];
      }
      ''
        # Generate the HTML manual.
        dst=$out/share/doc/nixos
        mkdir -p $dst
        xsltproc \
          ${manualXsltprocOptions} \
          --stringparam target.database.document "${olinkDB}/olinkdb.xml" \
          --nonet --output $dst/ \
          ${docbook5_xsl}/xml/xsl/docbook/xhtml/chunktoc.xsl \
          ${manual-combined}/manual-combined.xml
  
        mkdir -p $dst/images/callouts
        cp ${docbook5_xsl}/xml/xsl/docbook/images/callouts/*.gif $dst/images/callouts/
  