mirror of
https://github.com/NixOS/nix.git
synced 2024-11-22 14:52:55 +00:00
d6318e1638
as in [1], make the document structure visible, like in a template
[1]: 4655563470
21 lines
448 B
Nix
21 lines
448 B
Nix
builtinsDump:
|
|
let
|
|
showBuiltin = name:
|
|
let
|
|
inherit (builtinsDump.${name}) doc args;
|
|
in
|
|
''
|
|
<dt id="builtins-${name}">
|
|
<a href="#builtins-${name}"><code>${name} ${listArgs args}</code></a>
|
|
</dt>
|
|
<dd>
|
|
|
|
${doc}
|
|
|
|
</dd>
|
|
'';
|
|
listArgs = args: builtins.concatStringsSep " " (map (s: "<var>${s}</var>") args);
|
|
in
|
|
with builtins; concatStringsSep "\n" (map showBuiltin (attrNames builtinsDump))
|
|
|