diff --git a/doc/manual/default.nix b/doc/manual/default.nix
index 1bd6f6c0441..8433feec098 100644
--- a/doc/manual/default.nix
+++ b/doc/manual/default.nix
@@ -41,7 +41,7 @@ let
sources = pkgs.lib.sourceFilesBySuffices ./. [".xml"];
- buildInputs = [pkgs.libxslt];
+ buildInputs = [pkgs.libxml2New pkgs.libxslt];
xsltFlags = ''
--param section.autolabel 1
@@ -58,6 +58,12 @@ let
ln -s $sources/*.xml . # */
ln -s ${optionsDocBook} options-db.xml
+ # Check the validity of the manual sources.
+ xmllint --noout --nonet --xinclude --noxincludenode \
+ --relaxng ${pkgs.docbook5}/xml/rng/docbook/docbook.rng \
+ manual.xml
+
+ # Generate the HTML manual.
dst=$out/share/doc/nixos
ensureDir $dst
xsltproc $xsltFlags --nonet --xinclude \
@@ -72,6 +78,7 @@ let
ln -s ${pkgs.docbook5_xsl}/xml/xsl/docbook/images $dst/
cp ${./style.css} $dst/style.css
+ # Generate manpages.
ensureDir $out/share/man
xsltproc --nonet --xinclude \
--param man.output.in.separate.dir 1 \
diff --git a/doc/manual/development.xml b/doc/manual/development.xml
index 6604c0f7df5..56c071cce98 100644
--- a/doc/manual/development.xml
+++ b/doc/manual/development.xml
@@ -266,7 +266,7 @@ option definitions and all its derivations. Important derivations are store
inside the option and can be listed with the
command nix-instantiate --xml --eval-only /etc/nixos/nixos -A
config.system.build
-.
+