diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-02-19T15·30+0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-02-19T15·30+0100 |
commit | c31836008e45460513188a3fbeda4416f9153a05 (patch) | |
tree | b062ecb0979116fbc4cc0db76cba8c03a453b140 /doc/manual/nix-build.xml | |
parent | e707a8a526698de2237e6ac89e2f1ce6dbc63269 (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.xml | 10 |
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 <nixpkgs> { }; runCommand "foo" { } "echo bar > $out"' +$ cat ./result +bar +</screen> + +</para> + </refsection> |