diff --git a/lib/options.nix b/lib/options.nix index e8e01083a77..8ea9df3cbd6 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -266,8 +266,7 @@ rec { # Generate documentation template from the list of option declaration like # the set generated with filterOptionSets. - optionAttrSetToDocList = ignore: newOptionAttrSetToDocList; - newOptionAttrSetToDocList = attrs: + optionAttrSetToDocList = attrs: let options = collect isOption attrs; in fold (opt: rest: let @@ -285,7 +284,7 @@ rec { subOptions = if opt ? options then - newOptionAttrSetToDocList opt.options + optionAttrSetToDocList opt.options else []; in diff --git a/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix index e6edb30985c..56ad652c60e 100644 --- a/nixos/doc/manual/default.nix +++ b/nixos/doc/manual/default.nix @@ -3,6 +3,8 @@ , revision ? "HEAD" }: +with pkgs.lib; + let # To prevent infinite recursion, remove system.path from the @@ -12,7 +14,7 @@ let { system = removeAttrs options.system ["path"]; }; optionsXML = builtins.toFile "options.xml" (builtins.unsafeDiscardStringContext - (builtins.toXML (pkgs.lib.optionAttrSetToDocList "" options_))); + (builtins.toXML (optionAttrSetToDocList options_))); optionsDocBook = pkgs.runCommand "options-db.xml" {} '' ${pkgs.libxslt}/bin/xsltproc \ @@ -26,7 +28,7 @@ in rec { manual = pkgs.stdenv.mkDerivation { name = "nixos-manual"; - sources = pkgs.lib.sourceFilesBySuffices ./. [".xml"]; + sources = sourceFilesBySuffices ./. [".xml"]; buildInputs = [ pkgs.libxml2 pkgs.libxslt ]; @@ -71,7 +73,7 @@ in rec { manpages = pkgs.stdenv.mkDerivation { name = "nixos-manpages"; - sources = pkgs.lib.sourceFilesBySuffices ./. [".xml"]; + sources = sourceFilesBySuffices ./. [".xml"]; buildInputs = [ pkgs.libxml2 pkgs.libxslt ];