Merge pull request #3159 from earksiinni/docs-import-brackets
Document import <path> syntax
This commit is contained in:
commit
dfe1fdf9e8
1 changed files with 5 additions and 0 deletions
|
@ -746,6 +746,11 @@ builtins.genList (x: x * x) 5
|
||||||
separate file, and use it from Nix expressions in other
|
separate file, and use it from Nix expressions in other
|
||||||
files.</para>
|
files.</para>
|
||||||
|
|
||||||
|
<note><para>Unlike some languages, <function>import</function> is a regular
|
||||||
|
function in Nix. Paths using the angle bracket syntax (e.g., <function>
|
||||||
|
import</function> <replaceable><foo></replaceable>) are normal path
|
||||||
|
values (see <xref linkend='ssec-values' />).</para></note>
|
||||||
|
|
||||||
<para>A Nix expression loaded by <function>import</function> must
|
<para>A Nix expression loaded by <function>import</function> must
|
||||||
not contain any <emphasis>free variables</emphasis> (identifiers
|
not contain any <emphasis>free variables</emphasis> (identifiers
|
||||||
that are not defined in the Nix expression itself and are not
|
that are not defined in the Nix expression itself and are not
|
||||||
|
|
Loading…
Reference in a new issue