about summary refs log tree commit diff
path: root/doc/manual/nix-build.xml
diff options
context:
space:
mode:
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 '<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>