diff options
author | pennae <github@quasiparticle.net> | 2023-01-25 21:43:49 +0100 |
---|---|---|
committer | pennae <github@quasiparticle.net> | 2023-01-27 20:07:34 +0100 |
commit | e8c5618b67ca1bcbef436155ede3d3091790cc96 (patch) | |
tree | 29a147f0d07424183442555c248eecb7115f6165 /nixos/lib/make-options-doc/default.nix | |
parent | e0596e0940389679df43b34b6f7a2ef9e935a0bb (diff) |
nixos-render-docs: add some better CLI infrastructure
using environment variables isn't great once multiple input or output
formats get involved (which will happen soon). now is a good time to set
a pattern for future converters.
Diffstat (limited to 'nixos/lib/make-options-doc/default.nix')
-rw-r--r-- | nixos/lib/make-options-doc/default.nix | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/nixos/lib/make-options-doc/default.nix b/nixos/lib/make-options-doc/default.nix index 963ebdf41e69..271af9ba1801 100644 --- a/nixos/lib/make-options-doc/default.nix +++ b/nixos/lib/make-options-doc/default.nix @@ -148,20 +148,19 @@ in rec { ''; optionsDocBook = pkgs.runCommand "options-docbook.xml" { - MANPAGE_URLS = pkgs.path + "/doc/manpage-urls.json"; - OTD_DOCUMENT_TYPE = documentType; - OTD_VARIABLE_LIST_ID = variablelistId; - OTD_OPTION_ID_PREFIX = optionIdPrefix; - OTD_REVISION = revision; - nativeBuildInputs = [ pkgs.nixos-render-docs ]; } '' - nixos-render-docs \ + nixos-render-docs options docbook \ + --manpage-urls ${pkgs.path + "/doc/manpage-urls.json"} \ + --revision ${lib.escapeShellArg revision} \ + --document-type ${lib.escapeShellArg documentType} \ + --varlist-id ${lib.escapeShellArg variablelistId} \ + --id-prefix ${lib.escapeShellArg optionIdPrefix} \ ${lib.optionalString markdownByDefault "--markdown-by-default"} \ ${optionsJSON}/share/doc/nixos/options.json \ - > options.xml + options.xml if grep /nixpkgs/nixos/modules options.xml; then echo "The manual appears to depend on the location of Nixpkgs, which is bad" |