mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
doc/lib-functions: preserve libsets order
This commit is contained in:
parent
e1bb8f1e74
commit
ce952286ca
3 changed files with 16 additions and 16 deletions
|
@ -3,19 +3,19 @@ let
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
inherit (lib) hasPrefix removePrefix;
|
inherit (lib) hasPrefix removePrefix;
|
||||||
|
|
||||||
libsets = {
|
libsets = [
|
||||||
asserts = "Assert functions";
|
{ name = "asserts"; description = "Assert functions"; }
|
||||||
attrsets = "Attribute-set functions";
|
{ name = "attrsets"; description = "Attribute-set functions"; }
|
||||||
strings = "String manipulation functions";
|
{ name = "strings"; description = "String manipulation functions"; }
|
||||||
versions = "Version string functions";
|
{ name = "versions"; description = "Version string functions"; }
|
||||||
trivial = "Miscellaneous functions";
|
{ name = "trivial"; description = "Miscellaneous functions"; }
|
||||||
lists = "List manipulation functions";
|
{ name = "lists"; description = "List manipulation functions"; }
|
||||||
debug = "Debugging functions";
|
{ name = "debug"; description = "Debugging functions"; }
|
||||||
options = "NixOS / nixpkgs option handling";
|
{ name = "options"; description = "NixOS / nixpkgs option handling"; }
|
||||||
filesystem = "Filesystem functions";
|
{ name = "filesystem"; description = "Filesystem functions"; }
|
||||||
sources = "Source filtering functions";
|
{ name = "sources"; description = "Source filtering functions"; }
|
||||||
cli = "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; };
|
||||||
functionDocs = import ./lib-function-docs.nix { inherit locationsXml pkgs libsets; };
|
functionDocs = import ./lib-function-docs.nix { inherit locationsXml pkgs libsets; };
|
||||||
|
|
|
@ -20,9 +20,9 @@ with pkgs; stdenv.mkDerivation {
|
||||||
<root xmlns:xi="http://www.w3.org/2001/XInclude">
|
<root xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
${lib.concatStrings (lib.mapAttrsToList (name: description: ''
|
${lib.concatMapStrings ({ name, description }: ''
|
||||||
docgen ${name} ${lib.escapeShellArg description}
|
docgen ${name} ${lib.escapeShellArg description}
|
||||||
'') libsets)}
|
'') libsets}
|
||||||
|
|
||||||
echo "</root>" >> "$out/index.xml"
|
echo "</root>" >> "$out/index.xml"
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ let
|
||||||
subsetname = subsetname;
|
subsetname = subsetname;
|
||||||
functions = libDefPos toplib.${subsetname};
|
functions = libDefPos toplib.${subsetname};
|
||||||
})
|
})
|
||||||
(builtins.attrNames libsets);
|
(builtins.map (x: x.name) libsets);
|
||||||
|
|
||||||
nixpkgsLib = pkgs.lib;
|
nixpkgsLib = pkgs.lib;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue