about summary refs log tree commit diff
path: root/doc/manual/nix-instantiate.xml
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-02-10T16·14+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-02-10T16·14+0000
commit92e832348db13637875c4f529ed0aa83d3d34493 (patch)
treec00a500e1be79bf061f8ebd17e694eb4f7ee8d55 /doc/manual/nix-instantiate.xml
parent6551b36790d47477087fc3a7f7bb779f28e42d8e (diff)
* Lots of manual stuff. Reference pages for most Nix commands.
* nix-pull now requires the full url to the manifest, i.e.,
  `/MANIFEST/' is no longer automatically appended.
* nix-prefetch-url works again.  

Diffstat (limited to 'doc/manual/nix-instantiate.xml')
-rw-r--r--doc/manual/nix-instantiate.xml46
1 files changed, 43 insertions, 3 deletions
diff --git a/doc/manual/nix-instantiate.xml b/doc/manual/nix-instantiate.xml
index ee073a17b7..69630cb552 100644
--- a/doc/manual/nix-instantiate.xml
+++ b/doc/manual/nix-instantiate.xml
@@ -8,18 +8,58 @@
     <cmdsynopsis>
       <command>nix-instantiate</command>
       &opt-common-syn;
-      <arg rep='repeat'><replaceable>files</replaceable></arg>
+      <arg choice='plain' rep='repeat'><replaceable>files</replaceable></arg>
     </cmdsynopsis>
   </refsynopsisdiv>
 
-  <refsect1>
+  <refsection>
     <title>Description</title>
 
     <para>
       The command <command>nix-instantiate</command> generates
       (low-level) store expressions 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 derivations.  The paths of the resulting store expressions
+      are printed on standard output.
     </para>
 
-  </refsect1>
+    <para>
+      This command is generally used for testing Nix expression before
+      they are used with <command>nix-env</command>.
+    </para>
+
+  </refsection>
+
+  <refsection>
+    <title>Options</title>
+
+    <variablelist>
+
+      &opt-common;
+
+    </variablelist>
+
+  </refsection>
+
+  <refsection>
+    <title>Examples</title>
+
+    <screen>
+$ nix-instantiate gcc.nix <lineannotation>(instantiate)</lineannotation>
+/nix/store/468abdcb93aa22bb721142615b97698b-d-gcc-3.3.2.store
+
+$ nix-store -r $(nix-instantiate gcc.nix) <lineannotation>(build)</lineannotation>
+
+$ nix-store -r $(nix-instantiate gcc.nix) <lineannotation>(print output path)</lineannotation>
+/nix/store/9afa718cddfdfe94b5b9303d0430ceb1-gcc-3.3.2
+
+$ ls -l /nix/store/9afa718cddfdfe94b5b9303d0430ceb1-gcc-3.3.2
+dr-xr-xr-x    2 eelco    users         360 2003-12-01 16:12 bin
+dr-xr-xr-x    3 eelco    users          72 2003-12-01 16:12 include
+...</screen>
 
+  </refsection>
+    
 </refentry>