about summary refs log tree commit diff
path: root/doc/manual/nix-build.xml
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-02-19T15·30+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-02-19T15·30+0100
commitc31836008e45460513188a3fbeda4416f9153a05 (patch)
treeb062ecb0979116fbc4cc0db76cba8c03a453b140 /doc/manual/nix-build.xml
parente707a8a526698de2237e6ac89e2f1ce6dbc63269 (diff)
nix-instantiate: Add a flag --expr / -E to read expressions from the command line
This is basically a shortcut for ‘echo 'expr...' | nix-instantiate -’.
Also supported by nix-build and nix-shell.
Diffstat (limited to 'doc/manual/nix-build.xml')
-rw-r--r--doc/manual/nix-build.xml10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/manual/nix-build.xml b/doc/manual/nix-build.xml
index 969faf9d1694..3832f5fc3450 100644
--- a/doc/manual/nix-build.xml
+++ b/doc/manual/nix-build.xml
@@ -164,6 +164,16 @@ $ nix-build '&lt;nixpkgs>' -A openssl.man
 </screen>
 This will create a symlink <literal>result-man</literal>.</para>
 
+<para>Build a Nix expression given on the command line:
+
+<screen>
+$ nix-build -E 'with import &lt;nixpkgs> { }; runCommand "foo" { } "echo bar > $out"'
+$ cat ./result
+bar
+</screen>
+
+</para>
+
 </refsection>