Document importing from a directory in the import documentation

This commit is contained in:
Shea Levy 2012-08-26 14:48:47 -04:00 committed by Eelco Dolstra
parent f7b650d234
commit 360056e174
1 changed files with 4 additions and 2 deletions

View File

@ -275,8 +275,10 @@ stdenv.mkDerivation {
<replaceable>path</replaceable></term>
<listitem><para>Load, parse and return the Nix expression in the
file <replaceable>path</replaceable>. Evaluation aborts if the
file doesnt exist or contains an incorrect Nix
file <replaceable>path</replaceable>. If <replaceable>path
</replaceable> is a directory, the file <filename>default.nix
</filename> in that directory is loaded. Evaluation aborts if
the file doesnt exist or contains an incorrect Nix
expression. <function>import</function> implements Nixs module
system: you can put any Nix expression (such as an attribute set
or a function) in a separate file, and use it from Nix expressions