Rename newOptionAttrSetToDocList -> optionAttrSetToDocList

This commit is contained in:
Eelco Dolstra 2013-10-17 14:09:05 +02:00
parent 82ad8c5ce0
commit 04690da3bd
2 changed files with 7 additions and 6 deletions

View file

@ -266,8 +266,7 @@ rec {
# Generate documentation template from the list of option declaration like # Generate documentation template from the list of option declaration like
# the set generated with filterOptionSets. # the set generated with filterOptionSets.
optionAttrSetToDocList = ignore: newOptionAttrSetToDocList; optionAttrSetToDocList = attrs:
newOptionAttrSetToDocList = attrs:
let options = collect isOption attrs; in let options = collect isOption attrs; in
fold (opt: rest: fold (opt: rest:
let let
@ -285,7 +284,7 @@ rec {
subOptions = subOptions =
if opt ? options then if opt ? options then
newOptionAttrSetToDocList opt.options optionAttrSetToDocList opt.options
else else
[]; [];
in in

View file

@ -3,6 +3,8 @@
, revision ? "HEAD" , revision ? "HEAD"
}: }:
with pkgs.lib;
let let
# To prevent infinite recursion, remove system.path from the # To prevent infinite recursion, remove system.path from the
@ -12,7 +14,7 @@ let
{ system = removeAttrs options.system ["path"]; }; { 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_))); (builtins.toXML (optionAttrSetToDocList options_)));
optionsDocBook = pkgs.runCommand "options-db.xml" {} '' optionsDocBook = pkgs.runCommand "options-db.xml" {} ''
${pkgs.libxslt}/bin/xsltproc \ ${pkgs.libxslt}/bin/xsltproc \
@ -26,7 +28,7 @@ in rec {
manual = pkgs.stdenv.mkDerivation { manual = pkgs.stdenv.mkDerivation {
name = "nixos-manual"; name = "nixos-manual";
sources = pkgs.lib.sourceFilesBySuffices ./. [".xml"]; sources = sourceFilesBySuffices ./. [".xml"];
buildInputs = [ pkgs.libxml2 pkgs.libxslt ]; buildInputs = [ pkgs.libxml2 pkgs.libxslt ];
@ -71,7 +73,7 @@ in rec {
manpages = pkgs.stdenv.mkDerivation { manpages = pkgs.stdenv.mkDerivation {
name = "nixos-manpages"; name = "nixos-manpages";
sources = pkgs.lib.sourceFilesBySuffices ./. [".xml"]; sources = sourceFilesBySuffices ./. [".xml"];
buildInputs = [ pkgs.libxml2 pkgs.libxslt ]; buildInputs = [ pkgs.libxml2 pkgs.libxslt ];