nix-instantiateinstantiate store expressions from Nix expressionsnix-instantiate
&opt-common-syn;
filesDescription
The command nix-instantiate generates
(low-level) store expressions from (high-level) Nix expressions.
It loads and evaluates the Nix expressions in each of
files. 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.
This command is generally used for testing Nix expression before
they are used with nix-env.
Options
&opt-common;
Just parse the input files, and print their abstract
syntax trees on standard output in ATerm format.
Just parse and evaluate the input files, and print the
resulting values on standard output. No instantiation of
store expressions takes place.
Examples
$ nix-instantiate gcc.nix (instantiate)
/nix/store/468abdcb93aa22bb721142615b97698b-d-gcc-3.3.2.store
$ nix-store -r $(nix-instantiate gcc.nix) (build)
$ nix-store -r $(nix-instantiate gcc.nix) (print output path)
/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
...