Skip to content

Commit

Permalink
Rename newOptionAttrSetToDocList -> optionAttrSetToDocList
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Oct 17, 2013
1 parent 82ad8c5 commit 04690da
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 2 additions & 3 deletions lib/options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -285,7 +284,7 @@ rec {

subOptions =
if opt ? options then
newOptionAttrSetToDocList opt.options
optionAttrSetToDocList opt.options
else
[];
in
Expand Down
8 changes: 5 additions & 3 deletions nixos/doc/manual/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
, revision ? "HEAD"
}:

with pkgs.lib;

let

# To prevent infinite recursion, remove system.path from the
Expand All @@ -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 \
Expand All @@ -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 ];

Expand Down Expand Up @@ -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 ];

Expand Down

0 comments on commit 04690da

Please sign in to comment.