mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 10:31:25 +09:00
doc/lib-functions: print libset name before description
This commit is contained in:
parent
ce952286ca
commit
5782c3d802
2 changed files with 12 additions and 11 deletions
|
@ -4,17 +4,17 @@ let
|
||||||
inherit (lib) hasPrefix removePrefix;
|
inherit (lib) hasPrefix removePrefix;
|
||||||
|
|
||||||
libsets = [
|
libsets = [
|
||||||
{ name = "asserts"; description = "Assert functions"; }
|
{ name = "asserts"; description = "assertion functions"; }
|
||||||
{ name = "attrsets"; description = "Attribute-set functions"; }
|
{ name = "attrsets"; description = "attribute set functions"; }
|
||||||
{ name = "strings"; description = "String manipulation functions"; }
|
{ name = "strings"; description = "string manipulation functions"; }
|
||||||
{ name = "versions"; description = "Version string functions"; }
|
{ name = "versions"; description = "version string functions"; }
|
||||||
{ name = "trivial"; description = "Miscellaneous functions"; }
|
{ name = "trivial"; description = "miscellaneous functions"; }
|
||||||
{ name = "lists"; description = "List manipulation functions"; }
|
{ name = "lists"; description = "list manipulation functions"; }
|
||||||
{ name = "debug"; description = "Debugging functions"; }
|
{ name = "debug"; description = "debugging functions"; }
|
||||||
{ name = "options"; description = "NixOS / nixpkgs option handling"; }
|
{ name = "options"; description = "NixOS / nixpkgs option handling"; }
|
||||||
{ name = "filesystem"; description = "Filesystem functions"; }
|
{ name = "filesystem"; description = "filesystem functions"; }
|
||||||
{ name = "sources"; description = "Source filtering functions"; }
|
{ name = "sources"; description = "source filtering functions"; }
|
||||||
{ name = "cli"; description = "Command-line serialization functions"; }
|
{ name = "cli"; description = "command-line serialization functions"; }
|
||||||
];
|
];
|
||||||
|
|
||||||
locationsXml = import ./lib-function-locations.nix { inherit pkgs nixpkgs libsets; };
|
locationsXml = import ./lib-function-locations.nix { inherit pkgs nixpkgs libsets; };
|
||||||
|
|
|
@ -9,7 +9,8 @@ with pkgs; stdenv.mkDerivation {
|
||||||
buildInputs = [ nixdoc ];
|
buildInputs = [ nixdoc ];
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
function docgen {
|
function docgen {
|
||||||
nixdoc -c "$1" -d "$2" -f "$1.nix" > "$out/$1.xml"
|
# TODO: wrap lib.$1 in <literal>, make nixdoc not escape it
|
||||||
|
nixdoc -c "$1" -d "lib.$1: $2" -f "$1.nix" > "$out/$1.xml"
|
||||||
echo "<xi:include href='$1.xml' />" >> "$out/index.xml"
|
echo "<xi:include href='$1.xml' />" >> "$out/index.xml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue