nix/doc/manual/generate-builtins.nix
Eelco Dolstra 39bc49318f jq -> nix
2020-09-16 14:58:06 +02:00

15 lines
327 B
Nix

with builtins;
with import ./utils.nix;
builtins:
concatStrings (map
(name:
let builtin = builtins.${name}; in
" - `builtins.${name}` " + concatStringsSep " " (map (s: "*${s}*") builtin.args)
+ " \n\n"
+ concatStrings (map (s: " ${s}\n") (splitLines builtin.doc)) + "\n\n"
)
(attrNames builtins))