mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 04:19:00 +02:00
Rename newOptionAttrSetToDocList -> optionAttrSetToDocList
This commit is contained in:
parent
82ad8c5ce0
commit
04690da3bd
|
@ -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
|
||||||
|
|
|
@ -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 ];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue