diff options
author | pennae <github@quasiparticle.net> | 2023-06-11 19:26:30 +0200 |
---|---|---|
committer | pennae <github@quasiparticle.net> | 2023-06-12 17:50:19 +0200 |
commit | 3edc20aa55f722a76e8002b627c9edf05aba4a5f (patch) | |
tree | fcdd283a9e92a002bb32d6f36e11d18bc3a1039a /nixos | |
parent | df1ce976ca79936482f2fa64ffc6e9984f195398 (diff) | |
download | nixlib-3edc20aa55f722a76e8002b627c9edf05aba4a5f.tar nixlib-3edc20aa55f722a76e8002b627c9edf05aba4a5f.tar.gz nixlib-3edc20aa55f722a76e8002b627c9edf05aba4a5f.tar.bz2 nixlib-3edc20aa55f722a76e8002b627c9edf05aba4a5f.tar.lz nixlib-3edc20aa55f722a76e8002b627c9edf05aba4a5f.tar.xz nixlib-3edc20aa55f722a76e8002b627c9edf05aba4a5f.tar.zst nixlib-3edc20aa55f722a76e8002b627c9edf05aba4a5f.zip |
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.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/doc/manual/default.nix | 30 |
1 files 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 = '' + <book xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + version="5.0" + xml:id="book-nixos-manual"> + <info> + <title>NixOS Manual</title> + <subtitle>Version ${lib.version}</subtitle> + </info> + <chapter> + <title>Temporarily unavailable</title> + <para> + The NixOS manual is currently not available in EPUB format, + please use the <link xlink:href="https://nixos.org/nixos/manual">HTML manual</link> + instead. + </para> + <para> + If you've used the EPUB manual in the past and it has been useful to you, please + <link xlink:href="https://github.com/NixOS/nixpkgs/issues/237234">let us know</link>. + </para> + </chapter> + </book> + ''; + 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 |