summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/lib/options.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/lib/options.nix b/pkgs/lib/options.nix
index d742544bef2..cd60b8f3b88 100644
--- a/pkgs/lib/options.nix
+++ b/pkgs/lib/options.nix
@@ -287,5 +287,12 @@ rec {
     else if isAttrs x then mapAttrs (n: v: scrubOptionValue v) (removeAttrs x ["_args"])
     else x;
 
-    
+
+  /* For use in the ‘example’ option attribute.  It causes the given
+     text to be included verbatim in documentation.  This is necessary
+     for example values that are not simple values, e.g.,
+     functions. */
+  literalExample = text: { _type = "literalExample"; inherit text; };
+
+
 }