aboutsummaryrefslogtreecommitdiff
path: root/doc/manual/generate-builtins.nix
diff options
context:
space:
mode:
Diffstat (limited to 'doc/manual/generate-builtins.nix')
-rw-r--r--doc/manual/generate-builtins.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/manual/generate-builtins.nix b/doc/manual/generate-builtins.nix
new file mode 100644
index 000000000..416a7fdba
--- /dev/null
+++ b/doc/manual/generate-builtins.nix
@@ -0,0 +1,14 @@
+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))
+