summary refs log tree commit diff
path: root/nixos/doc/manual/development
diff options
context:
space:
mode:
authorNiklas Hambüchen <mail@nh2.me>2017-05-21 15:03:16 +0200
committerNiklas Hambüchen <mail@nh2.me>2017-05-21 15:03:16 +0200
commit2df7d4d63a3d1e788ee5a09b98b8dda2626e8bd1 (patch)
tree4fa8d043df13101a2580990cd359292e67de21d7 /nixos/doc/manual/development
parent6f7347ec5849e30f733fc4ece5389bbb4db46c6b (diff)
downloadnixpkgs-2df7d4d63a3d1e788ee5a09b98b8dda2626e8bd1.tar
nixpkgs-2df7d4d63a3d1e788ee5a09b98b8dda2626e8bd1.tar.gz
nixpkgs-2df7d4d63a3d1e788ee5a09b98b8dda2626e8bd1.tar.bz2
nixpkgs-2df7d4d63a3d1e788ee5a09b98b8dda2626e8bd1.tar.lz
nixpkgs-2df7d4d63a3d1e788ee5a09b98b8dda2626e8bd1.tar.xz
nixpkgs-2df7d4d63a3d1e788ee5a09b98b8dda2626e8bd1.tar.zst
nixpkgs-2df7d4d63a3d1e788ee5a09b98b8dda2626e8bd1.zip
manual: Fix `addCheck` example having arguments in wrong order.
`addCheck` takes first the type, then the check.
Diffstat (limited to 'nixos/doc/manual/development')
-rw-r--r--nixos/doc/manual/development/option-types.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/doc/manual/development/option-types.xml b/nixos/doc/manual/development/option-types.xml
index 8e6ac53ad48..741e763c295 100644
--- a/nixos/doc/manual/development/option-types.xml
+++ b/nixos/doc/manual/development/option-types.xml
@@ -282,7 +282,7 @@ config.mod.two = { foo = 2; bar = "two"; };</screen></example>
 <screen>
 byte = mkOption {
   description = "An integer between 0 and 255.";
-  type = addCheck (x: x &gt;= 0 &amp;&amp; x &lt;= 255) types.int;
+  type = addCheck types.int (x: x &gt;= 0 &amp;&amp; x &lt;= 255);
 };</screen></example>
 
 <example xml:id='ex-extending-type-check-2'><title>Overriding a type