aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-05-29 12:36:44 +0200
committerEelco Dolstra <edolstra@gmail.com>2019-05-29 12:36:44 +0200
commit6636808e9000241face21141a43de1ab6c9aa494 (patch)
treeb924644a5aa144961f77f843cb6a83fc73f41496 /doc
parent315f1980cadf047c72e84a10345b3bb2453c2aac (diff)
parent17ef3e6f411b2cf1fa87593ad84bc2a94a1edd93 (diff)
Merge remote-tracking branch 'origin/master' into flakes
Diffstat (limited to 'doc')
-rw-r--r--doc/manual/command-ref/env-common.xml3
-rw-r--r--doc/manual/expressions/language-constructs.xml20
2 files changed, 21 insertions, 2 deletions
diff --git a/doc/manual/command-ref/env-common.xml b/doc/manual/command-ref/env-common.xml
index c532ffdde..6a3aaae71 100644
--- a/doc/manual/command-ref/env-common.xml
+++ b/doc/manual/command-ref/env-common.xml
@@ -14,7 +14,8 @@
<varlistentry><term><envar>IN_NIX_SHELL</envar></term>
<listitem><para>Indicator that tells if the current environment was set up by
- <command>nix-shell</command>.</para></listitem>
+ <command>nix-shell</command>. Since Nix 2.0 the values are
+ <literal>"pure"</literal> and <literal>"impure"</literal></para></listitem>
</varlistentry>
diff --git a/doc/manual/expressions/language-constructs.xml b/doc/manual/expressions/language-constructs.xml
index f961ed921..923b5d8c4 100644
--- a/doc/manual/expressions/language-constructs.xml
+++ b/doc/manual/expressions/language-constructs.xml
@@ -217,7 +217,25 @@ but can also be written as:
ellipsis(<literal>...</literal>) as you can access attribute names as
<literal>a</literal>, using <literal>args.a</literal>, which was given as an
additional attribute to the function.
- </para></listitem>
+ </para>
+
+ <warning>
+ <para>
+ The <literal>args@</literal> expression is bound to the argument passed to the function which
+ means that attributes with defaults that aren't explicitly specified in the function call
+ won't cause an evaluation error, but won't exist in <literal>args</literal>.
+ </para>
+ <para>
+ For instance
+<programlisting>
+let
+ function = args@{ a ? 23, ... }: args;
+in
+ function {}
+</programlisting>
+ will evaluate to an empty attribute set.
+ </para>
+ </warning></listitem>
</itemizedlist>