diff --git a/doc/manual/default.nix b/doc/manual/default.nix index 1e9581e8dd45..f0e6b64103c2 100644 --- a/doc/manual/default.nix +++ b/doc/manual/default.nix @@ -11,30 +11,13 @@ let options // { system = removeAttrs options.system ["path"]; }; - optionsXML_ = builtins.toFile "options.xml" (builtins.unsafeDiscardStringContext + optionsXML = builtins.toFile "options.xml" (builtins.unsafeDiscardStringContext (builtins.toXML (pkgs.lib.optionAttrSetToDocList "" options_))); - optionsXML = pkgs.runCommand "options2.xml" {} '' - sed ' - \,, { - n # fetch the next line - : rewriteLinks - n # fetch the next line - \,, b # leave if this is the end of the list - ${if revision == "local" then "" else '' - # redirect nixos internals to the repository - s,,, #" - t rewriteLinks # jump to rewriteLinks if done - ''} - # redirect local file to their locations - s,,, #" - b rewriteLinks # jump to rewriteLinks - } - ' ${optionsXML_} > $out - ''; - optionsDocBook = pkgs.runCommand "options-db.xml" {} '' - ${pkgs.libxslt}/bin/xsltproc -o $out ${./options-to-docbook.xsl} ${optionsXML_} + ${pkgs.libxslt}/bin/xsltproc \ + --stringparam revision '${revision}' \ + -o $out ${./options-to-docbook.xsl} ${optionsXML} ''; manual = pkgs.stdenv.mkDerivation { diff --git a/doc/manual/options-to-docbook.xsl b/doc/manual/options-to-docbook.xsl index d8cd057ac295..68c3590d45d1 100644 --- a/doc/manual/options-to-docbook.xsl +++ b/doc/manual/options-to-docbook.xsl @@ -10,6 +10,8 @@ + + @@ -140,7 +142,20 @@ - + + + + + https://svn.nixos.org/viewvc/nix/nixos/trunk/modules/?revision= + + + file:// + + + +