mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-20 00:53:12 +03:00
doc/lib-functions: preserve libsets order
This commit is contained in:
parent
e1bb8f1e74
commit
ce952286ca
@ -3,19 +3,19 @@ let
|
||||
inherit (pkgs) lib;
|
||||
inherit (lib) hasPrefix removePrefix;
|
||||
|
||||
libsets = {
|
||||
asserts = "Assert functions";
|
||||
attrsets = "Attribute-set functions";
|
||||
strings = "String manipulation functions";
|
||||
versions = "Version string functions";
|
||||
trivial = "Miscellaneous functions";
|
||||
lists = "List manipulation functions";
|
||||
debug = "Debugging functions";
|
||||
options = "NixOS / nixpkgs option handling";
|
||||
filesystem = "Filesystem functions";
|
||||
sources = "Source filtering functions";
|
||||
cli = "Command-line serialization functions";
|
||||
};
|
||||
libsets = [
|
||||
{ name = "asserts"; description = "Assert functions"; }
|
||||
{ name = "attrsets"; description = "Attribute-set functions"; }
|
||||
{ name = "strings"; description = "String manipulation functions"; }
|
||||
{ name = "versions"; description = "Version string functions"; }
|
||||
{ name = "trivial"; description = "Miscellaneous functions"; }
|
||||
{ name = "lists"; description = "List manipulation functions"; }
|
||||
{ name = "debug"; description = "Debugging functions"; }
|
||||
{ name = "options"; description = "NixOS / nixpkgs option handling"; }
|
||||
{ name = "filesystem"; description = "Filesystem functions"; }
|
||||
{ name = "sources"; description = "Source filtering functions"; }
|
||||
{ name = "cli"; description = "Command-line serialization functions"; }
|
||||
];
|
||||
|
||||
locationsXml = import ./lib-function-locations.nix { inherit pkgs nixpkgs 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">
|
||||
EOF
|
||||
|
||||
${lib.concatStrings (lib.mapAttrsToList (name: description: ''
|
||||
${lib.concatMapStrings ({ name, description }: ''
|
||||
docgen ${name} ${lib.escapeShellArg description}
|
||||
'') libsets)}
|
||||
'') libsets}
|
||||
|
||||
echo "</root>" >> "$out/index.xml"
|
||||
|
||||
|
@ -16,7 +16,7 @@ let
|
||||
subsetname = subsetname;
|
||||
functions = libDefPos toplib.${subsetname};
|
||||
})
|
||||
(builtins.attrNames libsets);
|
||||
(builtins.map (x: x.name) libsets);
|
||||
|
||||
nixpkgsLib = pkgs.lib;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user