# To build this derivation, run `nix-build -A nixpkgs-manual.epub` { lib, runCommand, docbook_xsl_ns, libxslt, zip, }: runCommand "manual.epub" { nativeBuildInputs = [ libxslt zip ]; epub = '' Nixpkgs Manual Version ${lib.version} Temporarily unavailable The Nixpkgs manual is currently not available in EPUB format, please use the HTML manual instead. If you've used the EPUB manual in the past and it has been useful to you, please let us know. ''; __structuredAttrs = true; } '' mkdir scratch printf "%s" "$epub" | xsltproc \ --param chapter.autolabel 0 \ --nonet \ --output scratch/ \ ${docbook_xsl_ns}/xml/xsl/docbook/epub/docbook.xsl \ - echo "application/epub+zip" > mimetype zip -0Xq -b "$TMPDIR" "$out" mimetype cd scratch && zip -Xr9D -b "$TMPDIR" "$out" * ''