From a7840a9ce876680fab3302a5a3abf2624371cf0e Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Wed, 30 Sep 2015 17:21:08 +0200 Subject: doc: generate haskell-users-guide.xml from Markdown input via Pandoc Editing Docbook is no fun, IMHO, so I'd rather store the Haskell documentation in Markdown format and use Pandoc to convert that into Docbook as part of the build process. --- doc/default.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'doc/default.nix') diff --git a/doc/default.nix b/doc/default.nix index 004ffb70b749e..b8dac00eb65e9 100644 --- a/doc/default.nix +++ b/doc/default.nix @@ -6,7 +6,7 @@ stdenv.mkDerivation { sources = sourceFilesBySuffices ./. [".xml"]; - buildInputs = [ libxml2 libxslt ]; + buildInputs = [ pandoc libxml2 libxslt ]; xsltFlags = '' --param section.autolabel 1 @@ -19,6 +19,22 @@ stdenv.mkDerivation { ''; buildCommand = '' + { + echo "" + echo "" + echo "User's Guide to the Haskell Infrastructure" + echo "" + pandoc ${./haskell-users-guide.md} -w docbook | \ + sed -e 's|||' \ + -e 's|||' + echo "" + echo "" + } >haskell-users-guide.xml + ln -s "$sources/"*.xml . echo ${nixpkgsVersion} > .version -- cgit 1.4.1