nix-super/doc/manual/generate-builtins.nix

17 lines
373 B
Nix
Raw Normal View History

2020-09-16 15:55:24 +03:00
with builtins;
with import ./utils.nix;
builtins:
concatStrings (map
(name:
let builtin = builtins.${name}; in
2022-02-24 14:50:50 +02:00
"<dt id=\"builtins-${name}\"><a href=\"#builtins-${name}\"><code>${name} "
+ concatStringsSep " " (map (s: "<var>${s}</var>") builtin.args)
+ "</code></a></dt>"
+ "<dd>\n\n"
+ builtin.doc
+ "\n\n</dd>"
2020-09-16 15:55:24 +03:00
)
(attrNames builtins))