forked from mirrors/nixpkgs
doc: stub out epub manual
same reasoning as for the nixos manual.
This commit is contained in:
parent
3edc20aa55
commit
c415521d63
|
@ -66,18 +66,13 @@ out/html/index.html: doc-support/result manual-full.xml style.css highlightjs
|
||||||
cp doc-support/result/xsl/docbook/images/callouts/*.svg out/html/images/callouts/
|
cp doc-support/result/xsl/docbook/images/callouts/*.svg out/html/images/callouts/
|
||||||
chmod u+w -R out/html/
|
chmod u+w -R out/html/
|
||||||
|
|
||||||
out/epub/manual.epub: manual-full.xml
|
out/epub/manual.epub: epub.xml
|
||||||
mkdir -p out/epub/scratch
|
mkdir -p out/epub/scratch
|
||||||
xsltproc --nonet \
|
xsltproc --nonet \
|
||||||
--output out/epub/scratch/ \
|
--output out/epub/scratch/ \
|
||||||
doc-support/result/epub.xsl \
|
doc-support/result/epub.xsl \
|
||||||
./manual-full.xml
|
./epub.xml
|
||||||
|
|
||||||
cp -r $(pandoc_media_dir) out/epub/scratch/OEBPS
|
|
||||||
cp ./overrides.css out/epub/scratch/OEBPS
|
|
||||||
cp ./style.css out/epub/scratch/OEBPS
|
|
||||||
mkdir -p out/epub/scratch/OEBPS/images/callouts/
|
|
||||||
cp doc-support/result/xsl/docbook/images/callouts/*.svg out/epub/scratch/OEBPS/images/callouts/
|
|
||||||
echo "application/epub+zip" > mimetype
|
echo "application/epub+zip" > mimetype
|
||||||
zip -0Xq "out/epub/manual.epub" mimetype
|
zip -0Xq "out/epub/manual.epub" mimetype
|
||||||
rm mimetype
|
rm mimetype
|
||||||
|
|
|
@ -20,7 +20,33 @@ in pkgs.stdenv.mkDerivation {
|
||||||
ln -s ${doc-support} ./doc-support/result
|
ln -s ${doc-support} ./doc-support/result
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
epub = ''
|
||||||
|
<book xmlns="http://docbook.org/ns/docbook"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
version="5.0"
|
||||||
|
xml:id="nixpkgs-manual">
|
||||||
|
<info>
|
||||||
|
<title>Nixpkgs Manual</title>
|
||||||
|
<subtitle>Version ${pkgs.lib.version}</subtitle>
|
||||||
|
</info>
|
||||||
|
<chapter>
|
||||||
|
<title>Temporarily unavailable</title>
|
||||||
|
<para>
|
||||||
|
The Nixpkgs manual is currently not available in EPUB format,
|
||||||
|
please use the <link xlink:href="https://nixos.org/nixpkgs/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 = [ "epub" ];
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
|
cp $epubPath epub.xml
|
||||||
make -j$NIX_BUILD_CORES render-md
|
make -j$NIX_BUILD_CORES render-md
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue