2003-08-14 13:27:02 +02:00
|
|
|
<refentry>
|
|
|
|
<refnamediv>
|
2003-11-26 12:24:13 +01:00
|
|
|
<refname>nix-instantiate</refname>
|
2004-02-02 11:51:54 +01:00
|
|
|
<refpurpose>instantiate store expressions from Nix expressions</refpurpose>
|
2003-08-14 13:27:02 +02:00
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<refsynopsisdiv>
|
|
|
|
<cmdsynopsis>
|
2004-02-02 11:51:54 +01:00
|
|
|
<command>nix-instantiate</command>
|
2005-03-15 14:55:41 +01:00
|
|
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="opt-common-syn.xml#xpointer(/nop/*)" />
|
2004-11-13 00:22:08 +01:00
|
|
|
<group choice='opt'>
|
|
|
|
<arg choice='plain'><option>--parse-only</option></arg>
|
|
|
|
<arg choice='plain'><option>--eval-only</option></arg>
|
|
|
|
</group>
|
2004-02-10 17:14:47 +01:00
|
|
|
<arg choice='plain' rep='repeat'><replaceable>files</replaceable></arg>
|
2003-08-14 13:27:02 +02:00
|
|
|
</cmdsynopsis>
|
|
|
|
</refsynopsisdiv>
|
|
|
|
|
2004-02-10 17:14:47 +01:00
|
|
|
<refsection>
|
2003-08-14 13:27:02 +02:00
|
|
|
<title>Description</title>
|
|
|
|
|
|
|
|
<para>
|
2004-02-02 11:51:54 +01:00
|
|
|
The command <command>nix-instantiate</command> generates
|
|
|
|
(low-level) store expressions from (high-level) Nix expressions.
|
2004-02-10 17:14:47 +01:00
|
|
|
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.
|
2003-08-14 13:27:02 +02:00
|
|
|
</para>
|
|
|
|
|
2004-02-10 17:14:47 +01:00
|
|
|
<para>
|
|
|
|
This command is generally used for testing Nix expression before
|
2005-03-16 17:45:29 +01:00
|
|
|
they are used with <command>nix-env</command>. See also <xref
|
|
|
|
linkend="sec-common-options" />.
|
2004-02-10 17:14:47 +01:00
|
|
|
</para>
|
|
|
|
|
|
|
|
</refsection>
|
|
|
|
|
|
|
|
<refsection>
|
|
|
|
<title>Options</title>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
|
2004-11-13 00:22:08 +01:00
|
|
|
<varlistentry>
|
|
|
|
<term><option>--parse-only</option></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Just parse the input files, and print their abstract
|
|
|
|
syntax trees on standard output in ATerm format.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry>
|
|
|
|
<term><option>--eval-only</option></term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
Just parse and evaluate the input files, and print the
|
|
|
|
resulting values on standard output. No instantiation of
|
|
|
|
store expressions takes place.
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2004-02-10 17:14:47 +01:00
|
|
|
</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>
|
2003-08-14 13:27:02 +02:00
|
|
|
|
2004-02-10 17:14:47 +01:00
|
|
|
</refsection>
|
|
|
|
|
2003-08-14 13:27:02 +02:00
|
|
|
</refentry>
|