Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6fa3dd2d5a3f
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c55427ca434d
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Mar 11, 2019

  1. nixos/doc: add types prefix to addCheck example

    The function `addCheck` resides within the attrset `types`. We should be
    explicit about this since otherwise people might be confused where it
    does come from / why it doesn't work for them.
    andir committed Mar 11, 2019
    Copy the full SHA
    c55427c View commit details
Showing with 2 additions and 2 deletions.
  1. +2 −2 nixos/doc/manual/development/option-types.xml
4 changes: 2 additions & 2 deletions nixos/doc/manual/development/option-types.xml
Original file line number Diff line number Diff line change
@@ -512,7 +512,7 @@ config.mod.two = { foo = 2; bar = "two"; };</screen>
The function to type check the value. Takes a value as parameter and
return a boolean. It is possible to extend a type check with the
<literal>addCheck</literal> function
(<xref
(<xref
linkend='ex-extending-type-check-1' />), or to fully
override the check function
(<xref linkend='ex-extending-type-check-2' />).
@@ -522,7 +522,7 @@ config.mod.two = { foo = 2; bar = "two"; };</screen>
<screen>
byte = mkOption {
description = "An integer between 0 and 255.";
type = addCheck types.int (x: x &gt;= 0 &amp;&amp; x &lt;= 255);
type = types.addCheck types.int (x: x &gt;= 0 &amp;&amp; x &lt;= 255);
};</screen>
</example>
<example xml:id='ex-extending-type-check-2'>