From aff2dbbc82c63fa8ad389aad5d78a2fc2461fc36 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Mon, 27 Jun 2022 17:27:24 +0200 Subject: [PATCH] make-options-doc: Make variablelist id configurable I've tried XInclude set-xml-id first, but our tooling did not pick up on it. --- nixos/lib/make-options-doc/default.nix | 5 +++++ nixos/lib/make-options-doc/options-to-docbook.xsl | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/nixos/lib/make-options-doc/default.nix b/nixos/lib/make-options-doc/default.nix index 282b3e7397c..6649fc41d41 100644 --- a/nixos/lib/make-options-doc/default.nix +++ b/nixos/lib/make-options-doc/default.nix @@ -22,6 +22,10 @@ , transformOptions ? lib.id # function for additional tranformations of the options , documentType ? "appendix" # TODO deprecate "appendix" in favor of "none" # and/or rename function to moduleOptionDoc for clean slate + + # If you include more than one option list into a document, you need to + # provide different ids. +, variablelistId ? "configuration-variable-list" , revision ? "" # Specify revision for the options # a set of options the docs we are generating will be merged into, as if by recursiveUpdate. # used to split the options doc build into a static part (nixos/modules) and a dynamic part @@ -177,6 +181,7 @@ in rec { ${pkgs.libxslt.bin}/bin/xsltproc \ --stringparam documentType '${documentType}' \ --stringparam revision '${revision}' \ + --stringparam variablelistId '${variablelistId}' \ -o intermediate.xml ${./options-to-docbook.xsl} sorted.xml ${pkgs.libxslt.bin}/bin/xsltproc \ -o "$out" ${./postprocess-option-descriptions.xsl} intermediate.xml diff --git a/nixos/lib/make-options-doc/options-to-docbook.xsl b/nixos/lib/make-options-doc/options-to-docbook.xsl index 07d69649523..978d5e2468a 100644 --- a/nixos/lib/make-options-doc/options-to-docbook.xsl +++ b/nixos/lib/make-options-doc/options-to-docbook.xsl @@ -14,6 +14,7 @@ + @@ -31,7 +32,8 @@ - + +