about summary refs log tree commit diff
path: root/doc/manual/nix-instantiate.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/manual/nix-instantiate.xml')
-rw-r--r--doc/manual/nix-instantiate.xml36
1 files changed, 32 insertions, 4 deletions
diff --git a/doc/manual/nix-instantiate.xml b/doc/manual/nix-instantiate.xml
index ba89af425586..618b61f159dc 100644
--- a/doc/manual/nix-instantiate.xml
+++ b/doc/manual/nix-instantiate.xml
@@ -36,6 +36,7 @@
           <option>--eval-only</option>
           <arg><option>--strict</option></arg>
         </arg>
+        <arg choice='plain'><option>--find-file</option></arg>
       </group>
       <arg><option>--xml</option></arg>
     </arg>
@@ -49,8 +50,9 @@
 <para>The command <command>nix-instantiate</command> generates <link
 linkend="gloss-derivation">store derivations</link> from (high-level)
 Nix expressions.  It loads and evaluates the Nix expressions in each
-of <replaceable>files</replaceable>.  Each top-level expression should
-evaluate to a derivation, a list of derivations, or a set of
+of <replaceable>files</replaceable> (which defaults to
+<replaceable>./default.nix</replaceable>).  Each top-level expression
+should evaluate to a derivation, a list of derivations, or a set of
 derivations.  The paths of the resulting store derivations are printed
 on standard output.</para>
 
@@ -64,8 +66,8 @@ store derivation instantiation from Nix expressions automatically).
 It is most commonly used for implementing new deployment
 policies.</para>
 
-<para>See also <xref linkend="sec-common-options" /> for a list of
-common options.</para>
+<para condition="manual">See also <xref linkend="sec-common-options"
+/> for a list of common options.</para>
 
 </refsection>
 
@@ -100,6 +102,19 @@ common options.</para>
     
   </varlistentry>
 
+  <varlistentry><term><option>--find-file</option></term>
+  
+    <listitem><para>Look up the given files in Nix’s search path (as
+    specified by the <envar>NIX_PATH</envar> environment variable).
+    If found, print the corresponding absolute paths on standard
+    output.  For instance, if <envar>NIX_PATH</envar> is
+    <literal>nixpkgs=/home/alice/nixpkgs</literal>, then
+    <literal>nix-instantiate --find-file nixpkgs/default.nix</literal>
+    will print
+    <literal>/home/alice/nixpkgs/default.nix</literal>.</para></listitem>
+    
+  </varlistentry>
+      
   <varlistentry><term><option>--xml</option></term>
 
     <listitem><para>When used with <option>--parse-only</option> and
@@ -127,6 +142,10 @@ common options.</para>
 
 </variablelist>
 
+<variablelist condition="manpage">
+  <xi:include href="opt-common.xml#xmlns(db=http://docbook.org/ns/docbook)xpointer(//db:variablelist[@xml:id='opt-common']/*)" />
+</variablelist>
+
 </refsection>
 
 
@@ -198,4 +217,13 @@ $ echo 'rec { x = "foo"; y = x; }' | nix-instantiate --eval-only --xml --strict
 </refsection>
 
 
+<refsection condition="manpage"><title>Environment variables</title>
+
+<variablelist>
+  <xi:include href="env-common.xml#xmlns(db=http://docbook.org/ns/docbook)xpointer(//db:variablelist[@xml:id='env-common']/*)" />
+</variablelist>
+
+</refsection>
+  
+
 </refentry>