From 3edc20aa55f722a76e8002b627c9edf05aba4a5f Mon Sep 17 00:00:00 2001 From: pennae Date: Sun, 11 Jun 2023 19:26:30 +0200 Subject: [PATCH] nixos/doc: stub out epub manual epub manuals are holding back the transition away from docbook, and cursory research does not suggest that they are used very much. it's still very early in the 23.11 release cycle, so if we're going to find out just how many people do use the epub manuals it should be now. this need not be the end of epub manuals. nixos-render-docs could be extended to also export epubs, but that has not been done yet since it's going to be some effort with unknown real-world usefulness. --- nixos/doc/manual/default.nix | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix index 68132f302e42..3052b353ee77 100644 --- a/nixos/doc/manual/default.nix +++ b/nixos/doc/manual/default.nix @@ -267,19 +267,41 @@ in rec { manualEpub = runCommand "nixos-manual-epub" { nativeBuildInputs = [ buildPackages.libxml2.bin buildPackages.libxslt.bin buildPackages.zip ]; + doc = '' + + + NixOS Manual + Version ${lib.version} + + + Temporarily unavailable + + The NixOS 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. + + + + ''; + passAsFile = [ "doc" ]; } '' # Generate the epub manual. dst=$out/share/doc/nixos xsltproc \ - ${manualXsltprocOptions} \ + --param chapter.autolabel 0 \ --nonet --xinclude --output $dst/epub/ \ ${docbook_xsl_ns}/xml/xsl/docbook/epub/docbook.xsl \ - ${manual-combined}/manual-combined.xml + $docPath - mkdir -p $dst/epub/OEBPS/images/callouts - cp -r ${docbook_xsl_ns}/xml/xsl/docbook/images/callouts/*.svg $dst/epub/OEBPS/images/callouts # */ echo "application/epub+zip" > mimetype manual="$dst/nixos-manual.epub" zip -0Xq "$manual" mimetype