summary refs log tree commit diff
path: root/nixos/doc/manual/development
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2017-05-24 15:51:01 +0300
committerNikolay Amiantov <ab@fmap.me>2017-05-24 15:52:26 +0300
commitee4f8c2dc98f10b75242b526245229e24baa6010 (patch)
tree553d8cad53cbd95fa0a31eab45b237784d2c4b35 /nixos/doc/manual/development
parent8a07319e7fb086f9c6cbd47602773f10f3eb49fa (diff)
downloadnixlib-ee4f8c2dc98f10b75242b526245229e24baa6010.tar
nixlib-ee4f8c2dc98f10b75242b526245229e24baa6010.tar.gz
nixlib-ee4f8c2dc98f10b75242b526245229e24baa6010.tar.bz2
nixlib-ee4f8c2dc98f10b75242b526245229e24baa6010.tar.lz
nixlib-ee4f8c2dc98f10b75242b526245229e24baa6010.tar.xz
nixlib-ee4f8c2dc98f10b75242b526245229e24baa6010.tar.zst
nixlib-ee4f8c2dc98f10b75242b526245229e24baa6010.zip
nixos doc: document coercedTo type
Also mention about docs in types.nix and fix a small error in related
documentation.

Fixes #26055.
Diffstat (limited to 'nixos/doc/manual/development')
-rw-r--r--nixos/doc/manual/development/option-types.xml14
1 files changed, 12 insertions, 2 deletions
diff --git a/nixos/doc/manual/development/option-types.xml b/nixos/doc/manual/development/option-types.xml
index 741e763c295c..e928c5570874 100644
--- a/nixos/doc/manual/development/option-types.xml
+++ b/nixos/doc/manual/development/option-types.xml
@@ -68,8 +68,7 @@
 
  <section><title>Value Types</title>
 
-   <para>Value types are type that take a value parameter. The only value type 
-     in the library is <literal>enum</literal>.</para>
+   <para>Value types are type that take a value parameter.</para>
 
 <variablelist>
   <varlistentry>
@@ -141,6 +140,17 @@
           str</literal>. Multiple definitions cannot be 
         merged.</para></listitem>
   </varlistentry>
+  <varlistentry>
+    <term><varname>types.coercedTo</varname> <replaceable>from</replaceable>
+        <replaceable>f</replaceable> <replaceable>to</replaceable></term>
+    <listitem><para>Type <replaceable>to</replaceable> or type
+        <replaceable>from</replaceable> which will be coerced to
+	type <replaceable>to</replaceable> using function
+	<replaceable>f</replaceable> which takes an argument of type
+        <replaceable>from</replaceable> and return a value of type
+	<replaceable>to</replaceable>. Can be used to preserve backwards
+        compatibility of an option if its type was changed.</para></listitem>
+  </varlistentry>
 </variablelist>
 
 </section>