forked from lix-project/lix
<replaceable> -> <emphasis>
Pandoc doesn't know <replaceable> so let's force it to be rendered as italics.
This commit is contained in:
parent
ee05108472
commit
802150f987
|
@ -86,7 +86,7 @@ To leave a field at its default, set it to <literal>-</literal>.
|
||||||
<orderedlist>
|
<orderedlist>
|
||||||
|
|
||||||
<listitem><para>The URI of the remote store in the format
|
<listitem><para>The URI of the remote store in the format
|
||||||
<literal>ssh://[<replaceable>username</replaceable>@]<replaceable>hostname</replaceable></literal>,
|
<literal>ssh://[<emphasis>username</emphasis>@]<emphasis>hostname</emphasis></literal>,
|
||||||
e.g. <literal>ssh://nix@mac</literal> or
|
e.g. <literal>ssh://nix@mac</literal> or
|
||||||
<literal>ssh://mac</literal>. For backward compatibility,
|
<literal>ssh://mac</literal>. For backward compatibility,
|
||||||
<literal>ssh://</literal> may be omitted. The hostname may be an
|
<literal>ssh://</literal> may be omitted. The hostname may be an
|
||||||
|
@ -171,7 +171,7 @@ builders = ssh://mac x86_64-darwin ; ssh://beastie x86_64-freebsd
|
||||||
|
|
||||||
Finally, remote builders can be configured in a separate configuration
|
Finally, remote builders can be configured in a separate configuration
|
||||||
file included in <option>builders</option> via the syntax
|
file included in <option>builders</option> via the syntax
|
||||||
<literal>@<replaceable>file</replaceable></literal>. For example,
|
<literal>@<emphasis>file</emphasis></literal>. For example,
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
builders = @/etc/nix/machines
|
builders = @/etc/nix/machines
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The system-wide configuration file
|
The system-wide configuration file
|
||||||
<filename><replaceable>sysconfdir</replaceable>/nix/nix.conf</filename>
|
<filename><emphasis>sysconfdir</emphasis>/nix/nix.conf</filename>
|
||||||
(i.e. <filename>/etc/nix/nix.conf</filename> on most systems),
|
(i.e. <filename>/etc/nix/nix.conf</filename> on most systems),
|
||||||
or <filename>$NIX_CONF_DIR/nix.conf</filename> if
|
or <filename>$NIX_CONF_DIR/nix.conf</filename> if
|
||||||
<literal>NIX_CONF_DIR</literal> is set. Values loaded in this
|
<literal>NIX_CONF_DIR</literal> is set. Values loaded in this
|
||||||
|
@ -52,11 +52,11 @@
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
<para>The configuration files consist of
|
<para>The configuration files consist of
|
||||||
<literal><replaceable>name</replaceable> =
|
<literal><emphasis>name</emphasis> =
|
||||||
<replaceable>value</replaceable></literal> pairs, one per line. Other
|
<emphasis>value</emphasis></literal> pairs, one per line. Other
|
||||||
files can be included with a line like <literal>include
|
files can be included with a line like <literal>include
|
||||||
<replaceable>path</replaceable></literal>, where
|
<emphasis>path</emphasis></literal>, where
|
||||||
<replaceable>path</replaceable> is interpreted relative to the current
|
<emphasis>path</emphasis> is interpreted relative to the current
|
||||||
conf file and a missing file is an error unless
|
conf file and a missing file is an error unless
|
||||||
<literal>!include</literal> is used instead.
|
<literal>!include</literal> is used instead.
|
||||||
Comments start with a <literal>#</literal> character. Here is an
|
Comments start with a <literal>#</literal> character. Here is an
|
||||||
|
@ -244,7 +244,7 @@ false</literal>.</para>
|
||||||
instance, in Nixpkgs, if the derivation attribute
|
instance, in Nixpkgs, if the derivation attribute
|
||||||
<varname>enableParallelBuilding</varname> is set to
|
<varname>enableParallelBuilding</varname> is set to
|
||||||
<literal>true</literal>, the builder passes the
|
<literal>true</literal>, the builder passes the
|
||||||
<option>-j<replaceable>N</replaceable></option> flag to GNU Make.
|
<option>-j<emphasis>N</emphasis></option> flag to GNU Make.
|
||||||
It can be overridden using the <option
|
It can be overridden using the <option
|
||||||
linkend='opt-cores'>--cores</option> command line switch and
|
linkend='opt-cores'>--cores</option> command line switch and
|
||||||
defaults to <literal>1</literal>. The value <literal>0</literal>
|
defaults to <literal>1</literal>. The value <literal>0</literal>
|
||||||
|
@ -383,10 +383,10 @@ false</literal>.</para>
|
||||||
<function>builtins.fetchurl</function> to obtain files by
|
<function>builtins.fetchurl</function> to obtain files by
|
||||||
hash. The default is
|
hash. The default is
|
||||||
<literal>http://tarballs.nixos.org/</literal>. Given a hash type
|
<literal>http://tarballs.nixos.org/</literal>. Given a hash type
|
||||||
<replaceable>ht</replaceable> and a base-16 hash
|
<emphasis>ht</emphasis> and a base-16 hash
|
||||||
<replaceable>h</replaceable>, Nix will try to download the file
|
<emphasis>h</emphasis>, Nix will try to download the file
|
||||||
from
|
from
|
||||||
<literal>hashed-mirror/<replaceable>ht</replaceable>/<replaceable>h</replaceable></literal>.
|
<literal>hashed-mirror/<emphasis>ht</emphasis>/<emphasis>h</emphasis></literal>.
|
||||||
This allows files to be downloaded even if they have disappeared
|
This allows files to be downloaded even if they have disappeared
|
||||||
from their original URI. For example, given the default mirror
|
from their original URI. For example, given the default mirror
|
||||||
<literal>http://tarballs.nixos.org/</literal>, when building the derivation
|
<literal>http://tarballs.nixos.org/</literal>, when building the derivation
|
||||||
|
@ -421,7 +421,7 @@ builtins.fetchurl {
|
||||||
output and error of its builder) to the directory
|
output and error of its builder) to the directory
|
||||||
<filename>/nix/var/log/nix/drvs</filename>. The build log can be
|
<filename>/nix/var/log/nix/drvs</filename>. The build log can be
|
||||||
retrieved using the command <command>nix-store -l
|
retrieved using the command <command>nix-store -l
|
||||||
<replaceable>path</replaceable></command>.</para></listitem>
|
<emphasis>path</emphasis></command>.</para></listitem>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
@ -592,9 +592,9 @@ builtins.fetchurl {
|
||||||
accounts in the following format:
|
accounts in the following format:
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
machine <replaceable>my-machine</replaceable>
|
machine <emphasis>my-machine</emphasis>
|
||||||
login <replaceable>my-username</replaceable>
|
login <emphasis>my-username</emphasis>
|
||||||
password <replaceable>my-password</replaceable>
|
password <emphasis>my-password</emphasis>
|
||||||
</screen>
|
</screen>
|
||||||
|
|
||||||
For the exact syntax, see <link
|
For the exact syntax, see <link
|
||||||
|
@ -837,13 +837,13 @@ password <replaceable>my-password</replaceable>
|
||||||
|
|
||||||
<listitem><para>A list of paths bind-mounted into Nix sandbox
|
<listitem><para>A list of paths bind-mounted into Nix sandbox
|
||||||
environments. You can use the syntax
|
environments. You can use the syntax
|
||||||
<literal><replaceable>target</replaceable>=<replaceable>source</replaceable></literal>
|
<literal><emphasis>target</emphasis>=<emphasis>source</emphasis></literal>
|
||||||
to mount a path in a different location in the sandbox; for
|
to mount a path in a different location in the sandbox; for
|
||||||
instance, <literal>/bin=/nix-bin</literal> will mount the path
|
instance, <literal>/bin=/nix-bin</literal> will mount the path
|
||||||
<literal>/nix-bin</literal> as <literal>/bin</literal> inside the
|
<literal>/nix-bin</literal> as <literal>/bin</literal> inside the
|
||||||
sandbox. If <replaceable>source</replaceable> is followed by
|
sandbox. If <emphasis>source</emphasis> is followed by
|
||||||
<literal>?</literal>, then it is not an error if
|
<literal>?</literal>, then it is not an error if
|
||||||
<replaceable>source</replaceable> does not exist; for example,
|
<emphasis>source</emphasis> does not exist; for example,
|
||||||
<literal>/dev/nvidiactl?</literal> specifies that
|
<literal>/dev/nvidiactl?</literal> specifies that
|
||||||
<filename>/dev/nvidiactl</filename> will only be mounted in the
|
<filename>/dev/nvidiactl</filename> will only be mounted in the
|
||||||
sandbox if it exists in the host filesystem.</para>
|
sandbox if it exists in the host filesystem.</para>
|
||||||
|
@ -1035,7 +1035,7 @@ function-trace exited /nix/store/.../example.nix:226:41 at 1565795253249941684
|
||||||
<listitem><para>A list of URLs of substituters, separated by
|
<listitem><para>A list of URLs of substituters, separated by
|
||||||
whitespace. These are not used by default, but can be enabled by
|
whitespace. These are not used by default, but can be enabled by
|
||||||
users of the Nix daemon by specifying <literal>--option
|
users of the Nix daemon by specifying <literal>--option
|
||||||
substituters <replaceable>urls</replaceable></literal> on the
|
substituters <emphasis>urls</emphasis></literal> on the
|
||||||
command line. Unprivileged users are only allowed to pass a
|
command line. Unprivileged users are only allowed to pass a
|
||||||
subset of the URLs listed in <literal>substituters</literal> and
|
subset of the URLs listed in <literal>substituters</literal> and
|
||||||
<literal>trusted-substituters</literal>.</para></listitem>
|
<literal>trusted-substituters</literal>.</para></listitem>
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
<para>A colon-separated list of directories used to look up Nix
|
<para>A colon-separated list of directories used to look up Nix
|
||||||
expressions enclosed in angle brackets (i.e.,
|
expressions enclosed in angle brackets (i.e.,
|
||||||
<literal><<replaceable>path</replaceable>></literal>). For
|
<literal><<emphasis>path</emphasis>></literal>). For
|
||||||
instance, the value
|
instance, the value
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
|
@ -40,10 +40,10 @@
|
||||||
nixpkgs=/home/eelco/Dev/nixpkgs-branch:/etc/nixos</screen>
|
nixpkgs=/home/eelco/Dev/nixpkgs-branch:/etc/nixos</screen>
|
||||||
|
|
||||||
will cause Nix to search for
|
will cause Nix to search for
|
||||||
<literal><nixpkgs/<replaceable>path</replaceable>></literal> in
|
<literal><nixpkgs/<emphasis>path</emphasis>></literal> in
|
||||||
<filename>/home/eelco/Dev/nixpkgs-branch/<replaceable>path</replaceable></filename>
|
<filename>/home/eelco/Dev/nixpkgs-branch/<emphasis>path</emphasis></filename>
|
||||||
and
|
and
|
||||||
<filename>/etc/nixos/nixpkgs/<replaceable>path</replaceable></filename>.</para>
|
<filename>/etc/nixos/nixpkgs/<emphasis>path</emphasis></filename>.</para>
|
||||||
|
|
||||||
<para>If a path in the Nix search path starts with
|
<para>If a path in the Nix search path starts with
|
||||||
<literal>http://</literal> or <literal>https://</literal>, it is
|
<literal>http://</literal> or <literal>https://</literal>, it is
|
||||||
|
@ -105,7 +105,7 @@ $ mount -o bind /mnt/otherdisk/nix /nix</screen>
|
||||||
<varlistentry><term><literal>NIX_STORE_DIR</literal></term>
|
<varlistentry><term><literal>NIX_STORE_DIR</literal></term>
|
||||||
|
|
||||||
<listitem><para>Overrides the location of the Nix store (default
|
<listitem><para>Overrides the location of the Nix store (default
|
||||||
<filename><replaceable>prefix</replaceable>/store</filename>).</para></listitem>
|
<filename><emphasis>prefix</emphasis>/store</filename>).</para></listitem>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ $ mount -o bind /mnt/otherdisk/nix /nix</screen>
|
||||||
|
|
||||||
<listitem><para>Overrides the location of the Nix static data
|
<listitem><para>Overrides the location of the Nix static data
|
||||||
directory (default
|
directory (default
|
||||||
<filename><replaceable>prefix</replaceable>/share</filename>).</para></listitem>
|
<filename><emphasis>prefix</emphasis>/share</filename>).</para></listitem>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ $ mount -o bind /mnt/otherdisk/nix /nix</screen>
|
||||||
<varlistentry><term><literal>NIX_LOG_DIR</literal></term>
|
<varlistentry><term><literal>NIX_LOG_DIR</literal></term>
|
||||||
|
|
||||||
<listitem><para>Overrides the location of the Nix log directory
|
<listitem><para>Overrides the location of the Nix log directory
|
||||||
(default <filename><replaceable>prefix</replaceable>/var/log/nix</filename>).</para></listitem>
|
(default <filename><emphasis>prefix</emphasis>/var/log/nix</filename>).</para></listitem>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ $ mount -o bind /mnt/otherdisk/nix /nix</screen>
|
||||||
<varlistentry><term><literal>NIX_STATE_DIR</literal></term>
|
<varlistentry><term><literal>NIX_STATE_DIR</literal></term>
|
||||||
|
|
||||||
<listitem><para>Overrides the location of the Nix state directory
|
<listitem><para>Overrides the location of the Nix state directory
|
||||||
(default <filename><replaceable>prefix</replaceable>/var/nix</filename>).</para></listitem>
|
(default <filename><emphasis>prefix</emphasis>/var/nix</filename>).</para></listitem>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ $ mount -o bind /mnt/otherdisk/nix /nix</screen>
|
||||||
|
|
||||||
<listitem><para>Overrides the location of the system Nix configuration
|
<listitem><para>Overrides the location of the system Nix configuration
|
||||||
directory (default
|
directory (default
|
||||||
<filename><replaceable>prefix</replaceable>/etc/nix</filename>).</para></listitem>
|
<filename><emphasis>prefix</emphasis>/etc/nix</filename>).</para></listitem>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
|
|
@ -20,14 +20,14 @@
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>nix-build</command>
|
<command>nix-build</command>
|
||||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="opt-common-syn.xml#xmlns(db=http://docbook.org/ns/docbook)xpointer(/db:nop/*)" />
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="opt-common-syn.xml#xmlns(db=http://docbook.org/ns/docbook)xpointer(/db:nop/*)" />
|
||||||
<arg><option>--arg</option> <replaceable>name</replaceable> <replaceable>value</replaceable></arg>
|
<arg><option>--arg</option> <emphasis>name</emphasis> <emphasis>value</emphasis></arg>
|
||||||
<arg><option>--argstr</option> <replaceable>name</replaceable> <replaceable>value</replaceable></arg>
|
<arg><option>--argstr</option> <emphasis>name</emphasis> <emphasis>value</emphasis></arg>
|
||||||
<arg>
|
<arg>
|
||||||
<group choice='req'>
|
<group choice='req'>
|
||||||
<arg choice='plain'><option>--attr</option></arg>
|
<arg choice='plain'><option>--attr</option></arg>
|
||||||
<arg choice='plain'><option>-A</option></arg>
|
<arg choice='plain'><option>-A</option></arg>
|
||||||
</group>
|
</group>
|
||||||
<replaceable>attrPath</replaceable>
|
<emphasis>attrPath</emphasis>
|
||||||
</arg>
|
</arg>
|
||||||
<arg><option>--no-out-link</option></arg>
|
<arg><option>--no-out-link</option></arg>
|
||||||
<arg><option>--dry-run</option></arg>
|
<arg><option>--dry-run</option></arg>
|
||||||
|
@ -36,16 +36,16 @@
|
||||||
<arg choice='plain'><option>--out-link</option></arg>
|
<arg choice='plain'><option>--out-link</option></arg>
|
||||||
<arg choice='plain'><option>-o</option></arg>
|
<arg choice='plain'><option>-o</option></arg>
|
||||||
</group>
|
</group>
|
||||||
<replaceable>outlink</replaceable>
|
<emphasis>outlink</emphasis>
|
||||||
</arg>
|
</arg>
|
||||||
<arg choice='plain' rep='repeat'><replaceable>paths</replaceable></arg>
|
<arg choice='plain' rep='repeat'><emphasis>paths</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsection><title>Description</title>
|
<refsection><title>Description</title>
|
||||||
|
|
||||||
<para>The <command>nix-build</command> command builds the derivations
|
<para>The <command>nix-build</command> command builds the derivations
|
||||||
described by the Nix expressions in <replaceable>paths</replaceable>.
|
described by the Nix expressions in <emphasis>paths</emphasis>.
|
||||||
If the build succeeds, it places a symlink to the result in the
|
If the build succeeds, it places a symlink to the result in the
|
||||||
current directory. The symlink is called <filename>result</filename>.
|
current directory. The symlink is called <filename>result</filename>.
|
||||||
If there are multiple Nix expressions, or the Nix expressions evaluate
|
If there are multiple Nix expressions, or the Nix expressions evaluate
|
||||||
|
@ -53,11 +53,11 @@ to multiple derivations, multiple sequentially numbered symlinks are
|
||||||
created (<filename>result</filename>, <filename>result-2</filename>,
|
created (<filename>result</filename>, <filename>result-2</filename>,
|
||||||
and so on).</para>
|
and so on).</para>
|
||||||
|
|
||||||
<para>If no <replaceable>paths</replaceable> are specified, then
|
<para>If no <emphasis>paths</emphasis> are specified, then
|
||||||
<command>nix-build</command> will use <filename>default.nix</filename>
|
<command>nix-build</command> will use <filename>default.nix</filename>
|
||||||
in the current directory, if it exists.</para>
|
in the current directory, if it exists.</para>
|
||||||
|
|
||||||
<para>If an element of <replaceable>paths</replaceable> starts with
|
<para>If an element of <emphasis>paths</emphasis> starts with
|
||||||
<literal>http://</literal> or <literal>https://</literal>, it is
|
<literal>http://</literal> or <literal>https://</literal>, it is
|
||||||
interpreted as the URL of a tarball that will be downloaded and
|
interpreted as the URL of a tarball that will be downloaded and
|
||||||
unpacked to a temporary location. The tarball must include a single
|
unpacked to a temporary location. The tarball must include a single
|
||||||
|
@ -104,11 +104,11 @@ also <xref linkend="sec-common-options" />.</phrase></para>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry xml:id='opt-out-link'><term><option>--out-link</option> /
|
<varlistentry xml:id='opt-out-link'><term><option>--out-link</option> /
|
||||||
<option>-o</option> <replaceable>outlink</replaceable></term>
|
<option>-o</option> <emphasis>outlink</emphasis></term>
|
||||||
|
|
||||||
<listitem><para>Change the name of the symlink to the output path
|
<listitem><para>Change the name of the symlink to the output path
|
||||||
created from <filename>result</filename> to
|
created from <filename>result</filename> to
|
||||||
<replaceable>outlink</replaceable>.</para></listitem>
|
<emphasis>outlink</emphasis>.</para></listitem>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ store derivation is /nix/store/qybprl8sz2lc...-firefox-1.5.0.7.drv
|
||||||
/nix/store/d18hyl92g30l...-firefox-1.5.0.7
|
/nix/store/d18hyl92g30l...-firefox-1.5.0.7
|
||||||
|
|
||||||
$ ls -l result
|
$ ls -l result
|
||||||
lrwxrwxrwx <replaceable>...</replaceable> result -> /nix/store/d18hyl92g30l...-firefox-1.5.0.7
|
lrwxrwxrwx <emphasis>...</emphasis> result -> /nix/store/d18hyl92g30l...-firefox-1.5.0.7
|
||||||
|
|
||||||
$ ls ./result/bin/
|
$ ls ./result/bin/
|
||||||
firefox firefox-config</screen>
|
firefox firefox-config</screen>
|
||||||
|
@ -143,7 +143,7 @@ You can also build all outputs:
|
||||||
$ nix-build '<nixpkgs>' -A openssl.all
|
$ nix-build '<nixpkgs>' -A openssl.all
|
||||||
</screen>
|
</screen>
|
||||||
This will create a symlink for each output named
|
This will create a symlink for each output named
|
||||||
<filename>result-<replaceable>outputname</replaceable></filename>.
|
<filename>result-<emphasis>outputname</emphasis></filename>.
|
||||||
The suffix is omitted if the output name is <literal>out</literal>.
|
The suffix is omitted if the output name is <literal>out</literal>.
|
||||||
So if <literal>openssl</literal> has outputs <literal>out</literal>,
|
So if <literal>openssl</literal> has outputs <literal>out</literal>,
|
||||||
<literal>bin</literal> and <literal>man</literal>,
|
<literal>bin</literal> and <literal>man</literal>,
|
||||||
|
|
|
@ -20,11 +20,11 @@
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>nix-channel</command>
|
<command>nix-channel</command>
|
||||||
<group choice='req'>
|
<group choice='req'>
|
||||||
<arg choice='plain'><option>--add</option> <replaceable>url</replaceable> <arg choice='opt'><replaceable>name</replaceable></arg></arg>
|
<arg choice='plain'><option>--add</option> <emphasis>url</emphasis> <arg choice='opt'><emphasis>name</emphasis></arg></arg>
|
||||||
<arg choice='plain'><option>--remove</option> <replaceable>name</replaceable></arg>
|
<arg choice='plain'><option>--remove</option> <emphasis>name</emphasis></arg>
|
||||||
<arg choice='plain'><option>--list</option></arg>
|
<arg choice='plain'><option>--list</option></arg>
|
||||||
<arg choice='plain'><option>--update</option> <arg rep='repeat'><replaceable>names</replaceable></arg></arg>
|
<arg choice='plain'><option>--update</option> <arg rep='repeat'><emphasis>names</emphasis></arg></arg>
|
||||||
<arg choice='plain'><option>--rollback</option> <arg choice='opt'><replaceable>generation</replaceable></arg></arg>
|
<arg choice='plain'><option>--rollback</option> <arg choice='opt'><emphasis>generation</emphasis></arg></arg>
|
||||||
</group>
|
</group>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
@ -44,22 +44,22 @@ xlink:href="https://nixos.org/channels" />.</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
|
||||||
<varlistentry><term><option>--add</option> <replaceable>url</replaceable> [<replaceable>name</replaceable>]</term>
|
<varlistentry><term><option>--add</option> <emphasis>url</emphasis> [<emphasis>name</emphasis>]</term>
|
||||||
|
|
||||||
<listitem><para>Adds a channel named
|
<listitem><para>Adds a channel named
|
||||||
<replaceable>name</replaceable> with URL
|
<emphasis>name</emphasis> with URL
|
||||||
<replaceable>url</replaceable> to the list of subscribed channels.
|
<emphasis>url</emphasis> to the list of subscribed channels.
|
||||||
If <replaceable>name</replaceable> is omitted, it defaults to the
|
If <emphasis>name</emphasis> is omitted, it defaults to the
|
||||||
last component of <replaceable>url</replaceable>, with the
|
last component of <emphasis>url</emphasis>, with the
|
||||||
suffixes <literal>-stable</literal> or
|
suffixes <literal>-stable</literal> or
|
||||||
<literal>-unstable</literal> removed.</para></listitem>
|
<literal>-unstable</literal> removed.</para></listitem>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry><term><option>--remove</option> <replaceable>name</replaceable></term>
|
<varlistentry><term><option>--remove</option> <emphasis>name</emphasis></term>
|
||||||
|
|
||||||
<listitem><para>Removes the channel named
|
<listitem><para>Removes the channel named
|
||||||
<replaceable>name</replaceable> from the list of subscribed
|
<emphasis>name</emphasis> from the list of subscribed
|
||||||
channels.</para></listitem>
|
channels.</para></listitem>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
@ -71,18 +71,18 @@ xlink:href="https://nixos.org/channels" />.</para>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry><term><option>--update</option> [<replaceable>names</replaceable>…]</term>
|
<varlistentry><term><option>--update</option> [<emphasis>names</emphasis>…]</term>
|
||||||
|
|
||||||
<listitem><para>Downloads the Nix expressions of all subscribed
|
<listitem><para>Downloads the Nix expressions of all subscribed
|
||||||
channels (or only those included in
|
channels (or only those included in
|
||||||
<replaceable>names</replaceable> if specified) and makes them the
|
<emphasis>names</emphasis> if specified) and makes them the
|
||||||
default for <command>nix-env</command> operations (by symlinking
|
default for <command>nix-env</command> operations (by symlinking
|
||||||
them from the directory
|
them from the directory
|
||||||
<filename>~/.nix-defexpr</filename>).</para></listitem>
|
<filename>~/.nix-defexpr</filename>).</para></listitem>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry><term><option>--rollback</option> [<replaceable>generation</replaceable>]</term>
|
<varlistentry><term><option>--rollback</option> [<emphasis>generation</emphasis>]</term>
|
||||||
|
|
||||||
<listitem><para>Reverts the previous call to <command>nix-channel
|
<listitem><para>Reverts the previous call to <command>nix-channel
|
||||||
--update</command>. Optionally, you can specify a specific channel
|
--update</command>. Optionally, you can specify a specific channel
|
||||||
|
@ -130,7 +130,7 @@ $ nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
|
||||||
<varlistentry><term><filename>/nix/var/nix/profiles/per-user/<replaceable>username</replaceable>/channels</filename></term>
|
<varlistentry><term><filename>/nix/var/nix/profiles/per-user/<emphasis>username</emphasis>/channels</filename></term>
|
||||||
|
|
||||||
<listitem><para><command>nix-channel</command> uses a
|
<listitem><para><command>nix-channel</command> uses a
|
||||||
<command>nix-env</command> profile to keep track of previous
|
<command>nix-env</command> profile to keep track of previous
|
||||||
|
@ -145,7 +145,7 @@ $ nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
|
||||||
<varlistentry><term><filename>~/.nix-defexpr/channels</filename></term>
|
<varlistentry><term><filename>~/.nix-defexpr/channels</filename></term>
|
||||||
|
|
||||||
<listitem><para>This is a symlink to
|
<listitem><para>This is a symlink to
|
||||||
<filename>/nix/var/nix/profiles/per-user/<replaceable>username</replaceable>/channels</filename>. It
|
<filename>/nix/var/nix/profiles/per-user/<emphasis>username</emphasis>/channels</filename>. It
|
||||||
ensures that <command>nix-env</command> can find your channels. In
|
ensures that <command>nix-env</command> can find your channels. In
|
||||||
a multi-user installation, you may also have
|
a multi-user installation, you may also have
|
||||||
<filename>~/.nix-defexpr/channels_root</filename>, which links to
|
<filename>~/.nix-defexpr/channels_root</filename>, which links to
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
<command>nix-collect-garbage</command>
|
<command>nix-collect-garbage</command>
|
||||||
<arg><option>--delete-old</option></arg>
|
<arg><option>--delete-old</option></arg>
|
||||||
<arg><option>-d</option></arg>
|
<arg><option>-d</option></arg>
|
||||||
<arg><option>--delete-older-than</option> <replaceable>period</replaceable></arg>
|
<arg><option>--delete-older-than</option> <emphasis>period</emphasis></arg>
|
||||||
<arg><option>--max-freed</option> <replaceable>bytes</replaceable></arg>
|
<arg><option>--max-freed</option> <emphasis>bytes</emphasis></arg>
|
||||||
<arg><option>--dry-run</option></arg>
|
<arg><option>--dry-run</option></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
@ -39,7 +39,7 @@ which deletes all old generations of all profiles in
|
||||||
<literal>nix-env --delete-generations old</literal> on all profiles
|
<literal>nix-env --delete-generations old</literal> on all profiles
|
||||||
(of course, this makes rollbacks to previous configurations
|
(of course, this makes rollbacks to previous configurations
|
||||||
impossible); and
|
impossible); and
|
||||||
<option>--delete-older-than</option> <replaceable>period</replaceable>,
|
<option>--delete-older-than</option> <emphasis>period</emphasis>,
|
||||||
where period is a value such as <literal>30d</literal>, which deletes
|
where period is a value such as <literal>30d</literal>, which deletes
|
||||||
all generations older than the specified number of days in all profiles
|
all generations older than the specified number of days in all profiles
|
||||||
in <filename>/nix/var/nix/profiles</filename> (except for the generations
|
in <filename>/nix/var/nix/profiles</filename> (except for the generations
|
||||||
|
|
|
@ -33,9 +33,9 @@
|
||||||
</group>
|
</group>
|
||||||
<arg><option>-v</option></arg>
|
<arg><option>-v</option></arg>
|
||||||
<arg choice='plain'>
|
<arg choice='plain'>
|
||||||
<replaceable>user@</replaceable><replaceable>machine</replaceable>
|
<emphasis>user@</emphasis><emphasis>machine</emphasis>
|
||||||
</arg>
|
</arg>
|
||||||
<arg choice='plain'><replaceable>paths</replaceable></arg>
|
<arg choice='plain'><emphasis>paths</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
|
@ -44,13 +44,13 @@
|
||||||
|
|
||||||
<para><command>nix-copy-closure</command> gives you an easy and
|
<para><command>nix-copy-closure</command> gives you an easy and
|
||||||
efficient way to exchange software between machines. Given one or
|
efficient way to exchange software between machines. Given one or
|
||||||
more Nix store <replaceable>paths</replaceable> on the local
|
more Nix store <emphasis>paths</emphasis> on the local
|
||||||
machine, <command>nix-copy-closure</command> computes the closure of
|
machine, <command>nix-copy-closure</command> computes the closure of
|
||||||
those paths (i.e. all their dependencies in the Nix store), and copies
|
those paths (i.e. all their dependencies in the Nix store), and copies
|
||||||
all paths in the closure to the remote machine via the
|
all paths in the closure to the remote machine via the
|
||||||
<command>ssh</command> (Secure Shell) command. With the
|
<command>ssh</command> (Secure Shell) command. With the
|
||||||
<option>--from</option>, the direction is reversed:
|
<option>--from</option>, the direction is reversed:
|
||||||
the closure of <replaceable>paths</replaceable> on a remote machine is
|
the closure of <emphasis>paths</emphasis> on a remote machine is
|
||||||
copied to the Nix store on the local machine.</para>
|
copied to the Nix store on the local machine.</para>
|
||||||
|
|
||||||
<para>This command is efficient because it only sends the store paths
|
<para>This command is efficient because it only sends the store paths
|
||||||
|
@ -73,8 +73,8 @@ those paths. If this bothers you, use
|
||||||
<varlistentry><term><option>--to</option></term>
|
<varlistentry><term><option>--to</option></term>
|
||||||
|
|
||||||
<listitem><para>Copy the closure of
|
<listitem><para>Copy the closure of
|
||||||
<replaceable>paths</replaceable> from the local Nix store to the
|
<emphasis>paths</emphasis> from the local Nix store to the
|
||||||
Nix store on <replaceable>machine</replaceable>. This is the
|
Nix store on <emphasis>machine</emphasis>. This is the
|
||||||
default.</para></listitem>
|
default.</para></listitem>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
@ -82,8 +82,8 @@ those paths. If this bothers you, use
|
||||||
<varlistentry><term><option>--from</option></term>
|
<varlistentry><term><option>--from</option></term>
|
||||||
|
|
||||||
<listitem><para>Copy the closure of
|
<listitem><para>Copy the closure of
|
||||||
<replaceable>paths</replaceable> from the Nix store on
|
<emphasis>paths</emphasis> from the Nix store on
|
||||||
<replaceable>machine</replaceable> to the local Nix
|
<emphasis>machine</emphasis> to the local Nix
|
||||||
store.</para></listitem>
|
store.</para></listitem>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
|
@ -20,30 +20,30 @@
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>nix-env</command>
|
<command>nix-env</command>
|
||||||
<xi:include href="opt-common-syn.xml#xmlns(db=http://docbook.org/ns/docbook)xpointer(/db:nop/*)" />
|
<xi:include href="opt-common-syn.xml#xmlns(db=http://docbook.org/ns/docbook)xpointer(/db:nop/*)" />
|
||||||
<arg><option>--arg</option> <replaceable>name</replaceable> <replaceable>value</replaceable></arg>
|
<arg><option>--arg</option> <emphasis>name</emphasis> <emphasis>value</emphasis></arg>
|
||||||
<arg><option>--argstr</option> <replaceable>name</replaceable> <replaceable>value</replaceable></arg>
|
<arg><option>--argstr</option> <emphasis>name</emphasis> <emphasis>value</emphasis></arg>
|
||||||
<arg>
|
<arg>
|
||||||
<group choice='req'>
|
<group choice='req'>
|
||||||
<arg choice='plain'><option>--file</option></arg>
|
<arg choice='plain'><option>--file</option></arg>
|
||||||
<arg choice='plain'><option>-f</option></arg>
|
<arg choice='plain'><option>-f</option></arg>
|
||||||
</group>
|
</group>
|
||||||
<replaceable>path</replaceable>
|
<emphasis>path</emphasis>
|
||||||
</arg>
|
</arg>
|
||||||
<arg>
|
<arg>
|
||||||
<group choice='req'>
|
<group choice='req'>
|
||||||
<arg choice='plain'><option>--profile</option></arg>
|
<arg choice='plain'><option>--profile</option></arg>
|
||||||
<arg choice='plain'><option>-p</option></arg>
|
<arg choice='plain'><option>-p</option></arg>
|
||||||
</group>
|
</group>
|
||||||
<replaceable>path</replaceable>
|
<emphasis>path</emphasis>
|
||||||
</arg>
|
</arg>
|
||||||
<arg>
|
<arg>
|
||||||
<arg choice='plain'><option>--system-filter</option></arg>
|
<arg choice='plain'><option>--system-filter</option></arg>
|
||||||
<replaceable>system</replaceable>
|
<emphasis>system</emphasis>
|
||||||
</arg>
|
</arg>
|
||||||
<arg><option>--dry-run</option></arg>
|
<arg><option>--dry-run</option></arg>
|
||||||
<arg choice='plain'><replaceable>operation</replaceable></arg>
|
<arg choice='plain'><emphasis>operation</emphasis></arg>
|
||||||
<arg rep='repeat'><replaceable>options</replaceable></arg>
|
<arg rep='repeat'><emphasis>options</emphasis></arg>
|
||||||
<arg rep='repeat'><replaceable>arguments</replaceable></arg>
|
<arg rep='repeat'><emphasis>arguments</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ also <xref linkend="sec-common-options" />.</phrase></para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
|
||||||
<varlistentry><term><option>--file</option> / <option>-f</option> <replaceable>path</replaceable></term>
|
<varlistentry><term><option>--file</option> / <option>-f</option> <emphasis>path</emphasis></term>
|
||||||
|
|
||||||
<listitem><para>Specifies the Nix expression (designated below as
|
<listitem><para>Specifies the Nix expression (designated below as
|
||||||
the <emphasis>active Nix expression</emphasis>) used by the
|
the <emphasis>active Nix expression</emphasis>) used by the
|
||||||
|
@ -165,7 +165,7 @@ also <xref linkend="sec-common-options" />.</phrase></para>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry><term><option>--profile</option> / <option>-p</option> <replaceable>path</replaceable></term>
|
<varlistentry><term><option>--profile</option> / <option>-p</option> <emphasis>path</emphasis></term>
|
||||||
|
|
||||||
<listitem><para>Specifies the profile to be used by those
|
<listitem><para>Specifies the profile to be used by those
|
||||||
operations that operate on a profile (designated below as the
|
operations that operate on a profile (designated below as the
|
||||||
|
@ -194,12 +194,12 @@ also <xref linkend="sec-common-options" />.</phrase></para>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry><term><option>--system-filter</option> <replaceable>system</replaceable></term>
|
<varlistentry><term><option>--system-filter</option> <emphasis>system</emphasis></term>
|
||||||
|
|
||||||
<listitem><para>By default, operations such as <option>--query
|
<listitem><para>By default, operations such as <option>--query
|
||||||
--available</option> show derivations matching any platform. This
|
--available</option> show derivations matching any platform. This
|
||||||
option allows you to use derivations for the specified platform
|
option allows you to use derivations for the specified platform
|
||||||
<replaceable>system</replaceable>.</para></listitem>
|
<emphasis>system</emphasis>.</para></listitem>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
@ -276,7 +276,7 @@ also <xref linkend="sec-common-options" />.</phrase></para>
|
||||||
|
|
||||||
<listitem><para>A symbolic link to the user's current profile. By
|
<listitem><para>A symbolic link to the user's current profile. By
|
||||||
default, this symlink points to
|
default, this symlink points to
|
||||||
<filename><replaceable>prefix</replaceable>/var/nix/profiles/default</filename>.
|
<filename><emphasis>prefix</emphasis>/var/nix/profiles/default</filename>.
|
||||||
The <literal>PATH</literal> environment variable should include
|
The <literal>PATH</literal> environment variable should include
|
||||||
<filename>~/.nix-profile/bin</filename> for the user environment
|
<filename>~/.nix-profile/bin</filename> for the user environment
|
||||||
to be visible to the user.</para></listitem>
|
to be visible to the user.</para></listitem>
|
||||||
|
@ -310,7 +310,7 @@ also <xref linkend="sec-common-options" />.</phrase></para>
|
||||||
<arg choice='plain'><option>--remove-all</option></arg>
|
<arg choice='plain'><option>--remove-all</option></arg>
|
||||||
<arg choice='plain'><option>-r</option></arg>
|
<arg choice='plain'><option>-r</option></arg>
|
||||||
</group>
|
</group>
|
||||||
<arg choice='plain' rep='repeat'><replaceable>args</replaceable></arg>
|
<arg choice='plain' rep='repeat'><emphasis>args</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
|
|
||||||
</refsection>
|
</refsection>
|
||||||
|
@ -320,13 +320,13 @@ also <xref linkend="sec-common-options" />.</phrase></para>
|
||||||
|
|
||||||
<para>The install operation creates a new user environment, based on
|
<para>The install operation creates a new user environment, based on
|
||||||
the current generation of the active profile, to which a set of store
|
the current generation of the active profile, to which a set of store
|
||||||
paths described by <replaceable>args</replaceable> is added. The
|
paths described by <emphasis>args</emphasis> is added. The
|
||||||
arguments <replaceable>args</replaceable> map to store paths in a
|
arguments <emphasis>args</emphasis> map to store paths in a
|
||||||
number of possible ways:
|
number of possible ways:
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
|
|
||||||
<listitem><para>By default, <replaceable>args</replaceable> is a set
|
<listitem><para>By default, <emphasis>args</emphasis> is a set
|
||||||
of derivation names denoting derivations in the active Nix
|
of derivation names denoting derivations in the active Nix
|
||||||
expression. These are realised, and the resulting output paths are
|
expression. These are realised, and the resulting output paths are
|
||||||
installed. Currently installed derivations with a name equal to the
|
installed. Currently installed derivations with a name equal to the
|
||||||
|
@ -335,7 +335,7 @@ number of possible ways:
|
||||||
specified.</para>
|
specified.</para>
|
||||||
|
|
||||||
<para>If there are multiple derivations matching a name in
|
<para>If there are multiple derivations matching a name in
|
||||||
<replaceable>args</replaceable> that have the same name (e.g.,
|
<emphasis>args</emphasis> that have the same name (e.g.,
|
||||||
<literal>gcc-3.3.6</literal> and <literal>gcc-4.1.1</literal>), then
|
<literal>gcc-3.3.6</literal> and <literal>gcc-4.1.1</literal>), then
|
||||||
the derivation with the highest <emphasis>priority</emphasis> is
|
the derivation with the highest <emphasis>priority</emphasis> is
|
||||||
used. A derivation can define a priority by declaring the
|
used. A derivation can define a priority by declaring the
|
||||||
|
@ -362,14 +362,14 @@ number of possible ways:
|
||||||
packages, use <literal>nix-env -qaP</literal>.</para></listitem>
|
packages, use <literal>nix-env -qaP</literal>.</para></listitem>
|
||||||
|
|
||||||
<listitem><para>If <option>--from-profile</option>
|
<listitem><para>If <option>--from-profile</option>
|
||||||
<replaceable>path</replaceable> is given,
|
<emphasis>path</emphasis> is given,
|
||||||
<replaceable>args</replaceable> is a set of names denoting installed
|
<emphasis>args</emphasis> is a set of names denoting installed
|
||||||
store paths in the profile <replaceable>path</replaceable>. This is
|
store paths in the profile <emphasis>path</emphasis>. This is
|
||||||
an easy way to copy user environment elements from one profile to
|
an easy way to copy user environment elements from one profile to
|
||||||
another.</para></listitem>
|
another.</para></listitem>
|
||||||
|
|
||||||
<listitem><para>If <option>--from-expression</option> is given,
|
<listitem><para>If <option>--from-expression</option> is given,
|
||||||
<replaceable>args</replaceable> are Nix <link
|
<emphasis>args</emphasis> are Nix <link
|
||||||
linkend="ss-functions">functions</link> that are called with the
|
linkend="ss-functions">functions</link> that are called with the
|
||||||
active Nix expression as their single argument. The derivations
|
active Nix expression as their single argument. The derivations
|
||||||
returned by those function calls are installed. This allows
|
returned by those function calls are installed. This allows
|
||||||
|
@ -377,12 +377,12 @@ number of possible ways:
|
||||||
if there are multiple derivations with the same
|
if there are multiple derivations with the same
|
||||||
name.</para></listitem>
|
name.</para></listitem>
|
||||||
|
|
||||||
<listitem><para>If <replaceable>args</replaceable> are store
|
<listitem><para>If <emphasis>args</emphasis> are store
|
||||||
derivations, then these are <link
|
derivations, then these are <link
|
||||||
linkend="rsec-nix-store-realise">realised</link>, and the resulting
|
linkend="rsec-nix-store-realise">realised</link>, and the resulting
|
||||||
output paths are installed.</para></listitem>
|
output paths are installed.</para></listitem>
|
||||||
|
|
||||||
<listitem><para>If <replaceable>args</replaceable> are store paths
|
<listitem><para>If <emphasis>args</emphasis> are store paths
|
||||||
that are not store derivations, then these are <link
|
that are not store derivations, then these are <link
|
||||||
linkend="rsec-nix-store-realise">realised</link> and
|
linkend="rsec-nix-store-realise">realised</link> and
|
||||||
installed.</para></listitem>
|
installed.</para></listitem>
|
||||||
|
@ -518,7 +518,7 @@ $ nix-env -f '<nixpkgs>' -iA hello --dry-run
|
||||||
installing ‘hello-2.10’
|
installing ‘hello-2.10’
|
||||||
this path will be fetched (0.04 MiB download, 0.19 MiB unpacked):
|
this path will be fetched (0.04 MiB download, 0.19 MiB unpacked):
|
||||||
/nix/store/wkhdf9jinag5750mqlax6z2zbwhqb76n-hello-2.10
|
/nix/store/wkhdf9jinag5750mqlax6z2zbwhqb76n-hello-2.10
|
||||||
<replaceable>...</replaceable></screen>
|
<emphasis>...</emphasis></screen>
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -556,7 +556,7 @@ $ nix-env -f https://github.com/NixOS/nixpkgs/archive/nixos-14.12.tar.gz -iA fir
|
||||||
<arg choice='plain'><option>--eq</option></arg>
|
<arg choice='plain'><option>--eq</option></arg>
|
||||||
<arg choice='plain'><option>--always</option></arg>
|
<arg choice='plain'><option>--always</option></arg>
|
||||||
</group>
|
</group>
|
||||||
<arg choice='plain' rep='repeat'><replaceable>args</replaceable></arg>
|
<arg choice='plain' rep='repeat'><emphasis>args</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
|
|
||||||
</refsection>
|
</refsection>
|
||||||
|
@ -566,15 +566,15 @@ $ nix-env -f https://github.com/NixOS/nixpkgs/archive/nixos-14.12.tar.gz -iA fir
|
||||||
<para>The upgrade operation creates a new user environment, based on
|
<para>The upgrade operation creates a new user environment, based on
|
||||||
the current generation of the active profile, in which all store paths
|
the current generation of the active profile, in which all store paths
|
||||||
are replaced for which there are newer versions in the set of paths
|
are replaced for which there are newer versions in the set of paths
|
||||||
described by <replaceable>args</replaceable>. Paths for which there
|
described by <emphasis>args</emphasis>. Paths for which there
|
||||||
are no newer versions are left untouched; this is not an error. It is
|
are no newer versions are left untouched; this is not an error. It is
|
||||||
also not an error if an element of <replaceable>args</replaceable>
|
also not an error if an element of <emphasis>args</emphasis>
|
||||||
matches no installed derivations.</para>
|
matches no installed derivations.</para>
|
||||||
|
|
||||||
<para>For a description of how <replaceable>args</replaceable> is
|
<para>For a description of how <emphasis>args</emphasis> is
|
||||||
mapped to a set of store paths, see <link
|
mapped to a set of store paths, see <link
|
||||||
linkend="rsec-nix-env-install"><option>--install</option></link>. If
|
linkend="rsec-nix-env-install"><option>--install</option></link>. If
|
||||||
<replaceable>args</replaceable> describes multiple store paths with
|
<emphasis>args</emphasis> describes multiple store paths with
|
||||||
the same symbolic name, only the one with the highest version is
|
the same symbolic name, only the one with the highest version is
|
||||||
installed.</para>
|
installed.</para>
|
||||||
|
|
||||||
|
@ -711,7 +711,7 @@ lexicographically (i.e., using case-sensitive string comparison).</para>
|
||||||
<arg choice='plain'><option>--uninstall</option></arg>
|
<arg choice='plain'><option>--uninstall</option></arg>
|
||||||
<arg choice='plain'><option>-e</option></arg>
|
<arg choice='plain'><option>-e</option></arg>
|
||||||
</group>
|
</group>
|
||||||
<arg choice='plain' rep='repeat'><replaceable>drvnames</replaceable></arg>
|
<arg choice='plain' rep='repeat'><emphasis>drvnames</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsection>
|
</refsection>
|
||||||
|
|
||||||
|
@ -720,7 +720,7 @@ lexicographically (i.e., using case-sensitive string comparison).</para>
|
||||||
<para>The uninstall operation creates a new user environment, based on
|
<para>The uninstall operation creates a new user environment, based on
|
||||||
the current generation of the active profile, from which the store
|
the current generation of the active profile, from which the store
|
||||||
paths designated by the symbolic names
|
paths designated by the symbolic names
|
||||||
<replaceable>names</replaceable> are removed.</para>
|
<emphasis>names</emphasis> are removed.</para>
|
||||||
|
|
||||||
</refsection>
|
</refsection>
|
||||||
|
|
||||||
|
@ -745,7 +745,7 @@ $ nix-env -e '.*' <lineannotation>(remove everything)</lineannotation></screen>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>nix-env</command>
|
<command>nix-env</command>
|
||||||
<arg choice='plain'><option>--set</option></arg>
|
<arg choice='plain'><option>--set</option></arg>
|
||||||
<arg choice='plain'><replaceable>drvname</replaceable></arg>
|
<arg choice='plain'><emphasis>drvname</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsection>
|
</refsection>
|
||||||
|
|
||||||
|
@ -783,9 +783,9 @@ $ nix-env -p /nix/var/nix/profiles/browser --set firefox</screen>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>nix-env</command>
|
<command>nix-env</command>
|
||||||
<arg choice='plain'><option>--set-flag</option></arg>
|
<arg choice='plain'><option>--set-flag</option></arg>
|
||||||
<arg choice='plain'><replaceable>name</replaceable></arg>
|
<arg choice='plain'><emphasis>name</emphasis></arg>
|
||||||
<arg choice='plain'><replaceable>value</replaceable></arg>
|
<arg choice='plain'><emphasis>value</emphasis></arg>
|
||||||
<arg choice='plain' rep='repeat'><replaceable>drvnames</replaceable></arg>
|
<arg choice='plain' rep='repeat'><emphasis>drvnames</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsection>
|
</refsection>
|
||||||
|
|
||||||
|
@ -848,8 +848,8 @@ firefox-2.0.0.9 <lineannotation>(the current one)</lineannotation>
|
||||||
$ nix-env --preserve-installed -i firefox-2.0.0.11
|
$ nix-env --preserve-installed -i firefox-2.0.0.11
|
||||||
installing `firefox-2.0.0.11'
|
installing `firefox-2.0.0.11'
|
||||||
building path(s) `/nix/store/myy0y59q3ig70dgq37jqwg1j0rsapzsl-user-environment'
|
building path(s) `/nix/store/myy0y59q3ig70dgq37jqwg1j0rsapzsl-user-environment'
|
||||||
collision between `/nix/store/<replaceable>...</replaceable>-firefox-2.0.0.11/bin/firefox'
|
collision between `/nix/store/<emphasis>...</emphasis>-firefox-2.0.0.11/bin/firefox'
|
||||||
and `/nix/store/<replaceable>...</replaceable>-firefox-2.0.0.9/bin/firefox'.
|
and `/nix/store/<emphasis>...</emphasis>-firefox-2.0.0.9/bin/firefox'.
|
||||||
<lineannotation>(i.e., can’t have two active at the same time)</lineannotation>
|
<lineannotation>(i.e., can’t have two active at the same time)</lineannotation>
|
||||||
|
|
||||||
$ nix-env --set-flag active false firefox
|
$ nix-env --set-flag active false firefox
|
||||||
|
@ -940,12 +940,12 @@ $ nix-env --set-flag priority 10 gcc</screen>
|
||||||
<arg choice='plain'><option>--attr</option></arg>
|
<arg choice='plain'><option>--attr</option></arg>
|
||||||
<arg choice='plain'><option>-A</option></arg>
|
<arg choice='plain'><option>-A</option></arg>
|
||||||
</group>
|
</group>
|
||||||
<replaceable>attribute-path</replaceable>
|
<emphasis>attribute-path</emphasis>
|
||||||
</arg>
|
</arg>
|
||||||
|
|
||||||
<sbr />
|
<sbr />
|
||||||
|
|
||||||
<arg choice='plain' rep='repeat'><replaceable>names</replaceable></arg>
|
<arg choice='plain' rep='repeat'><emphasis>names</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
|
|
||||||
</refsection>
|
</refsection>
|
||||||
|
@ -959,7 +959,7 @@ profile (<option>--installed</option>), or the derivations that are
|
||||||
available for installation in the active Nix expression
|
available for installation in the active Nix expression
|
||||||
(<option>--available</option>). It only prints information about
|
(<option>--available</option>). It only prints information about
|
||||||
derivations whose symbolic name matches one of
|
derivations whose symbolic name matches one of
|
||||||
<replaceable>names</replaceable>.</para>
|
<emphasis>names</emphasis>.</para>
|
||||||
|
|
||||||
<para>The derivations are sorted by their <literal>name</literal>
|
<para>The derivations are sorted by their <literal>name</literal>
|
||||||
attributes.</para>
|
attributes.</para>
|
||||||
|
@ -1086,21 +1086,21 @@ user environment elements, etc. -->
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
|
||||||
<varlistentry><term><literal><</literal> <replaceable>version</replaceable></term>
|
<varlistentry><term><literal><</literal> <emphasis>version</emphasis></term>
|
||||||
|
|
||||||
<listitem><para>A newer version of the package is available
|
<listitem><para>A newer version of the package is available
|
||||||
or installed.</para></listitem>
|
or installed.</para></listitem>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry><term><literal>=</literal> <replaceable>version</replaceable></term>
|
<varlistentry><term><literal>=</literal> <emphasis>version</emphasis></term>
|
||||||
|
|
||||||
<listitem><para>At most the same version of the package is
|
<listitem><para>At most the same version of the package is
|
||||||
available or installed.</para></listitem>
|
available or installed.</para></listitem>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry><term><literal>></literal> <replaceable>version</replaceable></term>
|
<varlistentry><term><literal>></literal> <emphasis>version</emphasis></term>
|
||||||
|
|
||||||
<listitem><para>Only older versions of the package are
|
<listitem><para>Only older versions of the package are
|
||||||
available or installed.</para></listitem>
|
available or installed.</para></listitem>
|
||||||
|
@ -1174,7 +1174,7 @@ docbook-xml-4.2
|
||||||
firefox-1.0.4
|
firefox-1.0.4
|
||||||
MPlayer-1.0pre7
|
MPlayer-1.0pre7
|
||||||
ORBit2-2.8.3
|
ORBit2-2.8.3
|
||||||
<replaceable>…</replaceable>
|
<emphasis>…</emphasis>
|
||||||
</screen>
|
</screen>
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
@ -1187,7 +1187,7 @@ firefox-1.0.7
|
||||||
GConf-2.4.0.1
|
GConf-2.4.0.1
|
||||||
MPlayer-1.0pre7
|
MPlayer-1.0pre7
|
||||||
ORBit2-2.8.3
|
ORBit2-2.8.3
|
||||||
<replaceable>…</replaceable>
|
<emphasis>…</emphasis>
|
||||||
</screen>
|
</screen>
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
@ -1200,7 +1200,7 @@ $ nix-env -qas
|
||||||
--S GConf-2.4.0.1 <lineannotation>(not present, but there is a substitute for fast installation)</lineannotation>
|
--S GConf-2.4.0.1 <lineannotation>(not present, but there is a substitute for fast installation)</lineannotation>
|
||||||
--S MPlayer-1.0pre3 <lineannotation>(i.e., this is not the installed MPlayer, even though the version is the same!)</lineannotation>
|
--S MPlayer-1.0pre3 <lineannotation>(i.e., this is not the installed MPlayer, even though the version is the same!)</lineannotation>
|
||||||
IP- ORBit2-2.8.3 <lineannotation>(installed and by definition present)</lineannotation>
|
IP- ORBit2-2.8.3 <lineannotation>(installed and by definition present)</lineannotation>
|
||||||
<replaceable>…</replaceable>
|
<emphasis>…</emphasis>
|
||||||
</screen>
|
</screen>
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
@ -1218,11 +1218,11 @@ foo-1.2.3
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
$ nix-env -qc
|
$ nix-env -qc
|
||||||
<replaceable>...</replaceable>
|
<emphasis>...</emphasis>
|
||||||
acrobat-reader-7.0 - ? <lineannotation>(package is not available at all)</lineannotation>
|
acrobat-reader-7.0 - ? <lineannotation>(package is not available at all)</lineannotation>
|
||||||
autoconf-2.59 = 2.59 <lineannotation>(same version)</lineannotation>
|
autoconf-2.59 = 2.59 <lineannotation>(same version)</lineannotation>
|
||||||
firefox-1.0.4 < 1.0.7 <lineannotation>(a more recent version is available)</lineannotation>
|
firefox-1.0.4 < 1.0.7 <lineannotation>(a more recent version is available)</lineannotation>
|
||||||
<replaceable>...</replaceable>
|
<emphasis>...</emphasis>
|
||||||
</screen>
|
</screen>
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
@ -1234,7 +1234,7 @@ $ nix-env -qa '.*zip.*'
|
||||||
bzip2-1.0.6
|
bzip2-1.0.6
|
||||||
gzip-1.6
|
gzip-1.6
|
||||||
zip-3.0
|
zip-3.0
|
||||||
<replaceable>…</replaceable>
|
<emphasis>…</emphasis>
|
||||||
</screen>
|
</screen>
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
@ -1248,7 +1248,7 @@ chromium-37.0.2062.94
|
||||||
chromium-beta-38.0.2125.24
|
chromium-beta-38.0.2125.24
|
||||||
firefox-32.0.3
|
firefox-32.0.3
|
||||||
firefox-with-plugins-13.0.1
|
firefox-with-plugins-13.0.1
|
||||||
<replaceable>…</replaceable>
|
<emphasis>…</emphasis>
|
||||||
</screen>
|
</screen>
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
@ -1280,7 +1280,7 @@ $ nix-env -f https://github.com/NixOS/nixpkgs/archive/master.tar.gz -qa
|
||||||
<arg choice='plain'><option>--switch-profile</option></arg>
|
<arg choice='plain'><option>--switch-profile</option></arg>
|
||||||
<arg choice='plain'><option>-S</option></arg>
|
<arg choice='plain'><option>-S</option></arg>
|
||||||
</group>
|
</group>
|
||||||
<arg choice='req'><replaceable>path</replaceable></arg>
|
<arg choice='req'><emphasis>path</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
|
|
||||||
</refsection>
|
</refsection>
|
||||||
|
@ -1288,10 +1288,10 @@ $ nix-env -f https://github.com/NixOS/nixpkgs/archive/master.tar.gz -qa
|
||||||
|
|
||||||
<refsection><title>Description</title>
|
<refsection><title>Description</title>
|
||||||
|
|
||||||
<para>This operation makes <replaceable>path</replaceable> the current
|
<para>This operation makes <emphasis>path</emphasis> the current
|
||||||
profile for the user. That is, the symlink
|
profile for the user. That is, the symlink
|
||||||
<filename>~/.nix-profile</filename> is made to point to
|
<filename>~/.nix-profile</filename> is made to point to
|
||||||
<replaceable>path</replaceable>.</para>
|
<emphasis>path</emphasis>.</para>
|
||||||
|
|
||||||
</refsection>
|
</refsection>
|
||||||
|
|
||||||
|
@ -1355,7 +1355,7 @@ $ nix-env --list-generations
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>nix-env</command>
|
<command>nix-env</command>
|
||||||
<arg choice='plain'><option>--delete-generations</option></arg>
|
<arg choice='plain'><option>--delete-generations</option></arg>
|
||||||
<arg choice='plain' rep='repeat'><replaceable>generations</replaceable></arg>
|
<arg choice='plain' rep='repeat'><emphasis>generations</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
|
|
||||||
</refsection>
|
</refsection>
|
||||||
|
@ -1407,7 +1407,7 @@ $ nix-env -p other_profile --delete-generations old</screen>
|
||||||
<arg choice='plain'><option>--switch-generation</option></arg>
|
<arg choice='plain'><option>--switch-generation</option></arg>
|
||||||
<arg choice='plain'><option>-G</option></arg>
|
<arg choice='plain'><option>-G</option></arg>
|
||||||
</group>
|
</group>
|
||||||
<arg choice='req'><replaceable>generation</replaceable></arg>
|
<arg choice='req'><emphasis>generation</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
|
|
||||||
</refsection>
|
</refsection>
|
||||||
|
@ -1416,13 +1416,13 @@ $ nix-env -p other_profile --delete-generations old</screen>
|
||||||
<refsection><title>Description</title>
|
<refsection><title>Description</title>
|
||||||
|
|
||||||
<para>This operation makes generation number
|
<para>This operation makes generation number
|
||||||
<replaceable>generation</replaceable> the current generation of the
|
<emphasis>generation</emphasis> the current generation of the
|
||||||
active profile. That is, if the
|
active profile. That is, if the
|
||||||
<filename><replaceable>profile</replaceable></filename> is the path to
|
<filename><emphasis>profile</emphasis></filename> is the path to
|
||||||
the active profile, then the symlink
|
the active profile, then the symlink
|
||||||
<filename><replaceable>profile</replaceable></filename> is made to
|
<filename><emphasis>profile</emphasis></filename> is made to
|
||||||
point to
|
point to
|
||||||
<filename><replaceable>profile</replaceable>-<replaceable>generation</replaceable>-link</filename>,
|
<filename><emphasis>profile</emphasis>-<emphasis>generation</emphasis>-link</filename>,
|
||||||
which is in turn a symlink to the actual user environment in the Nix
|
which is in turn a symlink to the actual user environment in the Nix
|
||||||
store.</para>
|
store.</para>
|
||||||
|
|
||||||
|
|
|
@ -22,18 +22,18 @@
|
||||||
<arg><option>--flat</option></arg>
|
<arg><option>--flat</option></arg>
|
||||||
<arg><option>--base32</option></arg>
|
<arg><option>--base32</option></arg>
|
||||||
<arg><option>--truncate</option></arg>
|
<arg><option>--truncate</option></arg>
|
||||||
<arg><option>--type</option> <replaceable>hashAlgo</replaceable></arg>
|
<arg><option>--type</option> <emphasis>hashAlgo</emphasis></arg>
|
||||||
<arg choice='plain' rep='repeat'><replaceable>path</replaceable></arg>
|
<arg choice='plain' rep='repeat'><emphasis>path</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>nix-hash</command>
|
<command>nix-hash</command>
|
||||||
<arg choice='plain'><option>--to-base16</option></arg>
|
<arg choice='plain'><option>--to-base16</option></arg>
|
||||||
<arg choice='plain' rep='repeat'><replaceable>hash</replaceable></arg>
|
<arg choice='plain' rep='repeat'><emphasis>hash</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>nix-hash</command>
|
<command>nix-hash</command>
|
||||||
<arg choice='plain'><option>--to-base32</option></arg>
|
<arg choice='plain'><option>--to-base32</option></arg>
|
||||||
<arg choice='plain' rep='repeat'><replaceable>hash</replaceable></arg>
|
<arg choice='plain' rep='repeat'><emphasis>hash</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
<para>The command <command>nix-hash</command> computes the
|
<para>The command <command>nix-hash</command> computes the
|
||||||
cryptographic hash of the contents of each
|
cryptographic hash of the contents of each
|
||||||
<replaceable>path</replaceable> and prints it on standard output. By
|
<emphasis>path</emphasis> and prints it on standard output. By
|
||||||
default, it computes an MD5 hash, but other hash algorithms are
|
default, it computes an MD5 hash, but other hash algorithms are
|
||||||
available as well. The hash is printed in hexadecimal. To generate
|
available as well. The hash is printed in hexadecimal. To generate
|
||||||
the same hash as <command>nix-prefetch-url</command> you have to
|
the same hash as <command>nix-prefetch-url</command> you have to
|
||||||
|
@ -54,9 +54,9 @@ allows directories and symlinks to be hashed as well as regular files.
|
||||||
The dump is in the <emphasis>NAR format</emphasis> produced by <link
|
The dump is in the <emphasis>NAR format</emphasis> produced by <link
|
||||||
linkend="refsec-nix-store-dump"><command>nix-store</command>
|
linkend="refsec-nix-store-dump"><command>nix-store</command>
|
||||||
<option>--dump</option></link>. Thus, <literal>nix-hash
|
<option>--dump</option></link>. Thus, <literal>nix-hash
|
||||||
<replaceable>path</replaceable></literal> yields the same
|
<emphasis>path</emphasis></literal> yields the same
|
||||||
cryptographic hash as <literal>nix-store --dump
|
cryptographic hash as <literal>nix-store --dump
|
||||||
<replaceable>path</replaceable> | md5sum</literal>.</para>
|
<emphasis>path</emphasis> | md5sum</literal>.</para>
|
||||||
|
|
||||||
</refsection>
|
</refsection>
|
||||||
|
|
||||||
|
@ -68,9 +68,9 @@ cryptographic hash as <literal>nix-store --dump
|
||||||
<varlistentry><term><option>--flat</option></term>
|
<varlistentry><term><option>--flat</option></term>
|
||||||
|
|
||||||
<listitem><para>Print the cryptographic hash of the contents of
|
<listitem><para>Print the cryptographic hash of the contents of
|
||||||
each regular file <replaceable>path</replaceable>. That is, do
|
each regular file <emphasis>path</emphasis>. That is, do
|
||||||
not compute the hash over the dump of
|
not compute the hash over the dump of
|
||||||
<replaceable>path</replaceable>. The result is identical to that
|
<emphasis>path</emphasis>. The result is identical to that
|
||||||
produced by the GNU commands <command>md5sum</command> and
|
produced by the GNU commands <command>md5sum</command> and
|
||||||
<command>sha1sum</command>.</para></listitem>
|
<command>sha1sum</command>.</para></listitem>
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ cryptographic hash as <literal>nix-store --dump
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry><term><option>--type</option> <replaceable>hashAlgo</replaceable></term>
|
<varlistentry><term><option>--type</option> <emphasis>hashAlgo</emphasis></term>
|
||||||
|
|
||||||
<listitem><para>Use the specified cryptographic hash algorithm,
|
<listitem><para>Use the specified cryptographic hash algorithm,
|
||||||
which can be one of <literal>md5</literal>,
|
which can be one of <literal>md5</literal>,
|
||||||
|
@ -104,7 +104,7 @@ cryptographic hash as <literal>nix-store --dump
|
||||||
<varlistentry><term><option>--to-base16</option></term>
|
<varlistentry><term><option>--to-base16</option></term>
|
||||||
|
|
||||||
<listitem><para>Don’t hash anything, but convert the base-32 hash
|
<listitem><para>Don’t hash anything, but convert the base-32 hash
|
||||||
representation <replaceable>hash</replaceable> to
|
representation <emphasis>hash</emphasis> to
|
||||||
hexadecimal.</para></listitem>
|
hexadecimal.</para></listitem>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
@ -112,7 +112,7 @@ cryptographic hash as <literal>nix-store --dump
|
||||||
<varlistentry><term><option>--to-base32</option></term>
|
<varlistentry><term><option>--to-base32</option></term>
|
||||||
|
|
||||||
<listitem><para>Don’t hash anything, but convert the hexadecimal
|
<listitem><para>Don’t hash anything, but convert the hexadecimal
|
||||||
hash representation <replaceable>hash</replaceable> to
|
hash representation <emphasis>hash</emphasis> to
|
||||||
base-32.</para></listitem>
|
base-32.</para></listitem>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
|
@ -29,26 +29,26 @@
|
||||||
</arg>
|
</arg>
|
||||||
</group>
|
</group>
|
||||||
<arg><option>--read-write-mode</option></arg>
|
<arg><option>--read-write-mode</option></arg>
|
||||||
<arg><option>--arg</option> <replaceable>name</replaceable> <replaceable>value</replaceable></arg>
|
<arg><option>--arg</option> <emphasis>name</emphasis> <emphasis>value</emphasis></arg>
|
||||||
<arg>
|
<arg>
|
||||||
<group choice='req'>
|
<group choice='req'>
|
||||||
<arg choice='plain'><option>--attr</option></arg>
|
<arg choice='plain'><option>--attr</option></arg>
|
||||||
<arg choice='plain'><option>-A</option></arg>
|
<arg choice='plain'><option>-A</option></arg>
|
||||||
</group>
|
</group>
|
||||||
<replaceable>attrPath</replaceable>
|
<emphasis>attrPath</emphasis>
|
||||||
</arg>
|
</arg>
|
||||||
<arg><option>--add-root</option> <replaceable>path</replaceable></arg>
|
<arg><option>--add-root</option> <emphasis>path</emphasis></arg>
|
||||||
<arg><option>--indirect</option></arg>
|
<arg><option>--indirect</option></arg>
|
||||||
<group>
|
<group>
|
||||||
<arg choice='plain'><option>--expr</option></arg>
|
<arg choice='plain'><option>--expr</option></arg>
|
||||||
<arg choice='plain'><option>-E</option></arg>
|
<arg choice='plain'><option>-E</option></arg>
|
||||||
</group>
|
</group>
|
||||||
<arg choice='plain' rep='repeat'><replaceable>files</replaceable></arg>
|
<arg choice='plain' rep='repeat'><emphasis>files</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>nix-instantiate</command>
|
<command>nix-instantiate</command>
|
||||||
<arg choice='plain'><option>--find-file</option></arg>
|
<arg choice='plain'><option>--find-file</option></arg>
|
||||||
<arg choice='plain' rep='repeat'><replaceable>files</replaceable></arg>
|
<arg choice='plain' rep='repeat'><emphasis>files</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
|
@ -58,13 +58,13 @@
|
||||||
<para>The command <command>nix-instantiate</command> generates <link
|
<para>The command <command>nix-instantiate</command> generates <link
|
||||||
linkend="gloss-derivation">store derivations</link> from (high-level)
|
linkend="gloss-derivation">store derivations</link> from (high-level)
|
||||||
Nix expressions. It evaluates the Nix expressions in each of
|
Nix expressions. It evaluates the Nix expressions in each of
|
||||||
<replaceable>files</replaceable> (which defaults to
|
<emphasis>files</emphasis> (which defaults to
|
||||||
<replaceable>./default.nix</replaceable>). Each top-level expression
|
<emphasis>./default.nix</emphasis>). Each top-level expression
|
||||||
should evaluate to a derivation, a list of derivations, or a set of
|
should evaluate to a derivation, a list of derivations, or a set of
|
||||||
derivations. The paths of the resulting store derivations are printed
|
derivations. The paths of the resulting store derivations are printed
|
||||||
on standard output.</para>
|
on standard output.</para>
|
||||||
|
|
||||||
<para>If <replaceable>files</replaceable> is the character
|
<para>If <emphasis>files</emphasis> is the character
|
||||||
<literal>-</literal>, then a Nix expression will be read from standard
|
<literal>-</literal>, then a Nix expression will be read from standard
|
||||||
input.</para>
|
input.</para>
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ input.</para>
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--add-root</option> <replaceable>path</replaceable></term>
|
<term><option>--add-root</option> <emphasis>path</emphasis></term>
|
||||||
<term><option>--indirect</option></term>
|
<term><option>--indirect</option></term>
|
||||||
|
|
||||||
<listitem><para>See the <link linkend="opt-add-root">corresponding
|
<listitem><para>See the <link linkend="opt-add-root">corresponding
|
||||||
|
@ -181,7 +181,7 @@ $ nix-instantiate test.nix <lineannotation>(instantiate)</lineannotation>
|
||||||
/nix/store/cigxbmvy6dzix98dxxh9b6shg7ar5bvs-perl-BerkeleyDB-0.26.drv
|
/nix/store/cigxbmvy6dzix98dxxh9b6shg7ar5bvs-perl-BerkeleyDB-0.26.drv
|
||||||
|
|
||||||
$ nix-store -r $(nix-instantiate test.nix) <lineannotation>(build)</lineannotation>
|
$ nix-store -r $(nix-instantiate test.nix) <lineannotation>(build)</lineannotation>
|
||||||
<replaceable>...</replaceable>
|
<emphasis>...</emphasis>
|
||||||
/nix/store/qhqk4n8ci095g3sdp93x7rgwyh9rdvgk-perl-BerkeleyDB-0.26 <lineannotation>(output path)</lineannotation>
|
/nix/store/qhqk4n8ci095g3sdp93x7rgwyh9rdvgk-perl-BerkeleyDB-0.26 <lineannotation>(output path)</lineannotation>
|
||||||
|
|
||||||
$ ls -l /nix/store/qhqk4n8ci095g3sdp93x7rgwyh9rdvgk-perl-BerkeleyDB-0.26
|
$ ls -l /nix/store/qhqk4n8ci095g3sdp93x7rgwyh9rdvgk-perl-BerkeleyDB-0.26
|
||||||
|
@ -226,28 +226,28 @@ $ nix-instantiate --eval --xml -E '1 + 2'
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
$ nix-instantiate --eval --xml -E 'rec { x = "foo"; y = x; }'
|
$ nix-instantiate --eval --xml -E 'rec { x = "foo"; y = x; }'
|
||||||
<replaceable>...</replaceable><![CDATA[
|
<emphasis>...</emphasis><![CDATA[
|
||||||
<attr name="x">
|
<attr name="x">
|
||||||
<string value="foo" />
|
<string value="foo" />
|
||||||
</attr>
|
</attr>
|
||||||
<attr name="y">
|
<attr name="y">
|
||||||
<unevaluated />
|
<unevaluated />
|
||||||
</attr>]]>
|
</attr>]]>
|
||||||
<replaceable>...</replaceable></screen>
|
<emphasis>...</emphasis></screen>
|
||||||
|
|
||||||
Note that <varname>y</varname> is left unevaluated (the XML
|
Note that <varname>y</varname> is left unevaluated (the XML
|
||||||
representation doesn’t attempt to show non-normal forms).
|
representation doesn’t attempt to show non-normal forms).
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
$ nix-instantiate --eval --xml --strict -E 'rec { x = "foo"; y = x; }'
|
$ nix-instantiate --eval --xml --strict -E 'rec { x = "foo"; y = x; }'
|
||||||
<replaceable>...</replaceable><![CDATA[
|
<emphasis>...</emphasis><![CDATA[
|
||||||
<attr name="x">
|
<attr name="x">
|
||||||
<string value="foo" />
|
<string value="foo" />
|
||||||
</attr>
|
</attr>
|
||||||
<attr name="y">
|
<attr name="y">
|
||||||
<string value="foo" />
|
<string value="foo" />
|
||||||
</attr>]]>
|
</attr>]]>
|
||||||
<replaceable>...</replaceable></screen>
|
<emphasis>...</emphasis></screen>
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
|
@ -20,24 +20,24 @@
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>nix-prefetch-url</command>
|
<command>nix-prefetch-url</command>
|
||||||
<arg><option>--version</option></arg>
|
<arg><option>--version</option></arg>
|
||||||
<arg><option>--type</option> <replaceable>hashAlgo</replaceable></arg>
|
<arg><option>--type</option> <emphasis>hashAlgo</emphasis></arg>
|
||||||
<arg><option>--print-path</option></arg>
|
<arg><option>--print-path</option></arg>
|
||||||
<arg><option>--unpack</option></arg>
|
<arg><option>--unpack</option></arg>
|
||||||
<arg><option>--name</option> <replaceable>name</replaceable></arg>
|
<arg><option>--name</option> <emphasis>name</emphasis></arg>
|
||||||
<arg choice='plain'><replaceable>url</replaceable></arg>
|
<arg choice='plain'><emphasis>url</emphasis></arg>
|
||||||
<arg><replaceable>hash</replaceable></arg>
|
<arg><emphasis>hash</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsection><title>Description</title>
|
<refsection><title>Description</title>
|
||||||
|
|
||||||
<para>The command <command>nix-prefetch-url</command> downloads the
|
<para>The command <command>nix-prefetch-url</command> downloads the
|
||||||
file referenced by the URL <replaceable>url</replaceable>, prints its
|
file referenced by the URL <emphasis>url</emphasis>, prints its
|
||||||
cryptographic hash, and copies it into the Nix store. The file name
|
cryptographic hash, and copies it into the Nix store. The file name
|
||||||
in the store is
|
in the store is
|
||||||
<filename><replaceable>hash</replaceable>-<replaceable>baseName</replaceable></filename>,
|
<filename><emphasis>hash</emphasis>-<emphasis>baseName</emphasis></filename>,
|
||||||
where <replaceable>baseName</replaceable> is everything following the
|
where <emphasis>baseName</emphasis> is everything following the
|
||||||
final slash in <replaceable>url</replaceable>.</para>
|
final slash in <emphasis>url</emphasis>.</para>
|
||||||
|
|
||||||
<para>This command is just a convenience for Nix expression writers.
|
<para>This command is just a convenience for Nix expression writers.
|
||||||
Often a Nix expression fetches some source distribution from the
|
Often a Nix expression fetches some source distribution from the
|
||||||
|
@ -50,7 +50,7 @@ download it again when you build your Nix expression. Since
|
||||||
as <command>nix-prefetch-url</command>, the redundant download can be
|
as <command>nix-prefetch-url</command>, the redundant download can be
|
||||||
avoided.</para>
|
avoided.</para>
|
||||||
|
|
||||||
<para>If <replaceable>hash</replaceable> is specified, then a download
|
<para>If <emphasis>hash</emphasis> is specified, then a download
|
||||||
is not performed if the Nix store already contains a file with the
|
is not performed if the Nix store already contains a file with the
|
||||||
same hash and base name. Otherwise, the file is downloaded, and an
|
same hash and base name. Otherwise, the file is downloaded, and an
|
||||||
error is signaled if the actual hash of the file does not match the
|
error is signaled if the actual hash of the file does not match the
|
||||||
|
@ -67,7 +67,7 @@ downloaded file in the Nix store is also printed.</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
|
||||||
<varlistentry><term><option>--type</option> <replaceable>hashAlgo</replaceable></term>
|
<varlistentry><term><option>--type</option> <emphasis>hashAlgo</emphasis></term>
|
||||||
|
|
||||||
<listitem><para>Use the specified cryptographic hash algorithm,
|
<listitem><para>Use the specified cryptographic hash algorithm,
|
||||||
which can be one of <literal>md5</literal>,
|
which can be one of <literal>md5</literal>,
|
||||||
|
@ -93,14 +93,14 @@ downloaded file in the Nix store is also printed.</para>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry><term><option>--name</option> <replaceable>name</replaceable></term>
|
<varlistentry><term><option>--name</option> <emphasis>name</emphasis></term>
|
||||||
|
|
||||||
<listitem><para>Override the name of the file in the Nix store. By
|
<listitem><para>Override the name of the file in the Nix store. By
|
||||||
default, this is
|
default, this is
|
||||||
<literal><replaceable>hash</replaceable>-<replaceable>basename</replaceable></literal>,
|
<literal><emphasis>hash</emphasis>-<emphasis>basename</emphasis></literal>,
|
||||||
where <replaceable>basename</replaceable> is the last component of
|
where <emphasis>basename</emphasis> is the last component of
|
||||||
<replaceable>url</replaceable>. Overriding the name is necessary
|
<emphasis>url</emphasis>. Overriding the name is necessary
|
||||||
when <replaceable>basename</replaceable> contains characters that
|
when <emphasis>basename</emphasis> contains characters that
|
||||||
are not allowed in Nix store paths.</para></listitem>
|
are not allowed in Nix store paths.</para></listitem>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
|
@ -19,20 +19,20 @@
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>nix-shell</command>
|
<command>nix-shell</command>
|
||||||
<arg><option>--arg</option> <replaceable>name</replaceable> <replaceable>value</replaceable></arg>
|
<arg><option>--arg</option> <emphasis>name</emphasis> <emphasis>value</emphasis></arg>
|
||||||
<arg><option>--argstr</option> <replaceable>name</replaceable> <replaceable>value</replaceable></arg>
|
<arg><option>--argstr</option> <emphasis>name</emphasis> <emphasis>value</emphasis></arg>
|
||||||
<arg>
|
<arg>
|
||||||
<group choice='req'>
|
<group choice='req'>
|
||||||
<arg choice='plain'><option>--attr</option></arg>
|
<arg choice='plain'><option>--attr</option></arg>
|
||||||
<arg choice='plain'><option>-A</option></arg>
|
<arg choice='plain'><option>-A</option></arg>
|
||||||
</group>
|
</group>
|
||||||
<replaceable>attrPath</replaceable>
|
<emphasis>attrPath</emphasis>
|
||||||
</arg>
|
</arg>
|
||||||
<arg><option>--command</option> <replaceable>cmd</replaceable></arg>
|
<arg><option>--command</option> <emphasis>cmd</emphasis></arg>
|
||||||
<arg><option>--run</option> <replaceable>cmd</replaceable></arg>
|
<arg><option>--run</option> <emphasis>cmd</emphasis></arg>
|
||||||
<arg><option>--exclude</option> <replaceable>regexp</replaceable></arg>
|
<arg><option>--exclude</option> <emphasis>regexp</emphasis></arg>
|
||||||
<arg><option>--pure</option></arg>
|
<arg><option>--pure</option></arg>
|
||||||
<arg><option>--keep</option> <replaceable>name</replaceable></arg>
|
<arg><option>--keep</option> <emphasis>name</emphasis></arg>
|
||||||
<group choice='req'>
|
<group choice='req'>
|
||||||
<arg choice='plain'>
|
<arg choice='plain'>
|
||||||
<group choice='req'>
|
<group choice='req'>
|
||||||
|
@ -41,12 +41,12 @@
|
||||||
</group>
|
</group>
|
||||||
<arg choice='plain' rep='repeat'>
|
<arg choice='plain' rep='repeat'>
|
||||||
<group choice='req'>
|
<group choice='req'>
|
||||||
<arg choice="plain"><replaceable>packages</replaceable></arg>
|
<arg choice="plain"><emphasis>packages</emphasis></arg>
|
||||||
<arg choice="plain"><replaceable>expressions</replaceable></arg>
|
<arg choice="plain"><emphasis>expressions</emphasis></arg>
|
||||||
</group>
|
</group>
|
||||||
</arg>
|
</arg>
|
||||||
</arg>
|
</arg>
|
||||||
<arg><replaceable>path</replaceable></arg>
|
<arg><emphasis>path</emphasis></arg>
|
||||||
</group>
|
</group>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
@ -57,17 +57,17 @@
|
||||||
dependencies of the specified derivation, but not the derivation
|
dependencies of the specified derivation, but not the derivation
|
||||||
itself. It will then start an interactive shell in which all
|
itself. It will then start an interactive shell in which all
|
||||||
environment variables defined by the derivation
|
environment variables defined by the derivation
|
||||||
<replaceable>path</replaceable> have been set to their corresponding
|
<emphasis>path</emphasis> have been set to their corresponding
|
||||||
values, and the script <literal>$stdenv/setup</literal> has been
|
values, and the script <literal>$stdenv/setup</literal> has been
|
||||||
sourced. This is useful for reproducing the environment of a
|
sourced. This is useful for reproducing the environment of a
|
||||||
derivation for development.</para>
|
derivation for development.</para>
|
||||||
|
|
||||||
<para>If <replaceable>path</replaceable> is not given,
|
<para>If <emphasis>path</emphasis> is not given,
|
||||||
<command>nix-shell</command> defaults to
|
<command>nix-shell</command> defaults to
|
||||||
<filename>shell.nix</filename> if it exists, and
|
<filename>shell.nix</filename> if it exists, and
|
||||||
<filename>default.nix</filename> otherwise.</para>
|
<filename>default.nix</filename> otherwise.</para>
|
||||||
|
|
||||||
<para>If <replaceable>path</replaceable> starts with
|
<para>If <emphasis>path</emphasis> starts with
|
||||||
<literal>http://</literal> or <literal>https://</literal>, it is
|
<literal>http://</literal> or <literal>https://</literal>, it is
|
||||||
interpreted as the URL of a tarball that will be downloaded and
|
interpreted as the URL of a tarball that will be downloaded and
|
||||||
unpacked to a temporary location. The tarball must include a single
|
unpacked to a temporary location. The tarball must include a single
|
||||||
|
@ -103,10 +103,10 @@ also <xref linkend="sec-common-options" />.</phrase></para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
|
||||||
<varlistentry><term><option>--command</option> <replaceable>cmd</replaceable></term>
|
<varlistentry><term><option>--command</option> <emphasis>cmd</emphasis></term>
|
||||||
|
|
||||||
<listitem><para>In the environment of the derivation, run the
|
<listitem><para>In the environment of the derivation, run the
|
||||||
shell command <replaceable>cmd</replaceable>. This command is
|
shell command <emphasis>cmd</emphasis>. This command is
|
||||||
executed in an interactive shell. (Use <option>--run</option> to
|
executed in an interactive shell. (Use <option>--run</option> to
|
||||||
use a non-interactive shell instead.) However, a call to
|
use a non-interactive shell instead.) However, a call to
|
||||||
<literal>exit</literal> is implicitly added to the command, so the
|
<literal>exit</literal> is implicitly added to the command, so the
|
||||||
|
@ -118,7 +118,7 @@ also <xref linkend="sec-common-options" />.</phrase></para>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry><term><option>--run</option> <replaceable>cmd</replaceable></term>
|
<varlistentry><term><option>--run</option> <emphasis>cmd</emphasis></term>
|
||||||
|
|
||||||
<listitem><para>Like <option>--command</option>, but executes the
|
<listitem><para>Like <option>--command</option>, but executes the
|
||||||
command in a non-interactive shell. This means (among other
|
command in a non-interactive shell. This means (among other
|
||||||
|
@ -127,10 +127,10 @@ also <xref linkend="sec-common-options" />.</phrase></para>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry><term><option>--exclude</option> <replaceable>regexp</replaceable></term>
|
<varlistentry><term><option>--exclude</option> <emphasis>regexp</emphasis></term>
|
||||||
|
|
||||||
<listitem><para>Do not build any dependencies whose store path
|
<listitem><para>Do not build any dependencies whose store path
|
||||||
matches the regular expression <replaceable>regexp</replaceable>.
|
matches the regular expression <emphasis>regexp</emphasis>.
|
||||||
This option may be specified multiple times.</para></listitem>
|
This option may be specified multiple times.</para></listitem>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
@ -150,7 +150,7 @@ also <xref linkend="sec-common-options" />.</phrase></para>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry><term><option>--packages</option> / <option>-p</option> <replaceable>packages</replaceable>…</term>
|
<varlistentry><term><option>--packages</option> / <option>-p</option> <emphasis>packages</emphasis>…</term>
|
||||||
|
|
||||||
<listitem><para>Set up an environment in which the specified
|
<listitem><para>Set up an environment in which the specified
|
||||||
packages are present. The command line arguments are interpreted
|
packages are present. The command line arguments are interpreted
|
||||||
|
@ -162,7 +162,7 @@ also <xref linkend="sec-common-options" />.</phrase></para>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry><term><option>-i</option> <replaceable>interpreter</replaceable></term>
|
<varlistentry><term><option>-i</option> <emphasis>interpreter</emphasis></term>
|
||||||
|
|
||||||
<listitem><para>The chained script interpreter to be invoked by
|
<listitem><para>The chained script interpreter to be invoked by
|
||||||
<command>nix-shell</command>. Only applicable in
|
<command>nix-shell</command>. Only applicable in
|
||||||
|
@ -171,7 +171,7 @@ also <xref linkend="sec-common-options" />.</phrase></para>
|
||||||
|
|
||||||
</listitem></varlistentry>
|
</listitem></varlistentry>
|
||||||
|
|
||||||
<varlistentry><term><option>--keep</option> <replaceable>name</replaceable></term>
|
<varlistentry><term><option>--keep</option> <emphasis>name</emphasis></term>
|
||||||
|
|
||||||
<listitem><para>When a <option>--pure</option> shell is started,
|
<listitem><para>When a <option>--pure</option> shell is started,
|
||||||
keep the listed environment variables.</para></listitem>
|
keep the listed environment variables.</para></listitem>
|
||||||
|
@ -278,13 +278,13 @@ following lines:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
#! /usr/bin/env nix-shell
|
#! /usr/bin/env nix-shell
|
||||||
#! nix-shell -i <replaceable>real-interpreter</replaceable> -p <replaceable>packages</replaceable>
|
#! nix-shell -i <emphasis>real-interpreter</emphasis> -p <emphasis>packages</emphasis>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
where <replaceable>real-interpreter</replaceable> is the “real” script
|
where <emphasis>real-interpreter</emphasis> is the “real” script
|
||||||
interpreter that will be invoked by <command>nix-shell</command> after
|
interpreter that will be invoked by <command>nix-shell</command> after
|
||||||
it has obtained the dependencies and initialised the environment, and
|
it has obtained the dependencies and initialised the environment, and
|
||||||
<replaceable>packages</replaceable> are the attribute names of the
|
<emphasis>packages</emphasis> are the attribute names of the
|
||||||
dependencies in Nixpkgs.</para>
|
dependencies in Nixpkgs.</para>
|
||||||
|
|
||||||
<para>The lines starting with <literal>#! nix-shell</literal> specify
|
<para>The lines starting with <literal>#! nix-shell</literal> specify
|
||||||
|
|
|
@ -20,11 +20,11 @@
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>nix-store</command>
|
<command>nix-store</command>
|
||||||
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="opt-common-syn.xml#xmlns(db=http://docbook.org/ns/docbook)xpointer(/db:nop/*)" />
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="opt-common-syn.xml#xmlns(db=http://docbook.org/ns/docbook)xpointer(/db:nop/*)" />
|
||||||
<arg><option>--add-root</option> <replaceable>path</replaceable></arg>
|
<arg><option>--add-root</option> <emphasis>path</emphasis></arg>
|
||||||
<arg><option>--indirect</option></arg>
|
<arg><option>--indirect</option></arg>
|
||||||
<arg choice='plain'><replaceable>operation</replaceable></arg>
|
<arg choice='plain'><emphasis>operation</emphasis></arg>
|
||||||
<arg rep='repeat'><replaceable>options</replaceable></arg>
|
<arg rep='repeat'><emphasis>options</emphasis></arg>
|
||||||
<arg rep='repeat'><replaceable>arguments</replaceable></arg>
|
<arg rep='repeat'><emphasis>arguments</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
|
@ -55,14 +55,14 @@ options.</phrase></para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
|
||||||
<varlistentry xml:id="opt-add-root"><term><option>--add-root</option> <replaceable>path</replaceable></term>
|
<varlistentry xml:id="opt-add-root"><term><option>--add-root</option> <emphasis>path</emphasis></term>
|
||||||
|
|
||||||
<listitem><para>Causes the result of a realisation
|
<listitem><para>Causes the result of a realisation
|
||||||
(<option>--realise</option> and <option>--force-realise</option>)
|
(<option>--realise</option> and <option>--force-realise</option>)
|
||||||
to be registered as a root of the garbage collector<phrase
|
to be registered as a root of the garbage collector<phrase
|
||||||
condition="manual"> (see <xref linkend="ssec-gc-roots"
|
condition="manual"> (see <xref linkend="ssec-gc-roots"
|
||||||
/>)</phrase>. The root is stored in
|
/>)</phrase>. The root is stored in
|
||||||
<replaceable>path</replaceable>, which must be inside a directory
|
<emphasis>path</emphasis>, which must be inside a directory
|
||||||
that is scanned for roots by the garbage collector (i.e.,
|
that is scanned for roots by the garbage collector (i.e.,
|
||||||
typically in a subdirectory of
|
typically in a subdirectory of
|
||||||
<filename>/nix/var/nix/gcroots/</filename>)
|
<filename>/nix/var/nix/gcroots/</filename>)
|
||||||
|
@ -88,11 +88,11 @@ options.</phrase></para>
|
||||||
garbage-collected unless the symlink is removed.</para>
|
garbage-collected unless the symlink is removed.</para>
|
||||||
|
|
||||||
<para>The <option>--indirect</option> flag causes a uniquely named
|
<para>The <option>--indirect</option> flag causes a uniquely named
|
||||||
symlink to <replaceable>path</replaceable> to be stored in
|
symlink to <emphasis>path</emphasis> to be stored in
|
||||||
<filename>/nix/var/nix/gcroots/auto/</filename>. For instance,
|
<filename>/nix/var/nix/gcroots/auto/</filename>. For instance,
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
$ nix-store --add-root /home/eelco/bla/result --indirect -r <replaceable>...</replaceable>
|
$ nix-store --add-root /home/eelco/bla/result --indirect -r <emphasis>...</emphasis>
|
||||||
|
|
||||||
$ ls -l /nix/var/nix/gcroots/auto
|
$ ls -l /nix/var/nix/gcroots/auto
|
||||||
lrwxrwxrwx 1 ... 2005-03-13 21:10 dn54lcypm8f8... -> /home/eelco/bla/result
|
lrwxrwxrwx 1 ... 2005-03-13 21:10 dn54lcypm8f8... -> /home/eelco/bla/result
|
||||||
|
@ -135,7 +135,7 @@ lrwxrwxrwx 1 ... 2005-03-13 21:10 /home/eelco/bla/result -> /nix/store/1r1134
|
||||||
<arg choice='plain'><option>--realise</option></arg>
|
<arg choice='plain'><option>--realise</option></arg>
|
||||||
<arg choice='plain'><option>-r</option></arg>
|
<arg choice='plain'><option>-r</option></arg>
|
||||||
</group>
|
</group>
|
||||||
<arg choice='plain' rep='repeat'><replaceable>paths</replaceable></arg>
|
<arg choice='plain' rep='repeat'><emphasis>paths</emphasis></arg>
|
||||||
<arg><option>--dry-run</option></arg>
|
<arg><option>--dry-run</option></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ printed.)</para>
|
||||||
with <option>-K</option>, if an output path is not identical to
|
with <option>-K</option>, if an output path is not identical to
|
||||||
the corresponding output from the previous build, the new output
|
the corresponding output from the previous build, the new output
|
||||||
path is left in
|
path is left in
|
||||||
<filename>/nix/store/<replaceable>name</replaceable>.check.</filename></para>
|
<filename>/nix/store/<emphasis>name</emphasis>.check.</filename></para>
|
||||||
|
|
||||||
<para>See also the <option>build-repeat</option> configuration
|
<para>See also the <option>build-repeat</option> configuration
|
||||||
option, which repeats a derivation a number of times and prevents
|
option, which repeats a derivation a number of times and prevents
|
||||||
|
@ -361,7 +361,7 @@ EOF
|
||||||
<arg choice='plain'><option>--print-live</option></arg>
|
<arg choice='plain'><option>--print-live</option></arg>
|
||||||
<arg choice='plain'><option>--print-dead</option></arg>
|
<arg choice='plain'><option>--print-dead</option></arg>
|
||||||
</group>
|
</group>
|
||||||
<arg><option>--max-freed</option> <replaceable>bytes</replaceable></arg>
|
<arg><option>--max-freed</option> <emphasis>bytes</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
|
|
||||||
</refsection>
|
</refsection>
|
||||||
|
@ -413,11 +413,11 @@ options control what gets deleted and in what order:
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
|
||||||
<varlistentry><term><option>--max-freed</option> <replaceable>bytes</replaceable></term>
|
<varlistentry><term><option>--max-freed</option> <emphasis>bytes</emphasis></term>
|
||||||
|
|
||||||
<listitem><para>Keep deleting paths until at least
|
<listitem><para>Keep deleting paths until at least
|
||||||
<replaceable>bytes</replaceable> bytes have been deleted, then
|
<emphasis>bytes</emphasis> bytes have been deleted, then
|
||||||
stop. The argument <replaceable>bytes</replaceable> can be
|
stop. The argument <emphasis>bytes</emphasis> can be
|
||||||
followed by the multiplicative suffix <literal>K</literal>,
|
followed by the multiplicative suffix <literal>K</literal>,
|
||||||
<literal>M</literal>, <literal>G</literal> or
|
<literal>M</literal>, <literal>G</literal> or
|
||||||
<literal>T</literal>, denoting KiB, MiB, GiB or TiB
|
<literal>T</literal>, denoting KiB, MiB, GiB or TiB
|
||||||
|
@ -450,7 +450,7 @@ be freed.</para>
|
||||||
<screen>
|
<screen>
|
||||||
$ nix-store --gc
|
$ nix-store --gc
|
||||||
deleting `/nix/store/kq82idx6g0nyzsp2s14gfsc38npai7lf-cairo-1.0.4.tar.gz.drv'
|
deleting `/nix/store/kq82idx6g0nyzsp2s14gfsc38npai7lf-cairo-1.0.4.tar.gz.drv'
|
||||||
<replaceable>...</replaceable>
|
<emphasis>...</emphasis>
|
||||||
8825586 bytes freed (8.42 MiB)</screen>
|
8825586 bytes freed (8.42 MiB)</screen>
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
@ -479,7 +479,7 @@ $ nix-store --gc --max-freed $((100 * 1024 * 1024))</screen>
|
||||||
<command>nix-store</command>
|
<command>nix-store</command>
|
||||||
<arg choice='plain'><option>--delete</option></arg>
|
<arg choice='plain'><option>--delete</option></arg>
|
||||||
<arg><option>--ignore-liveness</option></arg>
|
<arg><option>--ignore-liveness</option></arg>
|
||||||
<arg choice='plain' rep='repeat'><replaceable>paths</replaceable></arg>
|
<arg choice='plain' rep='repeat'><emphasis>paths</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
|
|
||||||
</refsection>
|
</refsection>
|
||||||
|
@ -487,7 +487,7 @@ $ nix-store --gc --max-freed $((100 * 1024 * 1024))</screen>
|
||||||
<refsection><title>Description</title>
|
<refsection><title>Description</title>
|
||||||
|
|
||||||
<para>The operation <option>--delete</option> deletes the store paths
|
<para>The operation <option>--delete</option> deletes the store paths
|
||||||
<replaceable>paths</replaceable> from the Nix store, but only if it is
|
<emphasis>paths</emphasis> from the Nix store, but only if it is
|
||||||
safe to do so; that is, when the path is not reachable from a root of
|
safe to do so; that is, when the path is not reachable from a root of
|
||||||
the garbage collector. This means that you can only delete paths that
|
the garbage collector. This means that you can only delete paths that
|
||||||
would also be deleted by <literal>nix-store --gc</literal>. Thus,
|
would also be deleted by <literal>nix-store --gc</literal>. Thus,
|
||||||
|
@ -537,8 +537,8 @@ error: cannot delete path `/nix/store/zq0h41l75vlb4z45kzgjjmsjxvcv1qk7-mesa-6.4'
|
||||||
<arg choice='plain'><option>-d</option></arg>
|
<arg choice='plain'><option>-d</option></arg>
|
||||||
<arg choice='plain'><option>--graph</option></arg>
|
<arg choice='plain'><option>--graph</option></arg>
|
||||||
<arg choice='plain'><option>--tree</option></arg>
|
<arg choice='plain'><option>--tree</option></arg>
|
||||||
<arg choice='plain'><option>--binding</option> <replaceable>name</replaceable></arg>
|
<arg choice='plain'><option>--binding</option> <emphasis>name</emphasis></arg>
|
||||||
<arg choice='plain'><option>-b</option> <replaceable>name</replaceable></arg>
|
<arg choice='plain'><option>-b</option> <emphasis>name</emphasis></arg>
|
||||||
<arg choice='plain'><option>--hash</option></arg>
|
<arg choice='plain'><option>--hash</option></arg>
|
||||||
<arg choice='plain'><option>--size</option></arg>
|
<arg choice='plain'><option>--size</option></arg>
|
||||||
<arg choice='plain'><option>--roots</option></arg>
|
<arg choice='plain'><option>--roots</option></arg>
|
||||||
|
@ -547,7 +547,7 @@ error: cannot delete path `/nix/store/zq0h41l75vlb4z45kzgjjmsjxvcv1qk7-mesa-6.4'
|
||||||
<arg><option>-u</option></arg>
|
<arg><option>-u</option></arg>
|
||||||
<arg><option>--force-realise</option></arg>
|
<arg><option>--force-realise</option></arg>
|
||||||
<arg><option>-f</option></arg>
|
<arg><option>-f</option></arg>
|
||||||
<arg choice='plain' rep='repeat'><replaceable>paths</replaceable></arg>
|
<arg choice='plain' rep='repeat'><emphasis>paths</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
|
|
||||||
</refsection>
|
</refsection>
|
||||||
|
@ -560,7 +560,7 @@ information about the store paths . The queries are described below. At
|
||||||
most one query can be specified. The default query is
|
most one query can be specified. The default query is
|
||||||
<option>--outputs</option>.</para>
|
<option>--outputs</option>.</para>
|
||||||
|
|
||||||
<para>The paths <replaceable>paths</replaceable> may also be symlinks
|
<para>The paths <emphasis>paths</emphasis> may also be symlinks
|
||||||
from outside of the Nix store, to the Nix store. In that case, the
|
from outside of the Nix store, to the Nix store. In that case, the
|
||||||
query is applied to the target of the symlink.</para>
|
query is applied to the target of the symlink.</para>
|
||||||
|
|
||||||
|
@ -603,7 +603,7 @@ query is applied to the target of the symlink.</para>
|
||||||
|
|
||||||
<listitem><para>Prints out the <link
|
<listitem><para>Prints out the <link
|
||||||
linkend="gloss-output-path">output paths</link> of the store
|
linkend="gloss-output-path">output paths</link> of the store
|
||||||
derivations <replaceable>paths</replaceable>. These are the paths
|
derivations <emphasis>paths</emphasis>. These are the paths
|
||||||
that will be produced when the derivation is
|
that will be produced when the derivation is
|
||||||
built.</para></listitem>
|
built.</para></listitem>
|
||||||
|
|
||||||
|
@ -614,7 +614,7 @@ query is applied to the target of the symlink.</para>
|
||||||
|
|
||||||
<listitem><para>Prints out the <link
|
<listitem><para>Prints out the <link
|
||||||
linkend="gloss-closure">closure</link> of the store path
|
linkend="gloss-closure">closure</link> of the store path
|
||||||
<replaceable>paths</replaceable>.</para>
|
<emphasis>paths</emphasis>.</para>
|
||||||
|
|
||||||
<para>This query has one option:</para>
|
<para>This query has one option:</para>
|
||||||
|
|
||||||
|
@ -647,7 +647,7 @@ query is applied to the target of the symlink.</para>
|
||||||
|
|
||||||
<listitem><para>Prints the set of <link
|
<listitem><para>Prints the set of <link
|
||||||
linkend="gloss-reference">references</link> of the store paths
|
linkend="gloss-reference">references</link> of the store paths
|
||||||
<replaceable>paths</replaceable>, that is, their immediate
|
<emphasis>paths</emphasis>, that is, their immediate
|
||||||
dependencies. (For <emphasis>all</emphasis> dependencies, use
|
dependencies. (For <emphasis>all</emphasis> dependencies, use
|
||||||
<option>--requisites</option>.)</para></listitem>
|
<option>--requisites</option>.)</para></listitem>
|
||||||
|
|
||||||
|
@ -656,9 +656,9 @@ query is applied to the target of the symlink.</para>
|
||||||
<varlistentry><term><option>--referrers</option></term>
|
<varlistentry><term><option>--referrers</option></term>
|
||||||
|
|
||||||
<listitem><para>Prints the set of <emphasis>referrers</emphasis> of
|
<listitem><para>Prints the set of <emphasis>referrers</emphasis> of
|
||||||
the store paths <replaceable>paths</replaceable>, that is, the
|
the store paths <emphasis>paths</emphasis>, that is, the
|
||||||
store paths currently existing in the Nix store that refer to one
|
store paths currently existing in the Nix store that refer to one
|
||||||
of <replaceable>paths</replaceable>. Note that contrary to the
|
of <emphasis>paths</emphasis>. Note that contrary to the
|
||||||
references, the set of referrers is not constant; it can change as
|
references, the set of referrers is not constant; it can change as
|
||||||
store paths are added or removed.</para></listitem>
|
store paths are added or removed.</para></listitem>
|
||||||
|
|
||||||
|
@ -667,11 +667,11 @@ query is applied to the target of the symlink.</para>
|
||||||
<varlistentry><term><option>--referrers-closure</option></term>
|
<varlistentry><term><option>--referrers-closure</option></term>
|
||||||
|
|
||||||
<listitem><para>Prints the closure of the set of store paths
|
<listitem><para>Prints the closure of the set of store paths
|
||||||
<replaceable>paths</replaceable> under the referrers relation; that
|
<emphasis>paths</emphasis> under the referrers relation; that
|
||||||
is, all store paths that directly or indirectly refer to one of
|
is, all store paths that directly or indirectly refer to one of
|
||||||
<replaceable>paths</replaceable>. These are all the path currently
|
<emphasis>paths</emphasis>. These are all the path currently
|
||||||
in the Nix store that are dependent on
|
in the Nix store that are dependent on
|
||||||
<replaceable>paths</replaceable>.</para></listitem>
|
<emphasis>paths</emphasis>.</para></listitem>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
@ -680,7 +680,7 @@ query is applied to the target of the symlink.</para>
|
||||||
|
|
||||||
<listitem><para>Prints the <link
|
<listitem><para>Prints the <link
|
||||||
linkend="gloss-deriver">deriver</link> of the store paths
|
linkend="gloss-deriver">deriver</link> of the store paths
|
||||||
<replaceable>paths</replaceable>. If the path has no deriver
|
<emphasis>paths</emphasis>. If the path has no deriver
|
||||||
(e.g., if it is a source file), or if the deriver is not known
|
(e.g., if it is a source file), or if the deriver is not known
|
||||||
(e.g., in the case of a binary-only deployment), the string
|
(e.g., in the case of a binary-only deployment), the string
|
||||||
<literal>unknown-deriver</literal> is printed.</para></listitem>
|
<literal>unknown-deriver</literal> is printed.</para></listitem>
|
||||||
|
@ -690,7 +690,7 @@ query is applied to the target of the symlink.</para>
|
||||||
<varlistentry><term><option>--graph</option></term>
|
<varlistentry><term><option>--graph</option></term>
|
||||||
|
|
||||||
<listitem><para>Prints the references graph of the store paths
|
<listitem><para>Prints the references graph of the store paths
|
||||||
<replaceable>paths</replaceable> in the format of the
|
<emphasis>paths</emphasis> in the format of the
|
||||||
<command>dot</command> tool of AT&T's <link
|
<command>dot</command> tool of AT&T's <link
|
||||||
xlink:href="http://www.graphviz.org/">Graphviz package</link>.
|
xlink:href="http://www.graphviz.org/">Graphviz package</link>.
|
||||||
This can be used to visualise dependency graphs. To obtain a
|
This can be used to visualise dependency graphs. To obtain a
|
||||||
|
@ -703,7 +703,7 @@ query is applied to the target of the symlink.</para>
|
||||||
<varlistentry><term><option>--tree</option></term>
|
<varlistentry><term><option>--tree</option></term>
|
||||||
|
|
||||||
<listitem><para>Prints the references graph of the store paths
|
<listitem><para>Prints the references graph of the store paths
|
||||||
<replaceable>paths</replaceable> as a nested ASCII tree.
|
<emphasis>paths</emphasis> as a nested ASCII tree.
|
||||||
References are ordered by descending closure size; this tends to
|
References are ordered by descending closure size; this tends to
|
||||||
flatten the tree, making it more readable. The query only
|
flatten the tree, making it more readable. The query only
|
||||||
recurses into a store path when it is first encountered; this
|
recurses into a store path when it is first encountered; this
|
||||||
|
@ -715,7 +715,7 @@ query is applied to the target of the symlink.</para>
|
||||||
<varlistentry><term><option>--graphml</option></term>
|
<varlistentry><term><option>--graphml</option></term>
|
||||||
|
|
||||||
<listitem><para>Prints the references graph of the store paths
|
<listitem><para>Prints the references graph of the store paths
|
||||||
<replaceable>paths</replaceable> in the <link
|
<emphasis>paths</emphasis> in the <link
|
||||||
xlink:href="http://graphml.graphdrawing.org/">GraphML</link> file format.
|
xlink:href="http://graphml.graphdrawing.org/">GraphML</link> file format.
|
||||||
This can be used to visualise dependency graphs. To obtain a
|
This can be used to visualise dependency graphs. To obtain a
|
||||||
build-time dependency graph, apply this to a store derivation. To
|
build-time dependency graph, apply this to a store derivation. To
|
||||||
|
@ -724,12 +724,12 @@ query is applied to the target of the symlink.</para>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry><term><option>--binding</option> <replaceable>name</replaceable></term>
|
<varlistentry><term><option>--binding</option> <emphasis>name</emphasis></term>
|
||||||
<term><option>-b</option> <replaceable>name</replaceable></term>
|
<term><option>-b</option> <emphasis>name</emphasis></term>
|
||||||
|
|
||||||
<listitem><para>Prints the value of the attribute
|
<listitem><para>Prints the value of the attribute
|
||||||
<replaceable>name</replaceable> (i.e., environment variable) of
|
<emphasis>name</emphasis> (i.e., environment variable) of
|
||||||
the store derivations <replaceable>paths</replaceable>. It is an
|
the store derivations <emphasis>paths</emphasis>. It is an
|
||||||
error for a derivation to not have the specified
|
error for a derivation to not have the specified
|
||||||
attribute.</para></listitem>
|
attribute.</para></listitem>
|
||||||
|
|
||||||
|
@ -738,7 +738,7 @@ query is applied to the target of the symlink.</para>
|
||||||
<varlistentry><term><option>--hash</option></term>
|
<varlistentry><term><option>--hash</option></term>
|
||||||
|
|
||||||
<listitem><para>Prints the SHA-256 hash of the contents of the
|
<listitem><para>Prints the SHA-256 hash of the contents of the
|
||||||
store paths <replaceable>paths</replaceable> (that is, the hash of
|
store paths <emphasis>paths</emphasis> (that is, the hash of
|
||||||
the output of <command>nix-store --dump</command> on the given
|
the output of <command>nix-store --dump</command> on the given
|
||||||
paths). Since the hash is stored in the Nix database, this is a
|
paths). Since the hash is stored in the Nix database, this is a
|
||||||
fast operation.</para></listitem>
|
fast operation.</para></listitem>
|
||||||
|
@ -748,7 +748,7 @@ query is applied to the target of the symlink.</para>
|
||||||
<varlistentry><term><option>--size</option></term>
|
<varlistentry><term><option>--size</option></term>
|
||||||
|
|
||||||
<listitem><para>Prints the size in bytes of the contents of the
|
<listitem><para>Prints the size in bytes of the contents of the
|
||||||
store paths <replaceable>paths</replaceable> — to be precise, the
|
store paths <emphasis>paths</emphasis> — to be precise, the
|
||||||
size of the output of <command>nix-store --dump</command> on the
|
size of the output of <command>nix-store --dump</command> on the
|
||||||
given paths. Note that the actual disk space required by the
|
given paths. Note that the actual disk space required by the
|
||||||
store paths may be higher, especially on filesystems with large
|
store paths may be higher, especially on filesystems with large
|
||||||
|
@ -760,7 +760,7 @@ query is applied to the target of the symlink.</para>
|
||||||
|
|
||||||
<listitem><para>Prints the garbage collector roots that point,
|
<listitem><para>Prints the garbage collector roots that point,
|
||||||
directly or indirectly, at the store paths
|
directly or indirectly, at the store paths
|
||||||
<replaceable>paths</replaceable>.</para></listitem>
|
<emphasis>paths</emphasis>.</para></listitem>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
@ -778,7 +778,7 @@ query is applied to the target of the symlink.</para>
|
||||||
$ nix-store -qR $(which svn)
|
$ nix-store -qR $(which svn)
|
||||||
/nix/store/5mbglq5ldqld8sj57273aljwkfvj22mc-subversion-1.1.4
|
/nix/store/5mbglq5ldqld8sj57273aljwkfvj22mc-subversion-1.1.4
|
||||||
/nix/store/9lz9yc6zgmc0vlqmn2ipcpkjlmbi51vv-glibc-2.3.4
|
/nix/store/9lz9yc6zgmc0vlqmn2ipcpkjlmbi51vv-glibc-2.3.4
|
||||||
<replaceable>...</replaceable></screen>
|
<emphasis>...</emphasis></screen>
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -789,7 +789,7 @@ $ nix-store -qR $(nix-store -qd $(which svn))
|
||||||
/nix/store/02iizgn86m42q905rddvg4ja975bk2i4-grep-2.5.1.tar.bz2.drv
|
/nix/store/02iizgn86m42q905rddvg4ja975bk2i4-grep-2.5.1.tar.bz2.drv
|
||||||
/nix/store/07a2bzxmzwz5hp58nf03pahrv2ygwgs3-gcc-wrapper.sh
|
/nix/store/07a2bzxmzwz5hp58nf03pahrv2ygwgs3-gcc-wrapper.sh
|
||||||
/nix/store/0ma7c9wsbaxahwwl04gbw3fcd806ski4-glibc-2.3.4.drv
|
/nix/store/0ma7c9wsbaxahwwl04gbw3fcd806ski4-glibc-2.3.4.drv
|
||||||
<replaceable>... lots of other paths ...</replaceable></screen>
|
<emphasis>... lots of other paths ...</emphasis></screen>
|
||||||
|
|
||||||
The difference with the previous example is that we ask the closure of
|
The difference with the previous example is that we ask the closure of
|
||||||
the derivation (<option>-qd</option>), not the closure of the output
|
the derivation (<option>-qd</option>), not the closure of the output
|
||||||
|
@ -804,7 +804,7 @@ $ nix-store -q --tree $(nix-store -qd $(which svn))
|
||||||
+---/nix/store/fmzxmpjx2lh849ph0l36snfj9zdibw67-bash-3.0.drv
|
+---/nix/store/fmzxmpjx2lh849ph0l36snfj9zdibw67-bash-3.0.drv
|
||||||
| +---/nix/store/570hmhmx3v57605cqg9yfvvyh0nnb8k8-bash
|
| +---/nix/store/570hmhmx3v57605cqg9yfvvyh0nnb8k8-bash
|
||||||
| +---/nix/store/p3srsbd8dx44v2pg6nbnszab5mcwx03v-builder.sh
|
| +---/nix/store/p3srsbd8dx44v2pg6nbnszab5mcwx03v-builder.sh
|
||||||
<replaceable>...</replaceable></screen>
|
<emphasis>...</emphasis></screen>
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
@ -827,7 +827,7 @@ $ nix-store -q --referrers $(nix-store -q --binding openssl $(nix-store -qd $(wh
|
||||||
$ nix-store -q --referrers-closure $(ldd $(which svn) | grep /libc.so | awk '{print $3}')
|
$ nix-store -q --referrers-closure $(ldd $(which svn) | grep /libc.so | awk '{print $3}')
|
||||||
/nix/store/034a6h4vpz9kds5r6kzb9lhh81mscw43-libgnomeprintui-2.8.2
|
/nix/store/034a6h4vpz9kds5r6kzb9lhh81mscw43-libgnomeprintui-2.8.2
|
||||||
/nix/store/15l3yi0d45prm7a82pcrknxdh6nzmxza-gawk-3.1.4
|
/nix/store/15l3yi0d45prm7a82pcrknxdh6nzmxza-gawk-3.1.4
|
||||||
<replaceable>...</replaceable></screen>
|
<emphasis>...</emphasis></screen>
|
||||||
|
|
||||||
Note that <command>ldd</command> is a command that prints out the
|
Note that <command>ldd</command> is a command that prints out the
|
||||||
dynamic libraries used by an ELF executable.</para>
|
dynamic libraries used by an ELF executable.</para>
|
||||||
|
@ -893,7 +893,7 @@ $ nix-store -q --roots $(which svn)
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>nix-store</command>
|
<command>nix-store</command>
|
||||||
<arg choice='plain'><option>--add</option></arg>
|
<arg choice='plain'><option>--add</option></arg>
|
||||||
<arg choice='plain' rep='repeat'><replaceable>paths</replaceable></arg>
|
<arg choice='plain' rep='repeat'><emphasis>paths</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
|
|
||||||
</refsection>
|
</refsection>
|
||||||
|
@ -926,8 +926,8 @@ $ nix-store --add ./foo.c
|
||||||
<command>nix-store</command>
|
<command>nix-store</command>
|
||||||
<arg><option>--recursive</option></arg>
|
<arg><option>--recursive</option></arg>
|
||||||
<arg choice='plain'><option>--add-fixed</option></arg>
|
<arg choice='plain'><option>--add-fixed</option></arg>
|
||||||
<arg choice='plain'><replaceable>algorithm</replaceable></arg>
|
<arg choice='plain'><emphasis>algorithm</emphasis></arg>
|
||||||
<arg choice='plain' rep='repeat'><replaceable>paths</replaceable></arg>
|
<arg choice='plain' rep='repeat'><emphasis>paths</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
|
|
||||||
</refsection>
|
</refsection>
|
||||||
|
@ -1039,7 +1039,7 @@ in Nix itself.</para>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>nix-store</command>
|
<command>nix-store</command>
|
||||||
<arg choice='plain'><option>--verify-path</option></arg>
|
<arg choice='plain'><option>--verify-path</option></arg>
|
||||||
<arg choice='plain' rep='repeat'><replaceable>paths</replaceable></arg>
|
<arg choice='plain' rep='repeat'><emphasis>paths</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsection>
|
</refsection>
|
||||||
|
|
||||||
|
@ -1077,7 +1077,7 @@ $ nix-store --verify-path $(nix-store -qR $(which svn))
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>nix-store</command>
|
<command>nix-store</command>
|
||||||
<arg choice='plain'><option>--repair-path</option></arg>
|
<arg choice='plain'><option>--repair-path</option></arg>
|
||||||
<arg choice='plain' rep='repeat'><replaceable>paths</replaceable></arg>
|
<arg choice='plain' rep='repeat'><emphasis>paths</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsection>
|
</refsection>
|
||||||
|
|
||||||
|
@ -1123,7 +1123,7 @@ fetching path `/nix/store/d7a81wsm1ijwwpkks3725661h3263p5-glibc-2.13'...
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>nix-store</command>
|
<command>nix-store</command>
|
||||||
<arg choice='plain'><option>--dump</option></arg>
|
<arg choice='plain'><option>--dump</option></arg>
|
||||||
<arg choice='plain'><replaceable>path</replaceable></arg>
|
<arg choice='plain'><emphasis>path</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsection>
|
</refsection>
|
||||||
|
|
||||||
|
@ -1131,7 +1131,7 @@ fetching path `/nix/store/d7a81wsm1ijwwpkks3725661h3263p5-glibc-2.13'...
|
||||||
|
|
||||||
<para>The operation <option>--dump</option> produces a NAR (Nix
|
<para>The operation <option>--dump</option> produces a NAR (Nix
|
||||||
ARchive) file containing the contents of the file system tree rooted
|
ARchive) file containing the contents of the file system tree rooted
|
||||||
at <replaceable>path</replaceable>. The archive is written to
|
at <emphasis>path</emphasis>. The archive is written to
|
||||||
standard output.</para>
|
standard output.</para>
|
||||||
|
|
||||||
<para>A NAR archive is like a TAR or Zip archive, but it contains only
|
<para>A NAR archive is like a TAR or Zip archive, but it contains only
|
||||||
|
@ -1173,14 +1173,14 @@ links, but not other types of files (such as device nodes).</para>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>nix-store</command>
|
<command>nix-store</command>
|
||||||
<arg choice='plain'><option>--restore</option></arg>
|
<arg choice='plain'><option>--restore</option></arg>
|
||||||
<arg choice='plain'><replaceable>path</replaceable></arg>
|
<arg choice='plain'><emphasis>path</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsection>
|
</refsection>
|
||||||
|
|
||||||
<refsection><title>Description</title>
|
<refsection><title>Description</title>
|
||||||
|
|
||||||
<para>The operation <option>--restore</option> unpacks a NAR archive
|
<para>The operation <option>--restore</option> unpacks a NAR archive
|
||||||
to <replaceable>path</replaceable>, which must not already exist. The
|
to <emphasis>path</emphasis>, which must not already exist. The
|
||||||
archive is read from standard input.</para>
|
archive is read from standard input.</para>
|
||||||
|
|
||||||
</refsection>
|
</refsection>
|
||||||
|
@ -1198,7 +1198,7 @@ archive is read from standard input.</para>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>nix-store</command>
|
<command>nix-store</command>
|
||||||
<arg choice='plain'><option>--export</option></arg>
|
<arg choice='plain'><option>--export</option></arg>
|
||||||
<arg choice='plain' rep='repeat'><replaceable>paths</replaceable></arg>
|
<arg choice='plain' rep='repeat'><emphasis>paths</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsection>
|
</refsection>
|
||||||
|
|
||||||
|
@ -1220,7 +1220,7 @@ that are missing in the target Nix store, the import will fail. To
|
||||||
copy a whole closure, do something like:
|
copy a whole closure, do something like:
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
$ nix-store --export $(nix-store -qR <replaceable>paths</replaceable>) > out</screen>
|
$ nix-store --export $(nix-store -qR <emphasis>paths</emphasis>) > out</screen>
|
||||||
|
|
||||||
To import the whole closure again, run:
|
To import the whole closure again, run:
|
||||||
|
|
||||||
|
@ -1299,7 +1299,7 @@ progress indication.</para>
|
||||||
<screen>
|
<screen>
|
||||||
$ nix-store --optimise
|
$ nix-store --optimise
|
||||||
hashing files in `/nix/store/qhqx7l2f1kmwihc9bnxs7rc159hsxnf3-gcc-4.1.1'
|
hashing files in `/nix/store/qhqx7l2f1kmwihc9bnxs7rc159hsxnf3-gcc-4.1.1'
|
||||||
<replaceable>...</replaceable>
|
<emphasis>...</emphasis>
|
||||||
541838819 bytes (516.74 MiB) freed by hard-linking 54143 files;
|
541838819 bytes (516.74 MiB) freed by hard-linking 54143 files;
|
||||||
there are 114486 files with equal contents out of 215894 files in total
|
there are 114486 files with equal contents out of 215894 files in total
|
||||||
</screen>
|
</screen>
|
||||||
|
@ -1322,7 +1322,7 @@ there are 114486 files with equal contents out of 215894 files in total
|
||||||
<arg choice='plain'><option>--read-log</option></arg>
|
<arg choice='plain'><option>--read-log</option></arg>
|
||||||
<arg choice='plain'><option>-l</option></arg>
|
<arg choice='plain'><option>-l</option></arg>
|
||||||
</group>
|
</group>
|
||||||
<arg choice='plain' rep='repeat'><replaceable>paths</replaceable></arg>
|
<arg choice='plain' rep='repeat'><emphasis>paths</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsection>
|
</refsection>
|
||||||
|
|
||||||
|
@ -1351,7 +1351,7 @@ unpacking sources
|
||||||
unpacking source archive /nix/store/p8n1jpqs27mgkjw07pb5269717nzf5f8-ktorrent-2.2.1.tar.gz
|
unpacking source archive /nix/store/p8n1jpqs27mgkjw07pb5269717nzf5f8-ktorrent-2.2.1.tar.gz
|
||||||
ktorrent-2.2.1/
|
ktorrent-2.2.1/
|
||||||
ktorrent-2.2.1/NEWS
|
ktorrent-2.2.1/NEWS
|
||||||
<replaceable>...</replaceable>
|
<emphasis>...</emphasis>
|
||||||
</screen>
|
</screen>
|
||||||
|
|
||||||
</refsection>
|
</refsection>
|
||||||
|
@ -1369,7 +1369,7 @@ ktorrent-2.2.1/NEWS
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>nix-store</command>
|
<command>nix-store</command>
|
||||||
<arg choice='plain'><option>--dump-db</option></arg>
|
<arg choice='plain'><option>--dump-db</option></arg>
|
||||||
<arg rep='repeat'><replaceable>paths</replaceable></arg>
|
<arg rep='repeat'><emphasis>paths</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsection>
|
</refsection>
|
||||||
|
|
||||||
|
@ -1424,7 +1424,7 @@ loads it into the Nix database.</para>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>nix-store</command>
|
<command>nix-store</command>
|
||||||
<arg choice='plain'><option>--print-env</option></arg>
|
<arg choice='plain'><option>--print-env</option></arg>
|
||||||
<arg choice='plain'><replaceable>drvpath</replaceable></arg>
|
<arg choice='plain'><emphasis>drvpath</emphasis></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsection>
|
</refsection>
|
||||||
|
|
||||||
|
@ -1441,7 +1441,7 @@ variable <literal>_args</literal>.</para>
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
$ nix-store --print-env $(nix-instantiate '<nixpkgs>' -A firefox)
|
$ nix-store --print-env $(nix-instantiate '<nixpkgs>' -A firefox)
|
||||||
<replaceable>…</replaceable>
|
<emphasis>…</emphasis>
|
||||||
export src; src='/nix/store/plpj7qrwcz94z2psh6fchsi7s8yihc7k-firefox-12.0.source.tar.bz2'
|
export src; src='/nix/store/plpj7qrwcz94z2psh6fchsi7s8yihc7k-firefox-12.0.source.tar.bz2'
|
||||||
export stdenv; stdenv='/nix/store/7c8asx3yfrg5dg1gzhzyq2236zfgibnn-stdenv'
|
export stdenv; stdenv='/nix/store/7c8asx3yfrg5dg1gzhzyq2236zfgibnn-stdenv'
|
||||||
export system; system='x86_64-linux'
|
export system; system='x86_64-linux'
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
</arg>
|
</arg>
|
||||||
<arg>
|
<arg>
|
||||||
<option>--log-format</option>
|
<option>--log-format</option>
|
||||||
<replaceable>format</replaceable>
|
<emphasis>format</emphasis>
|
||||||
</arg>
|
</arg>
|
||||||
<arg>
|
<arg>
|
||||||
<group choice='plain'>
|
<group choice='plain'>
|
||||||
|
@ -26,19 +26,19 @@
|
||||||
<arg choice='plain'><option>--max-jobs</option></arg>
|
<arg choice='plain'><option>--max-jobs</option></arg>
|
||||||
<arg choice='plain'><option>-j</option></arg>
|
<arg choice='plain'><option>-j</option></arg>
|
||||||
</group>
|
</group>
|
||||||
<replaceable>number</replaceable>
|
<emphasis>number</emphasis>
|
||||||
</arg>
|
</arg>
|
||||||
<arg>
|
<arg>
|
||||||
<option>--cores</option>
|
<option>--cores</option>
|
||||||
<replaceable>number</replaceable>
|
<emphasis>number</emphasis>
|
||||||
</arg>
|
</arg>
|
||||||
<arg>
|
<arg>
|
||||||
<option>--max-silent-time</option>
|
<option>--max-silent-time</option>
|
||||||
<replaceable>number</replaceable>
|
<emphasis>number</emphasis>
|
||||||
</arg>
|
</arg>
|
||||||
<arg>
|
<arg>
|
||||||
<option>--timeout</option>
|
<option>--timeout</option>
|
||||||
<replaceable>number</replaceable>
|
<emphasis>number</emphasis>
|
||||||
</arg>
|
</arg>
|
||||||
<arg>
|
<arg>
|
||||||
<group choice='plain'>
|
<group choice='plain'>
|
||||||
|
@ -56,12 +56,12 @@
|
||||||
<arg><option>--readonly-mode</option></arg>
|
<arg><option>--readonly-mode</option></arg>
|
||||||
<arg>
|
<arg>
|
||||||
<option>-I</option>
|
<option>-I</option>
|
||||||
<replaceable>path</replaceable>
|
<emphasis>path</emphasis>
|
||||||
</arg>
|
</arg>
|
||||||
<arg>
|
<arg>
|
||||||
<option>--option</option>
|
<option>--option</option>
|
||||||
<replaceable>name</replaceable>
|
<emphasis>name</emphasis>
|
||||||
<replaceable>value</replaceable>
|
<emphasis>value</emphasis>
|
||||||
</arg>
|
</arg>
|
||||||
<sbr />
|
<sbr />
|
||||||
|
|
||||||
|
|
|
@ -92,12 +92,12 @@
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
|
||||||
<varlistentry xml:id="opt-log-format"><term><option>--log-format</option> <replaceable>format</replaceable></term>
|
<varlistentry xml:id="opt-log-format"><term><option>--log-format</option> <emphasis>format</emphasis></term>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
|
|
||||||
<para>This option can be used to change the output of the log format, with
|
<para>This option can be used to change the output of the log format, with
|
||||||
<replaceable>format</replaceable> being one of:</para>
|
<emphasis>format</emphasis> being one of:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
|
||||||
|
@ -130,13 +130,13 @@
|
||||||
error. This option suppresses this behaviour. Note that the
|
error. This option suppresses this behaviour. Note that the
|
||||||
builder's standard output and error are always written to a log file
|
builder's standard output and error are always written to a log file
|
||||||
in
|
in
|
||||||
<filename><replaceable>prefix</replaceable>/nix/var/log/nix</filename>.</para></listitem>
|
<filename><emphasis>prefix</emphasis>/nix/var/log/nix</filename>.</para></listitem>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
|
||||||
<varlistentry xml:id="opt-max-jobs"><term><option>--max-jobs</option> / <option>-j</option>
|
<varlistentry xml:id="opt-max-jobs"><term><option>--max-jobs</option> / <option>-j</option>
|
||||||
<replaceable>number</replaceable></term>
|
<emphasis>number</emphasis></term>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@
|
||||||
of parallelism. For instance, in Nixpkgs, if the derivation
|
of parallelism. For instance, in Nixpkgs, if the derivation
|
||||||
attribute <varname>enableParallelBuilding</varname> is set to
|
attribute <varname>enableParallelBuilding</varname> is set to
|
||||||
<literal>true</literal>, the builder passes the
|
<literal>true</literal>, the builder passes the
|
||||||
<option>-j<replaceable>N</replaceable></option> flag to GNU Make.
|
<option>-j<emphasis>N</emphasis></option> flag to GNU Make.
|
||||||
It defaults to the value of the <link
|
It defaults to the value of the <link
|
||||||
linkend='conf-cores'><literal>cores</literal></link>
|
linkend='conf-cores'><literal>cores</literal></link>
|
||||||
configuration setting, if set, or <literal>1</literal> otherwise.
|
configuration setting, if set, or <literal>1</literal> otherwise.
|
||||||
|
@ -271,7 +271,7 @@
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
|
||||||
<varlistentry><term><option>--arg</option> <replaceable>name</replaceable> <replaceable>value</replaceable></term>
|
<varlistentry><term><option>--arg</option> <emphasis>name</emphasis> <emphasis>value</emphasis></term>
|
||||||
|
|
||||||
<listitem><para>This option is accepted by
|
<listitem><para>This option is accepted by
|
||||||
<command>nix-env</command>, <command>nix-instantiate</command>,
|
<command>nix-env</command>, <command>nix-instantiate</command>,
|
||||||
|
@ -280,14 +280,14 @@
|
||||||
automatically try to call functions that
|
automatically try to call functions that
|
||||||
it encounters. It can automatically call functions for which every
|
it encounters. It can automatically call functions for which every
|
||||||
argument has a <link linkend='ss-functions'>default value</link>
|
argument has a <link linkend='ss-functions'>default value</link>
|
||||||
(e.g., <literal>{ <replaceable>argName</replaceable> ?
|
(e.g., <literal>{ <emphasis>argName</emphasis> ?
|
||||||
<replaceable>defaultValue</replaceable> }:
|
<emphasis>defaultValue</emphasis> }:
|
||||||
<replaceable>...</replaceable></literal>). With
|
<emphasis>...</emphasis></literal>). With
|
||||||
<option>--arg</option>, you can also call functions that have
|
<option>--arg</option>, you can also call functions that have
|
||||||
arguments without a default value (or override a default value).
|
arguments without a default value (or override a default value).
|
||||||
That is, if the evaluator encounters a function with an argument
|
That is, if the evaluator encounters a function with an argument
|
||||||
named <replaceable>name</replaceable>, it will call it with value
|
named <emphasis>name</emphasis>, it will call it with value
|
||||||
<replaceable>value</replaceable>.</para>
|
<emphasis>value</emphasis>.</para>
|
||||||
|
|
||||||
<para>For instance, the top-level <literal>default.nix</literal> in
|
<para>For instance, the top-level <literal>default.nix</literal> in
|
||||||
Nixpkgs is actually a function:
|
Nixpkgs is actually a function:
|
||||||
|
@ -295,23 +295,23 @@
|
||||||
<programlisting>
|
<programlisting>
|
||||||
{ # The system (e.g., `i686-linux') for which to build the packages.
|
{ # The system (e.g., `i686-linux') for which to build the packages.
|
||||||
system ? builtins.currentSystem
|
system ? builtins.currentSystem
|
||||||
<replaceable>...</replaceable>
|
<emphasis>...</emphasis>
|
||||||
}: <replaceable>...</replaceable></programlisting>
|
}: <emphasis>...</emphasis></programlisting>
|
||||||
|
|
||||||
So if you call this Nix expression (e.g., when you do
|
So if you call this Nix expression (e.g., when you do
|
||||||
<literal>nix-env -i <replaceable>pkgname</replaceable></literal>),
|
<literal>nix-env -i <emphasis>pkgname</emphasis></literal>),
|
||||||
the function will be called automatically using the value <link
|
the function will be called automatically using the value <link
|
||||||
linkend='builtin-currentSystem'><literal>builtins.currentSystem</literal></link>
|
linkend='builtin-currentSystem'><literal>builtins.currentSystem</literal></link>
|
||||||
for the <literal>system</literal> argument. You can override this
|
for the <literal>system</literal> argument. You can override this
|
||||||
using <option>--arg</option>, e.g., <literal>nix-env -i
|
using <option>--arg</option>, e.g., <literal>nix-env -i
|
||||||
<replaceable>pkgname</replaceable> --arg system
|
<emphasis>pkgname</emphasis> --arg system
|
||||||
\"i686-freebsd\"</literal>. (Note that since the argument is a Nix
|
\"i686-freebsd\"</literal>. (Note that since the argument is a Nix
|
||||||
string literal, you have to escape the quotes.)</para></listitem>
|
string literal, you have to escape the quotes.)</para></listitem>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
|
||||||
<varlistentry><term><option>--argstr</option> <replaceable>name</replaceable> <replaceable>value</replaceable></term>
|
<varlistentry><term><option>--argstr</option> <emphasis>name</emphasis> <emphasis>value</emphasis></term>
|
||||||
|
|
||||||
<listitem><para>This option is like <option>--arg</option>, only the
|
<listitem><para>This option is like <option>--arg</option>, only the
|
||||||
value is not a Nix expression but a string. So instead of
|
value is not a Nix expression but a string. So instead of
|
||||||
|
@ -323,17 +323,17 @@
|
||||||
|
|
||||||
|
|
||||||
<varlistentry xml:id="opt-attr"><term><option>--attr</option> / <option>-A</option>
|
<varlistentry xml:id="opt-attr"><term><option>--attr</option> / <option>-A</option>
|
||||||
<replaceable>attrPath</replaceable></term>
|
<emphasis>attrPath</emphasis></term>
|
||||||
|
|
||||||
<listitem><para>Select an attribute from the top-level Nix
|
<listitem><para>Select an attribute from the top-level Nix
|
||||||
expression being evaluated. (<command>nix-env</command>,
|
expression being evaluated. (<command>nix-env</command>,
|
||||||
<command>nix-instantiate</command>, <command>nix-build</command> and
|
<command>nix-instantiate</command>, <command>nix-build</command> and
|
||||||
<command>nix-shell</command> only.) The <emphasis>attribute
|
<command>nix-shell</command> only.) The <emphasis>attribute
|
||||||
path</emphasis> <replaceable>attrPath</replaceable> is a sequence of
|
path</emphasis> <emphasis>attrPath</emphasis> is a sequence of
|
||||||
attribute names separated by dots. For instance, given a top-level
|
attribute names separated by dots. For instance, given a top-level
|
||||||
Nix expression <replaceable>e</replaceable>, the attribute path
|
Nix expression <emphasis>e</emphasis>, the attribute path
|
||||||
<literal>xorg.xorgserver</literal> would cause the expression
|
<literal>xorg.xorgserver</literal> would cause the expression
|
||||||
<literal><replaceable>e</replaceable>.xorg.xorgserver</literal> to
|
<literal><emphasis>e</emphasis>.xorg.xorgserver</literal> to
|
||||||
be used. See <link
|
be used. See <link
|
||||||
linkend='refsec-nix-env-install-examples'><command>nix-env
|
linkend='refsec-nix-env-install-examples'><command>nix-env
|
||||||
--install</command></link> for some concrete examples.</para>
|
--install</command></link> for some concrete examples.</para>
|
||||||
|
@ -366,7 +366,7 @@
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
|
||||||
<varlistentry xml:id="opt-I"><term><option>-I</option> <replaceable>path</replaceable></term>
|
<varlistentry xml:id="opt-I"><term><option>-I</option> <emphasis>path</emphasis></term>
|
||||||
|
|
||||||
<listitem><para>Add a path to the Nix expression search path. This
|
<listitem><para>Add a path to the Nix expression search path. This
|
||||||
option may be given multiple times. See the <envar
|
option may be given multiple times. See the <envar
|
||||||
|
@ -378,10 +378,10 @@
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
|
||||||
<varlistentry><term><option>--option</option> <replaceable>name</replaceable> <replaceable>value</replaceable></term>
|
<varlistentry><term><option>--option</option> <emphasis>name</emphasis> <emphasis>value</emphasis></term>
|
||||||
|
|
||||||
<listitem><para>Set the Nix configuration option
|
<listitem><para>Set the Nix configuration option
|
||||||
<replaceable>name</replaceable> to <replaceable>value</replaceable>.
|
<emphasis>name</emphasis> to <emphasis>value</emphasis>.
|
||||||
This overrides settings in the Nix configuration file (see
|
This overrides settings in the Nix configuration file (see
|
||||||
<citerefentry><refentrytitle>nix.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>).</para></listitem>
|
<citerefentry><refentrytitle>nix.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>).</para></listitem>
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,6 @@
|
||||||
<arg><option>--from-expression</option></arg>
|
<arg><option>--from-expression</option></arg>
|
||||||
<arg><option>-E</option></arg>
|
<arg><option>-E</option></arg>
|
||||||
|
|
||||||
<arg><option>--from-profile</option> <replaceable>path</replaceable></arg>
|
<arg><option>--from-profile</option> <emphasis>path</emphasis></arg>
|
||||||
|
|
||||||
</nop>
|
</nop>
|
||||||
|
|
|
@ -91,12 +91,12 @@ disallowedRequisites = [ foobar ];
|
||||||
references graph of their inputs. The attribute is a list of
|
references graph of their inputs. The attribute is a list of
|
||||||
inputs in the Nix store whose references graph the builder needs
|
inputs in the Nix store whose references graph the builder needs
|
||||||
to know. The value of this attribute should be a list of pairs
|
to know. The value of this attribute should be a list of pairs
|
||||||
<literal>[ <replaceable>name1</replaceable>
|
<literal>[ <emphasis>name1</emphasis>
|
||||||
<replaceable>path1</replaceable> <replaceable>name2</replaceable>
|
<emphasis>path1</emphasis> <emphasis>name2</emphasis>
|
||||||
<replaceable>path2</replaceable> <replaceable>...</replaceable>
|
<emphasis>path2</emphasis> <emphasis>...</emphasis>
|
||||||
]</literal>. The references graph of each
|
]</literal>. The references graph of each
|
||||||
<replaceable>pathN</replaceable> will be stored in a text file
|
<emphasis>pathN</emphasis> will be stored in a text file
|
||||||
<replaceable>nameN</replaceable> in the temporary build directory.
|
<emphasis>nameN</emphasis> in the temporary build directory.
|
||||||
The text files have the format used by <command>nix-store
|
The text files have the format used by <command>nix-store
|
||||||
--register-validity</command> (with the deriver fields left
|
--register-validity</command> (with the deriver fields left
|
||||||
empty). For example, when the following derivation is built:
|
empty). For example, when the following derivation is built:
|
||||||
|
@ -135,7 +135,7 @@ derivation {
|
||||||
Nixpkgs has the line
|
Nixpkgs has the line
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
impureEnvVars = [ "http_proxy" "https_proxy" <replaceable>...</replaceable> ];
|
impureEnvVars = [ "http_proxy" "https_proxy" <emphasis>...</emphasis> ];
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
to make it use the proxy server configuration specified by the
|
to make it use the proxy server configuration specified by the
|
||||||
|
@ -297,11 +297,11 @@ big = "a very long string";
|
||||||
<literal>bigPath</literal> will contain the absolute path to a
|
<literal>bigPath</literal> will contain the absolute path to a
|
||||||
temporary file containing <literal>a very long
|
temporary file containing <literal>a very long
|
||||||
string</literal>. That is, for any attribute
|
string</literal>. That is, for any attribute
|
||||||
<replaceable>x</replaceable> listed in
|
<emphasis>x</emphasis> listed in
|
||||||
<varname>passAsFile</varname>, Nix will pass an environment
|
<varname>passAsFile</varname>, Nix will pass an environment
|
||||||
variable <literal><replaceable>x</replaceable>Path</literal> holding
|
variable <literal><emphasis>x</emphasis>Path</literal> holding
|
||||||
the path of the file containing the value of attribute
|
the path of the file containing the value of attribute
|
||||||
<replaceable>x</replaceable>. This is useful when you need to pass
|
<emphasis>x</emphasis>. This is useful when you need to pass
|
||||||
large strings to a builder, since most operating systems impose a
|
large strings to a builder, since most operating systems impose a
|
||||||
limit on the size of the environment (typically, a few hundred
|
limit on the size of the environment (typically, a few hundred
|
||||||
kilobyte).</para></listitem>
|
kilobyte).</para></listitem>
|
||||||
|
|
|
@ -58,7 +58,7 @@ steps:</para>
|
||||||
the <literal>PATH</literal>. The <literal>perl</literal> environment
|
the <literal>PATH</literal>. The <literal>perl</literal> environment
|
||||||
variable points to the location of the Perl package (since it
|
variable points to the location of the Perl package (since it
|
||||||
was passed in as an attribute to the derivation), so
|
was passed in as an attribute to the derivation), so
|
||||||
<filename><replaceable>$perl</replaceable>/bin</filename> is the
|
<filename><emphasis>$perl</emphasis>/bin</filename> is the
|
||||||
directory containing the Perl interpreter.</para>
|
directory containing the Perl interpreter.</para>
|
||||||
|
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -50,7 +50,7 @@ the single Nix expression in that directory
|
||||||
<para>Nix functions generally have the form <literal>{ x, y, ...,
|
<para>Nix functions generally have the form <literal>{ x, y, ...,
|
||||||
z }: e</literal> where <varname>x</varname>, <varname>y</varname>,
|
z }: e</literal> where <varname>x</varname>, <varname>y</varname>,
|
||||||
etc. are the names of the expected arguments, and where
|
etc. are the names of the expected arguments, and where
|
||||||
<replaceable>e</replaceable> is the body of the function. So
|
<emphasis>e</emphasis> is the body of the function. So
|
||||||
here, the entire remainder of the file is the body of the
|
here, the entire remainder of the file is the body of the
|
||||||
function; when given the required arguments, the body should
|
function; when given the required arguments, the body should
|
||||||
describe how to build an instance of the Hello package.</para>
|
describe how to build an instance of the Hello package.</para>
|
||||||
|
@ -69,10 +69,10 @@ the single Nix expression in that directory
|
||||||
<emphasis>attributes</emphasis>. A set is just a list of
|
<emphasis>attributes</emphasis>. A set is just a list of
|
||||||
key/value pairs where each key is a string and each value is an
|
key/value pairs where each key is a string and each value is an
|
||||||
arbitrary Nix expression. They take the general form <literal>{
|
arbitrary Nix expression. They take the general form <literal>{
|
||||||
<replaceable>name1</replaceable> =
|
<emphasis>name1</emphasis> =
|
||||||
<replaceable>expr1</replaceable>; <replaceable>...</replaceable>
|
<emphasis>expr1</emphasis>; <emphasis>...</emphasis>
|
||||||
<replaceable>nameN</replaceable> =
|
<emphasis>nameN</emphasis> =
|
||||||
<replaceable>exprN</replaceable>; }</literal>.</para>
|
<emphasis>exprN</emphasis>; }</literal>.</para>
|
||||||
|
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ genericBuild ③</programlisting>
|
||||||
subdirectory, it's added to GCC's header search path; and so
|
subdirectory, it's added to GCC's header search path; and so
|
||||||
on.<footnote><para>How does it work? <filename>setup</filename>
|
on.<footnote><para>How does it work? <filename>setup</filename>
|
||||||
tries to source the file
|
tries to source the file
|
||||||
<filename><replaceable>pkg</replaceable>/nix-support/setup-hook</filename>
|
<filename><emphasis>pkg</emphasis>/nix-support/setup-hook</filename>
|
||||||
of all dependencies. These “setup hooks” can then set up whatever
|
of all dependencies. These “setup hooks” can then set up whatever
|
||||||
environment variables they want; for instance, the setup hook for
|
environment variables they want; for instance, the setup hook for
|
||||||
Perl sets the <literal>PERL5LIB</literal> environment variable to
|
Perl sets the <literal>PERL5LIB</literal> environment variable to
|
||||||
|
|
|
@ -137,7 +137,7 @@ while defining a set.</para>
|
||||||
<para>Functions have the following form:
|
<para>Functions have the following form:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<replaceable>pattern</replaceable>: <replaceable>body</replaceable></programlisting>
|
<emphasis>pattern</emphasis>: <emphasis>body</emphasis></programlisting>
|
||||||
|
|
||||||
The pattern specifies what the argument of the function must look
|
The pattern specifies what the argument of the function must look
|
||||||
like, and binds variables in the body to (parts of) the
|
like, and binds variables in the body to (parts of) the
|
||||||
|
@ -190,9 +190,9 @@ map (concat "foo") [ "bar" "bla" "abc" ]</programlisting>
|
||||||
<para>It is possible to provide <emphasis>default values</emphasis>
|
<para>It is possible to provide <emphasis>default values</emphasis>
|
||||||
for attributes, in which case they are allowed to be missing. A
|
for attributes, in which case they are allowed to be missing. A
|
||||||
default value is specified by writing
|
default value is specified by writing
|
||||||
<literal><replaceable>name</replaceable> ?
|
<literal><emphasis>name</emphasis> ?
|
||||||
<replaceable>e</replaceable></literal>, where
|
<emphasis>e</emphasis></literal>, where
|
||||||
<replaceable>e</replaceable> is an arbitrary expression. For example,
|
<emphasis>e</emphasis> is an arbitrary expression. For example,
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
{ x, y ? "foo", z ? "bar" }: z + y + x</programlisting>
|
{ x, y ? "foo", z ? "bar" }: z + y + x</programlisting>
|
||||||
|
@ -256,9 +256,9 @@ in concat { x = "foo"; y = "bar"; }</programlisting>
|
||||||
<para>Conditionals look like this:
|
<para>Conditionals look like this:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
if <replaceable>e1</replaceable> then <replaceable>e2</replaceable> else <replaceable>e3</replaceable></programlisting>
|
if <emphasis>e1</emphasis> then <emphasis>e2</emphasis> else <emphasis>e3</emphasis></programlisting>
|
||||||
|
|
||||||
where <replaceable>e1</replaceable> is an expression that should
|
where <emphasis>e1</emphasis> is an expression that should
|
||||||
evaluate to a Boolean value (<literal>true</literal> or
|
evaluate to a Boolean value (<literal>true</literal> or
|
||||||
<literal>false</literal>).</para>
|
<literal>false</literal>).</para>
|
||||||
|
|
||||||
|
@ -271,11 +271,11 @@ evaluate to a Boolean value (<literal>true</literal> or
|
||||||
on or between features and dependencies hold. They look like this:
|
on or between features and dependencies hold. They look like this:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
assert <replaceable>e1</replaceable>; <replaceable>e2</replaceable></programlisting>
|
assert <emphasis>e1</emphasis>; <emphasis>e2</emphasis></programlisting>
|
||||||
|
|
||||||
where <replaceable>e1</replaceable> is an expression that should
|
where <emphasis>e1</emphasis> is an expression that should
|
||||||
evaluate to a Boolean value. If it evaluates to
|
evaluate to a Boolean value. If it evaluates to
|
||||||
<literal>true</literal>, <replaceable>e2</replaceable> is returned;
|
<literal>true</literal>, <emphasis>e2</emphasis> is returned;
|
||||||
otherwise expression evaluation is aborted and a backtrace is printed.</para>
|
otherwise expression evaluation is aborted and a backtrace is printed.</para>
|
||||||
|
|
||||||
<para>Here is a Nix expression for the Subversion package that shows
|
<para>Here is a Nix expression for the Subversion package that shows
|
||||||
|
@ -358,10 +358,10 @@ stdenv.mkDerivation {
|
||||||
<para>A <emphasis>with-expression</emphasis>,
|
<para>A <emphasis>with-expression</emphasis>,
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
with <replaceable>e1</replaceable>; <replaceable>e2</replaceable></programlisting>
|
with <emphasis>e1</emphasis>; <emphasis>e2</emphasis></programlisting>
|
||||||
|
|
||||||
introduces the set <replaceable>e1</replaceable> into the lexical
|
introduces the set <emphasis>e1</emphasis> into the lexical
|
||||||
scope of the expression <replaceable>e2</replaceable>. For instance,
|
scope of the expression <emphasis>e2</emphasis>. For instance,
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
let as = { x = "foo"; y = "bar"; };
|
let as = { x = "foo"; y = "bar"; };
|
||||||
|
|
|
@ -25,48 +25,48 @@ weakest binding).</para>
|
||||||
<tbody>
|
<tbody>
|
||||||
<row>
|
<row>
|
||||||
<entry>Select</entry>
|
<entry>Select</entry>
|
||||||
<entry><replaceable>e</replaceable> <literal>.</literal>
|
<entry><emphasis>e</emphasis> <literal>.</literal>
|
||||||
<replaceable>attrpath</replaceable>
|
<emphasis>attrpath</emphasis>
|
||||||
[ <literal>or</literal> <replaceable>def</replaceable> ]
|
[ <literal>or</literal> <emphasis>def</emphasis> ]
|
||||||
</entry>
|
</entry>
|
||||||
<entry>none</entry>
|
<entry>none</entry>
|
||||||
<entry>Select attribute denoted by the attribute path
|
<entry>Select attribute denoted by the attribute path
|
||||||
<replaceable>attrpath</replaceable> from set
|
<emphasis>attrpath</emphasis> from set
|
||||||
<replaceable>e</replaceable>. (An attribute path is a
|
<emphasis>e</emphasis>. (An attribute path is a
|
||||||
dot-separated list of attribute names.) If the attribute
|
dot-separated list of attribute names.) If the attribute
|
||||||
doesn’t exist, return <replaceable>def</replaceable> if
|
doesn’t exist, return <emphasis>def</emphasis> if
|
||||||
provided, otherwise abort evaluation.</entry>
|
provided, otherwise abort evaluation.</entry>
|
||||||
<entry>1</entry>
|
<entry>1</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>Application</entry>
|
<entry>Application</entry>
|
||||||
<entry><replaceable>e1</replaceable> <replaceable>e2</replaceable></entry>
|
<entry><emphasis>e1</emphasis> <emphasis>e2</emphasis></entry>
|
||||||
<entry>left</entry>
|
<entry>left</entry>
|
||||||
<entry>Call function <replaceable>e1</replaceable> with
|
<entry>Call function <emphasis>e1</emphasis> with
|
||||||
argument <replaceable>e2</replaceable>.</entry>
|
argument <emphasis>e2</emphasis>.</entry>
|
||||||
<entry>2</entry>
|
<entry>2</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>Arithmetic Negation</entry>
|
<entry>Arithmetic Negation</entry>
|
||||||
<entry><literal>-</literal> <replaceable>e</replaceable></entry>
|
<entry><literal>-</literal> <emphasis>e</emphasis></entry>
|
||||||
<entry>none</entry>
|
<entry>none</entry>
|
||||||
<entry>Arithmetic negation.</entry>
|
<entry>Arithmetic negation.</entry>
|
||||||
<entry>3</entry>
|
<entry>3</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>Has Attribute</entry>
|
<entry>Has Attribute</entry>
|
||||||
<entry><replaceable>e</replaceable> <literal>?</literal>
|
<entry><emphasis>e</emphasis> <literal>?</literal>
|
||||||
<replaceable>attrpath</replaceable></entry>
|
<emphasis>attrpath</emphasis></entry>
|
||||||
<entry>none</entry>
|
<entry>none</entry>
|
||||||
<entry>Test whether set <replaceable>e</replaceable> contains
|
<entry>Test whether set <emphasis>e</emphasis> contains
|
||||||
the attribute denoted by <replaceable>attrpath</replaceable>;
|
the attribute denoted by <emphasis>attrpath</emphasis>;
|
||||||
return <literal>true</literal> or
|
return <literal>true</literal> or
|
||||||
<literal>false</literal>.</entry>
|
<literal>false</literal>.</entry>
|
||||||
<entry>4</entry>
|
<entry>4</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>List Concatenation</entry>
|
<entry>List Concatenation</entry>
|
||||||
<entry><replaceable>e1</replaceable> <literal>++</literal> <replaceable>e2</replaceable></entry>
|
<entry><emphasis>e1</emphasis> <literal>++</literal> <emphasis>e2</emphasis></entry>
|
||||||
<entry>right</entry>
|
<entry>right</entry>
|
||||||
<entry>List concatenation.</entry>
|
<entry>List concatenation.</entry>
|
||||||
<entry>5</entry>
|
<entry>5</entry>
|
||||||
|
@ -74,7 +74,7 @@ weakest binding).</para>
|
||||||
<row>
|
<row>
|
||||||
<entry>Multiplication</entry>
|
<entry>Multiplication</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<replaceable>e1</replaceable> <literal>*</literal> <replaceable>e2</replaceable>,
|
<emphasis>e1</emphasis> <literal>*</literal> <emphasis>e2</emphasis>,
|
||||||
</entry>
|
</entry>
|
||||||
<entry>left</entry>
|
<entry>left</entry>
|
||||||
<entry>Arithmetic multiplication.</entry>
|
<entry>Arithmetic multiplication.</entry>
|
||||||
|
@ -83,7 +83,7 @@ weakest binding).</para>
|
||||||
<row>
|
<row>
|
||||||
<entry>Division</entry>
|
<entry>Division</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<replaceable>e1</replaceable> <literal>/</literal> <replaceable>e2</replaceable>
|
<emphasis>e1</emphasis> <literal>/</literal> <emphasis>e2</emphasis>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>left</entry>
|
<entry>left</entry>
|
||||||
<entry>Arithmetic division.</entry>
|
<entry>Arithmetic division.</entry>
|
||||||
|
@ -92,7 +92,7 @@ weakest binding).</para>
|
||||||
<row>
|
<row>
|
||||||
<entry>Addition</entry>
|
<entry>Addition</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<replaceable>e1</replaceable> <literal>+</literal> <replaceable>e2</replaceable>
|
<emphasis>e1</emphasis> <literal>+</literal> <emphasis>e2</emphasis>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>left</entry>
|
<entry>left</entry>
|
||||||
<entry>Arithmetic addition.</entry>
|
<entry>Arithmetic addition.</entry>
|
||||||
|
@ -101,7 +101,7 @@ weakest binding).</para>
|
||||||
<row>
|
<row>
|
||||||
<entry>Subtraction</entry>
|
<entry>Subtraction</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<replaceable>e1</replaceable> <literal>-</literal> <replaceable>e2</replaceable>
|
<emphasis>e1</emphasis> <literal>-</literal> <emphasis>e2</emphasis>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>left</entry>
|
<entry>left</entry>
|
||||||
<entry>Arithmetic subtraction.</entry>
|
<entry>Arithmetic subtraction.</entry>
|
||||||
|
@ -110,7 +110,7 @@ weakest binding).</para>
|
||||||
<row>
|
<row>
|
||||||
<entry>String Concatenation</entry>
|
<entry>String Concatenation</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<replaceable>string1</replaceable> <literal>+</literal> <replaceable>string2</replaceable>
|
<emphasis>string1</emphasis> <literal>+</literal> <emphasis>string2</emphasis>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>left</entry>
|
<entry>left</entry>
|
||||||
<entry>String concatenation.</entry>
|
<entry>String concatenation.</entry>
|
||||||
|
@ -118,19 +118,19 @@ weakest binding).</para>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>Not</entry>
|
<entry>Not</entry>
|
||||||
<entry><literal>!</literal> <replaceable>e</replaceable></entry>
|
<entry><literal>!</literal> <emphasis>e</emphasis></entry>
|
||||||
<entry>none</entry>
|
<entry>none</entry>
|
||||||
<entry>Boolean negation.</entry>
|
<entry>Boolean negation.</entry>
|
||||||
<entry>8</entry>
|
<entry>8</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>Update</entry>
|
<entry>Update</entry>
|
||||||
<entry><replaceable>e1</replaceable> <literal>//</literal>
|
<entry><emphasis>e1</emphasis> <literal>//</literal>
|
||||||
<replaceable>e2</replaceable></entry>
|
<emphasis>e2</emphasis></entry>
|
||||||
<entry>right</entry>
|
<entry>right</entry>
|
||||||
<entry>Return a set consisting of the attributes in
|
<entry>Return a set consisting of the attributes in
|
||||||
<replaceable>e1</replaceable> and
|
<emphasis>e1</emphasis> and
|
||||||
<replaceable>e2</replaceable> (with the latter taking
|
<emphasis>e2</emphasis> (with the latter taking
|
||||||
precedence over the former in case of equally named
|
precedence over the former in case of equally named
|
||||||
attributes).</entry>
|
attributes).</entry>
|
||||||
<entry>9</entry>
|
<entry>9</entry>
|
||||||
|
@ -138,7 +138,7 @@ weakest binding).</para>
|
||||||
<row>
|
<row>
|
||||||
<entry>Less Than</entry>
|
<entry>Less Than</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<replaceable>e1</replaceable> <literal><</literal> <replaceable>e2</replaceable>,
|
<emphasis>e1</emphasis> <literal><</literal> <emphasis>e2</emphasis>,
|
||||||
</entry>
|
</entry>
|
||||||
<entry>none</entry>
|
<entry>none</entry>
|
||||||
<entry>Arithmetic comparison.</entry>
|
<entry>Arithmetic comparison.</entry>
|
||||||
|
@ -147,7 +147,7 @@ weakest binding).</para>
|
||||||
<row>
|
<row>
|
||||||
<entry>Less Than or Equal To</entry>
|
<entry>Less Than or Equal To</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<replaceable>e1</replaceable> <literal><=</literal> <replaceable>e2</replaceable>
|
<emphasis>e1</emphasis> <literal><=</literal> <emphasis>e2</emphasis>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>none</entry>
|
<entry>none</entry>
|
||||||
<entry>Arithmetic comparison.</entry>
|
<entry>Arithmetic comparison.</entry>
|
||||||
|
@ -156,7 +156,7 @@ weakest binding).</para>
|
||||||
<row>
|
<row>
|
||||||
<entry>Greater Than</entry>
|
<entry>Greater Than</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<replaceable>e1</replaceable> <literal>></literal> <replaceable>e2</replaceable>
|
<emphasis>e1</emphasis> <literal>></literal> <emphasis>e2</emphasis>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>none</entry>
|
<entry>none</entry>
|
||||||
<entry>Arithmetic comparison.</entry>
|
<entry>Arithmetic comparison.</entry>
|
||||||
|
@ -165,7 +165,7 @@ weakest binding).</para>
|
||||||
<row>
|
<row>
|
||||||
<entry>Greater Than or Equal To</entry>
|
<entry>Greater Than or Equal To</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<replaceable>e1</replaceable> <literal>>=</literal> <replaceable>e2</replaceable>
|
<emphasis>e1</emphasis> <literal>>=</literal> <emphasis>e2</emphasis>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>none</entry>
|
<entry>none</entry>
|
||||||
<entry>Arithmetic comparison.</entry>
|
<entry>Arithmetic comparison.</entry>
|
||||||
|
@ -174,7 +174,7 @@ weakest binding).</para>
|
||||||
<row>
|
<row>
|
||||||
<entry>Equality</entry>
|
<entry>Equality</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<replaceable>e1</replaceable> <literal>==</literal> <replaceable>e2</replaceable>
|
<emphasis>e1</emphasis> <literal>==</literal> <emphasis>e2</emphasis>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>none</entry>
|
<entry>none</entry>
|
||||||
<entry>Equality.</entry>
|
<entry>Equality.</entry>
|
||||||
|
@ -183,7 +183,7 @@ weakest binding).</para>
|
||||||
<row>
|
<row>
|
||||||
<entry>Inequality</entry>
|
<entry>Inequality</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<replaceable>e1</replaceable> <literal>!=</literal> <replaceable>e2</replaceable>
|
<emphasis>e1</emphasis> <literal>!=</literal> <emphasis>e2</emphasis>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>none</entry>
|
<entry>none</entry>
|
||||||
<entry>Inequality.</entry>
|
<entry>Inequality.</entry>
|
||||||
|
@ -191,28 +191,28 @@ weakest binding).</para>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>Logical AND</entry>
|
<entry>Logical AND</entry>
|
||||||
<entry><replaceable>e1</replaceable> <literal>&&</literal>
|
<entry><emphasis>e1</emphasis> <literal>&&</literal>
|
||||||
<replaceable>e2</replaceable></entry>
|
<emphasis>e2</emphasis></entry>
|
||||||
<entry>left</entry>
|
<entry>left</entry>
|
||||||
<entry>Logical AND.</entry>
|
<entry>Logical AND.</entry>
|
||||||
<entry>12</entry>
|
<entry>12</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>Logical OR</entry>
|
<entry>Logical OR</entry>
|
||||||
<entry><replaceable>e1</replaceable> <literal>||</literal>
|
<entry><emphasis>e1</emphasis> <literal>||</literal>
|
||||||
<replaceable>e2</replaceable></entry>
|
<emphasis>e2</emphasis></entry>
|
||||||
<entry>left</entry>
|
<entry>left</entry>
|
||||||
<entry>Logical OR.</entry>
|
<entry>Logical OR.</entry>
|
||||||
<entry>13</entry>
|
<entry>13</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>Logical Implication</entry>
|
<entry>Logical Implication</entry>
|
||||||
<entry><replaceable>e1</replaceable> <literal>-></literal>
|
<entry><emphasis>e1</emphasis> <literal>-></literal>
|
||||||
<replaceable>e2</replaceable></entry>
|
<emphasis>e2</emphasis></entry>
|
||||||
<entry>none</entry>
|
<entry>none</entry>
|
||||||
<entry>Logical implication (equivalent to
|
<entry>Logical implication (equivalent to
|
||||||
<literal>!<replaceable>e1</replaceable> ||
|
<literal>!<emphasis>e1</emphasis> ||
|
||||||
<replaceable>e2</replaceable></literal>).</entry>
|
<emphasis>e2</emphasis></literal>).</entry>
|
||||||
<entry>14</entry>
|
<entry>14</entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
<para>You can include the result of an expression into a string by
|
<para>You can include the result of an expression into a string by
|
||||||
enclosing it in
|
enclosing it in
|
||||||
<literal>${<replaceable>...</replaceable>}</literal>, a feature
|
<literal>${<emphasis>...</emphasis>}</literal>, a feature
|
||||||
known as <emphasis>antiquotation</emphasis>. The enclosed
|
known as <emphasis>antiquotation</emphasis>. The enclosed
|
||||||
expression must evaluate to something that can be coerced into a
|
expression must evaluate to something that can be coerced into a
|
||||||
string (meaning that it must be a string, a path, or a
|
string (meaning that it must be a string, a path, or a
|
||||||
|
@ -93,7 +93,7 @@ configureFlags = "
|
||||||
text on the initial line.</para>
|
text on the initial line.</para>
|
||||||
|
|
||||||
<para>Antiquotation
|
<para>Antiquotation
|
||||||
(<literal>${<replaceable>expr</replaceable>}</literal>) is
|
(<literal>${<emphasis>expr</emphasis>}</literal>) is
|
||||||
supported in indented strings.</para>
|
supported in indented strings.</para>
|
||||||
|
|
||||||
<para>Since <literal>${</literal> and <literal>''</literal> have
|
<para>Since <literal>${</literal> and <literal>''</literal> have
|
||||||
|
@ -119,7 +119,7 @@ configureFlags = "
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
<replaceable>...</replaceable>
|
<emphasis>...</emphasis>
|
||||||
postInstall =
|
postInstall =
|
||||||
''
|
''
|
||||||
mkdir $out/bin $out/etc
|
mkdir $out/bin $out/etc
|
||||||
|
@ -127,7 +127,7 @@ stdenv.mkDerivation {
|
||||||
echo "Hello World" > $out/etc/foo.conf
|
echo "Hello World" > $out/etc/foo.conf
|
||||||
${if enableBar then "cp bar $out/bin" else ""}
|
${if enableBar then "cp bar $out/bin" else ""}
|
||||||
'';
|
'';
|
||||||
<replaceable>...</replaceable>
|
<emphasis>...</emphasis>
|
||||||
}
|
}
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ building path `/nix/store/632d2b22514d...-hello-2.1.1'
|
||||||
hello-2.1.1/
|
hello-2.1.1/
|
||||||
hello-2.1.1/intl/
|
hello-2.1.1/intl/
|
||||||
hello-2.1.1/intl/ChangeLog
|
hello-2.1.1/intl/ChangeLog
|
||||||
<replaceable>...</replaceable>
|
<emphasis>...</emphasis>
|
||||||
|
|
||||||
$ ls -l result
|
$ ls -l result
|
||||||
lrwxrwxrwx ... 2006-09-29 10:43 result -> /nix/store/632d2b22514d...-hello-2.1.1
|
lrwxrwxrwx ... 2006-09-29 10:43 result -> /nix/store/632d2b22514d...-hello-2.1.1
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
following commands:
|
following commands:
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
$ ./configure <replaceable>options...</replaceable>
|
$ ./configure <emphasis>options...</emphasis>
|
||||||
$ make
|
$ make
|
||||||
$ make install</screen>
|
$ make install</screen>
|
||||||
|
|
||||||
|
@ -26,16 +26,16 @@ $ ./bootstrap.sh</screen>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>The installation path can be specified by passing the
|
<para>The installation path can be specified by passing the
|
||||||
<option>--prefix=<replaceable>prefix</replaceable></option> to
|
<option>--prefix=<emphasis>prefix</emphasis></option> to
|
||||||
<command>configure</command>. The default installation directory is
|
<command>configure</command>. The default installation directory is
|
||||||
<filename>/usr/local</filename>. You can change this to any location
|
<filename>/usr/local</filename>. You can change this to any location
|
||||||
you like. You must have write permission to the
|
you like. You must have write permission to the
|
||||||
<replaceable>prefix</replaceable> path.</para>
|
<emphasis>prefix</emphasis> path.</para>
|
||||||
|
|
||||||
<para>Nix keeps its <emphasis>store</emphasis> (the place where
|
<para>Nix keeps its <emphasis>store</emphasis> (the place where
|
||||||
packages are stored) in <filename>/nix/store</filename> by default.
|
packages are stored) in <filename>/nix/store</filename> by default.
|
||||||
This can be changed using
|
This can be changed using
|
||||||
<option>--with-store-dir=<replaceable>path</replaceable></option>.</para>
|
<option>--with-store-dir=<emphasis>path</emphasis></option>.</para>
|
||||||
|
|
||||||
<warning><para>It is best <emphasis>not</emphasis> to change the Nix
|
<warning><para>It is best <emphasis>not</emphasis> to change the Nix
|
||||||
store from its default, since doing so makes it impossible to use
|
store from its default, since doing so makes it impossible to use
|
||||||
|
@ -44,6 +44,6 @@ packages will need to be built from source.</para></warning>
|
||||||
|
|
||||||
<para>Nix keeps state (such as its database and log files) in
|
<para>Nix keeps state (such as its database and log files) in
|
||||||
<filename>/nix/var</filename> by default. This can be changed using
|
<filename>/nix/var</filename> by default. This can be changed using
|
||||||
<option>--localstatedir=<replaceable>path</replaceable></option>.</para>
|
<option>--localstatedir=<emphasis>path</emphasis></option>.</para>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -8,18 +8,18 @@
|
||||||
|
|
||||||
<para>To use Nix, some environment variables should be set. In
|
<para>To use Nix, some environment variables should be set. In
|
||||||
particular, <literal>PATH</literal> should contain the directories
|
particular, <literal>PATH</literal> should contain the directories
|
||||||
<filename><replaceable>prefix</replaceable>/bin</filename> and
|
<filename><emphasis>prefix</emphasis>/bin</filename> and
|
||||||
<filename>~/.nix-profile/bin</filename>. The first directory contains
|
<filename>~/.nix-profile/bin</filename>. The first directory contains
|
||||||
the Nix tools themselves, while <filename>~/.nix-profile</filename> is
|
the Nix tools themselves, while <filename>~/.nix-profile</filename> is
|
||||||
a symbolic link to the current <emphasis>user environment</emphasis>
|
a symbolic link to the current <emphasis>user environment</emphasis>
|
||||||
(an automatically generated package consisting of symlinks to
|
(an automatically generated package consisting of symlinks to
|
||||||
installed packages). The simplest way to set the required environment
|
installed packages). The simplest way to set the required environment
|
||||||
variables is to include the file
|
variables is to include the file
|
||||||
<filename><replaceable>prefix</replaceable>/etc/profile.d/nix.sh</filename>
|
<filename><emphasis>prefix</emphasis>/etc/profile.d/nix.sh</filename>
|
||||||
in your <filename>~/.profile</filename> (or similar), like this:</para>
|
in your <filename>~/.profile</filename> (or similar), like this:</para>
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
source <replaceable>prefix</replaceable>/etc/profile.d/nix.sh</screen>
|
source <emphasis>prefix</emphasis>/etc/profile.d/nix.sh</screen>
|
||||||
|
|
||||||
<section xml:id="sec-nix-ssl-cert-file">
|
<section xml:id="sec-nix-ssl-cert-file">
|
||||||
|
|
||||||
|
|
|
@ -421,7 +421,7 @@ LABEL=Nix\040Store /nix apfs rw,nobrowse
|
||||||
<para>
|
<para>
|
||||||
NixOS.org hosts version-specific installation URLs for all Nix
|
NixOS.org hosts version-specific installation URLs for all Nix
|
||||||
versions since 1.11.16, at
|
versions since 1.11.16, at
|
||||||
<literal>https://releases.nixos.org/nix/nix-<replaceable>version</replaceable>/install</literal>.
|
<literal>https://releases.nixos.org/nix/nix-<emphasis>version</emphasis>/install</literal>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
<title>Single-User Mode</title>
|
<title>Single-User Mode</title>
|
||||||
|
|
||||||
<para>In single-user mode, all Nix operations that access the database
|
<para>In single-user mode, all Nix operations that access the database
|
||||||
in <filename><replaceable>prefix</replaceable>/var/nix/db</filename>
|
in <filename><emphasis>prefix</emphasis>/var/nix/db</filename>
|
||||||
or modify the Nix store in
|
or modify the Nix store in
|
||||||
<filename><replaceable>prefix</replaceable>/store</filename> must be
|
<filename><emphasis>prefix</emphasis>/store</filename> must be
|
||||||
performed under the user ID that owns those directories. This is
|
performed under the user ID that owns those directories. This is
|
||||||
typically <systemitem class="username">root</systemitem>. (If you
|
typically <systemitem class="username">root</systemitem>. (If you
|
||||||
install from RPM packages, that’s in fact the default ownership.)
|
install from RPM packages, that’s in fact the default ownership.)
|
||||||
|
|
|
@ -99,7 +99,7 @@ there after an upgrade. This means that you can <emphasis>roll
|
||||||
back</emphasis> to the old version:</para>
|
back</emphasis> to the old version:</para>
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
$ nix-env --upgrade <replaceable>some-packages</replaceable>
|
$ nix-env --upgrade <emphasis>some-packages</emphasis>
|
||||||
$ nix-env --rollback
|
$ nix-env --rollback
|
||||||
</screen>
|
</screen>
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ docbook-xml-4.5
|
||||||
firefox-33.0.2
|
firefox-33.0.2
|
||||||
hello-2.9
|
hello-2.9
|
||||||
libxslt-1.1.28
|
libxslt-1.1.28
|
||||||
<replaceable>...</replaceable></screen>
|
<emphasis>...</emphasis></screen>
|
||||||
|
|
||||||
</para></step>
|
</para></step>
|
||||||
|
|
||||||
|
|
|
@ -74,10 +74,10 @@ then you need to pass the path to your Nixpkgs tree using the
|
||||||
<option>-f</option> flag:
|
<option>-f</option> flag:
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
$ nix-env -qaf <replaceable>/path/to/nixpkgs</replaceable>
|
$ nix-env -qaf <emphasis>/path/to/nixpkgs</emphasis>
|
||||||
</screen>
|
</screen>
|
||||||
|
|
||||||
where <replaceable>/path/to/nixpkgs</replaceable> is where you’ve
|
where <emphasis>/path/to/nixpkgs</emphasis> is where you’ve
|
||||||
unpacked or checked out Nixpkgs.</para>
|
unpacked or checked out Nixpkgs.</para>
|
||||||
|
|
||||||
<para>You can select specific packages by name:
|
<para>You can select specific packages by name:
|
||||||
|
|
|
@ -45,7 +45,7 @@ $ nix-channel --remove nixpkgs
|
||||||
$ nix-channel --update</screen>
|
$ nix-channel --update</screen>
|
||||||
|
|
||||||
This downloads and unpacks the Nix expressions in every channel
|
This downloads and unpacks the Nix expressions in every channel
|
||||||
(downloaded from <literal><replaceable>url</replaceable>/nixexprs.tar.bz2</literal>).
|
(downloaded from <literal><emphasis>url</emphasis>/nixexprs.tar.bz2</literal>).
|
||||||
It also makes the union of each channel’s Nix expressions available by
|
It also makes the union of each channel’s Nix expressions available by
|
||||||
default to <command>nix-env</command> operations (via the symlink
|
default to <command>nix-env</command> operations (via the symlink
|
||||||
<filename>~/.nix-defexpr/channels</filename>). Consequently, you can
|
<filename>~/.nix-defexpr/channels</filename>). Consequently, you can
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
<para>The roots of the garbage collector are all store paths to which
|
<para>The roots of the garbage collector are all store paths to which
|
||||||
there are symlinks in the directory
|
there are symlinks in the directory
|
||||||
<filename><replaceable>prefix</replaceable>/nix/var/nix/gcroots</filename>.
|
<filename><emphasis>prefix</emphasis>/nix/var/nix/gcroots</filename>.
|
||||||
For instance, the following command makes the path
|
For instance, the following command makes the path
|
||||||
<filename>/nix/store/d718ef...-foo</filename> a root of the collector:
|
<filename>/nix/store/d718ef...-foo</filename> a root of the collector:
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ That is, after this command, the garbage collector will not remove
|
||||||
dependencies.</para>
|
dependencies.</para>
|
||||||
|
|
||||||
<para>Subdirectories of
|
<para>Subdirectories of
|
||||||
<filename><replaceable>prefix</replaceable>/nix/var/nix/gcroots</filename>
|
<filename><emphasis>prefix</emphasis>/nix/var/nix/gcroots</filename>
|
||||||
are also searched for symlinks. Symlinks to non-store paths are
|
are also searched for symlinks. Symlinks to non-store paths are
|
||||||
followed and searched for roots, but symlinks to non-store paths
|
followed and searched for roots, but symlinks to non-store paths
|
||||||
<emphasis>inside</emphasis> the paths reached in that way are not
|
<emphasis>inside</emphasis> the paths reached in that way are not
|
||||||
|
|
|
@ -118,7 +118,7 @@ can also see all available generations:
|
||||||
$ nix-env --list-generations</screen></para>
|
$ nix-env --list-generations</screen></para>
|
||||||
|
|
||||||
<para>You generally wouldn’t have
|
<para>You generally wouldn’t have
|
||||||
<filename>/nix/var/nix/profiles/<replaceable>some-profile</replaceable>/bin</filename>
|
<filename>/nix/var/nix/profiles/<emphasis>some-profile</emphasis>/bin</filename>
|
||||||
in your <literal>PATH</literal>. Rather, there is a symlink
|
in your <literal>PATH</literal>. Rather, there is a symlink
|
||||||
<filename>~/.nix-profile</filename> that points to your current
|
<filename>~/.nix-profile</filename> that points to your current
|
||||||
profile. This means that you should put
|
profile. This means that you should put
|
||||||
|
|
|
@ -46,9 +46,9 @@ irreversible.</para></warning>
|
||||||
<literal>\*</literal>.</para></listitem>
|
<literal>\*</literal>.</para></listitem>
|
||||||
|
|
||||||
<listitem><para><literal>nix-env -i
|
<listitem><para><literal>nix-env -i
|
||||||
<replaceable>pkgname</replaceable></literal> will now install
|
<emphasis>pkgname</emphasis></literal> will now install
|
||||||
the highest available version of
|
the highest available version of
|
||||||
<replaceable>pkgname</replaceable>, rather than installing all
|
<emphasis>pkgname</emphasis>, rather than installing all
|
||||||
available versions (which would probably give collisions)
|
available versions (which would probably give collisions)
|
||||||
(<literal>NIX-31</literal>).</para></listitem>
|
(<literal>NIX-31</literal>).</para></listitem>
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ irreversible.</para></warning>
|
||||||
"--with-freetype2-library=${freetype}/lib"</programlisting>
|
"--with-freetype2-library=${freetype}/lib"</programlisting>
|
||||||
|
|
||||||
You can write arbitrary expressions within
|
You can write arbitrary expressions within
|
||||||
<literal>${<replaceable>...</replaceable>}</literal>, not just
|
<literal>${<emphasis>...</emphasis>}</literal>, not just
|
||||||
identifiers.</para></listitem>
|
identifiers.</para></listitem>
|
||||||
|
|
||||||
<listitem><para>Multi-line string literals.</para></listitem>
|
<listitem><para>Multi-line string literals.</para></listitem>
|
||||||
|
@ -163,7 +163,7 @@ irreversible.</para></warning>
|
||||||
attribute set are unique.) For instance, a quick way to perform a
|
attribute set are unique.) For instance, a quick way to perform a
|
||||||
test build of a package in Nixpkgs is <literal>nix-build
|
test build of a package in Nixpkgs is <literal>nix-build
|
||||||
pkgs/top-level/all-packages.nix -A
|
pkgs/top-level/all-packages.nix -A
|
||||||
<replaceable>foo</replaceable></literal>. <literal>nix-env -q
|
<emphasis>foo</emphasis></literal>. <literal>nix-env -q
|
||||||
--attr</literal> shows the attribute names corresponding to each
|
--attr</literal> shows the attribute names corresponding to each
|
||||||
derivation.</para></listitem>
|
derivation.</para></listitem>
|
||||||
|
|
||||||
|
@ -173,13 +173,13 @@ irreversible.</para></warning>
|
||||||
<command>nix-build</command> evaluates to a function whose arguments
|
<command>nix-build</command> evaluates to a function whose arguments
|
||||||
all have default values, the function will be called automatically.
|
all have default values, the function will be called automatically.
|
||||||
Also, the new command-line switch <option>--arg
|
Also, the new command-line switch <option>--arg
|
||||||
<replaceable>name</replaceable>
|
<emphasis>name</emphasis>
|
||||||
<replaceable>value</replaceable></option> can be used to specify
|
<emphasis>value</emphasis></option> can be used to specify
|
||||||
function arguments on the command line.</para></listitem>
|
function arguments on the command line.</para></listitem>
|
||||||
|
|
||||||
|
|
||||||
<listitem><para><literal>nix-install-package --url
|
<listitem><para><literal>nix-install-package --url
|
||||||
<replaceable>URL</replaceable></literal> allows a package to be
|
<emphasis>URL</emphasis></literal> allows a package to be
|
||||||
installed directly from the given URL.</para></listitem>
|
installed directly from the given URL.</para></listitem>
|
||||||
|
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ irreversible.</para></warning>
|
||||||
|
|
||||||
|
|
||||||
<listitem><para><literal>nix-build -o
|
<listitem><para><literal>nix-build -o
|
||||||
<replaceable>symlink</replaceable></literal> allows the symlink to
|
<emphasis>symlink</emphasis></literal> allows the symlink to
|
||||||
the build result to be named something other than
|
the build result to be named something other than
|
||||||
<literal>result</literal>.</para></listitem>
|
<literal>result</literal>.</para></listitem>
|
||||||
|
|
||||||
|
|
|
@ -59,17 +59,17 @@ $ rm __db* log.* derivers references referrers reserved validpaths DB_CONFIG</sc
|
||||||
|
|
||||||
<listitem><para>The garbage collector has a number of new options to
|
<listitem><para>The garbage collector has a number of new options to
|
||||||
allow only some of the garbage to be deleted. The option
|
allow only some of the garbage to be deleted. The option
|
||||||
<option>--max-freed <replaceable>N</replaceable></option> tells the
|
<option>--max-freed <emphasis>N</emphasis></option> tells the
|
||||||
collector to stop after at least <replaceable>N</replaceable> bytes
|
collector to stop after at least <emphasis>N</emphasis> bytes
|
||||||
have been deleted. The option <option>--max-links
|
have been deleted. The option <option>--max-links
|
||||||
<replaceable>N</replaceable></option> tells it to stop after the
|
<emphasis>N</emphasis></option> tells it to stop after the
|
||||||
link count on <filename>/nix/store</filename> has dropped below
|
link count on <filename>/nix/store</filename> has dropped below
|
||||||
<replaceable>N</replaceable>. This is useful for very large Nix
|
<emphasis>N</emphasis>. This is useful for very large Nix
|
||||||
stores on filesystems with a 32000 subdirectories limit (like
|
stores on filesystems with a 32000 subdirectories limit (like
|
||||||
<literal>ext3</literal>). The option <option>--use-atime</option>
|
<literal>ext3</literal>). The option <option>--use-atime</option>
|
||||||
causes store paths to be deleted in order of ascending last access
|
causes store paths to be deleted in order of ascending last access
|
||||||
time. This allows non-recently used stuff to be deleted. The
|
time. This allows non-recently used stuff to be deleted. The
|
||||||
option <option>--max-atime <replaceable>time</replaceable></option>
|
option <option>--max-atime <emphasis>time</emphasis></option>
|
||||||
specifies an upper limit to the last accessed time of paths that may
|
specifies an upper limit to the last accessed time of paths that may
|
||||||
be deleted. For instance,
|
be deleted. For instance,
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ the following paths will be downloaded/copied (30.02 MiB):
|
||||||
<listitem><para>@-patterns as in Haskell. For instance, in a
|
<listitem><para>@-patterns as in Haskell. For instance, in a
|
||||||
function definition
|
function definition
|
||||||
|
|
||||||
<programlisting>f = args @ {x, y, z}: <replaceable>...</replaceable>;</programlisting>
|
<programlisting>f = args @ {x, y, z}: <emphasis>...</emphasis>;</programlisting>
|
||||||
|
|
||||||
<varname>args</varname> refers to the argument as a whole, which
|
<varname>args</varname> refers to the argument as a whole, which
|
||||||
is further pattern-matched against the attribute set pattern
|
is further pattern-matched against the attribute set pattern
|
||||||
|
@ -131,7 +131,7 @@ the following paths will be downloaded/copied (30.02 MiB):
|
||||||
takes <emphasis>at least</emphasis> the listed attributes, while
|
takes <emphasis>at least</emphasis> the listed attributes, while
|
||||||
ignoring additional attributes. For instance,
|
ignoring additional attributes. For instance,
|
||||||
|
|
||||||
<programlisting>{stdenv, fetchurl, fuse, ...}: <replaceable>...</replaceable></programlisting>
|
<programlisting>{stdenv, fetchurl, fuse, ...}: <emphasis>...</emphasis></programlisting>
|
||||||
|
|
||||||
defines a function that accepts any attribute set that includes
|
defines a function that accepts any attribute set that includes
|
||||||
at least the three listed attributes.</para></listitem>
|
at least the three listed attributes.</para></listitem>
|
||||||
|
@ -163,7 +163,7 @@ the following paths will be downloaded/copied (30.02 MiB):
|
||||||
<command>nix-pack-closure</command> and
|
<command>nix-pack-closure</command> and
|
||||||
<command>nix-unpack-closure</command>. You can do almost the same
|
<command>nix-unpack-closure</command>. You can do almost the same
|
||||||
thing but much more efficiently by doing <literal>nix-store --export
|
thing but much more efficiently by doing <literal>nix-store --export
|
||||||
$(nix-store -qR <replaceable>paths</replaceable>) > closure</literal> and
|
$(nix-store -qR <emphasis>paths</emphasis>) > closure</literal> and
|
||||||
<literal>nix-store --import <
|
<literal>nix-store --import <
|
||||||
closure</literal>.</para></listitem>
|
closure</literal>.</para></listitem>
|
||||||
|
|
||||||
|
|
|
@ -95,9 +95,9 @@ features:</para>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>The scoping rules for <literal>inherit
|
<para>The scoping rules for <literal>inherit
|
||||||
(<replaceable>e</replaceable>) ...</literal> in recursive
|
(<emphasis>e</emphasis>) ...</literal> in recursive
|
||||||
attribute sets have changed. The expression
|
attribute sets have changed. The expression
|
||||||
<replaceable>e</replaceable> can now refer to the attributes
|
<emphasis>e</emphasis> can now refer to the attributes
|
||||||
defined in the containing set.</para>
|
defined in the containing set.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
|
|
|
@ -27,14 +27,14 @@
|
||||||
2</command>), but this was not desirable because the number of
|
2</command>), but this was not desirable because the number of
|
||||||
actions to be performed in parallel was not configurable. Nix
|
actions to be performed in parallel was not configurable. Nix
|
||||||
now has an option <option>--cores
|
now has an option <option>--cores
|
||||||
<replaceable>N</replaceable></option> as well as a configuration
|
<emphasis>N</emphasis></option> as well as a configuration
|
||||||
setting <varname>build-cores =
|
setting <varname>build-cores =
|
||||||
<replaceable>N</replaceable></varname> that causes the
|
<emphasis>N</emphasis></varname> that causes the
|
||||||
environment variable <literal>NIX_BUILD_CORES</literal> to be set to
|
environment variable <literal>NIX_BUILD_CORES</literal> to be set to
|
||||||
<replaceable>N</replaceable> when the builder is invoked. The
|
<emphasis>N</emphasis> when the builder is invoked. The
|
||||||
builder can use this at its discretion to perform a parallel
|
builder can use this at its discretion to perform a parallel
|
||||||
build, e.g., by calling <command>make -j
|
build, e.g., by calling <command>make -j
|
||||||
<replaceable>N</replaceable></command>. In Nixpkgs, this can be
|
<emphasis>N</emphasis></command>. In Nixpkgs, this can be
|
||||||
enabled on a per-package basis by setting the derivation
|
enabled on a per-package basis by setting the derivation
|
||||||
attribute <varname>enableParallelBuilding</varname> to
|
attribute <varname>enableParallelBuilding</varname> to
|
||||||
<literal>true</literal>.
|
<literal>true</literal>.
|
||||||
|
|
|
@ -91,10 +91,10 @@
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
|
|
||||||
<listitem><para>New language construct: <literal>with
|
<listitem><para>New language construct: <literal>with
|
||||||
<replaceable>E1</replaceable>;
|
<emphasis>E1</emphasis>;
|
||||||
<replaceable>E2</replaceable></literal> brings all attributes
|
<emphasis>E2</emphasis></literal> brings all attributes
|
||||||
defined in the attribute set <replaceable>E1</replaceable> in
|
defined in the attribute set <emphasis>E1</emphasis> in
|
||||||
scope in <replaceable>E2</replaceable>.</para></listitem>
|
scope in <emphasis>E2</emphasis>.</para></listitem>
|
||||||
|
|
||||||
<listitem><para>Added a <function>map</function>
|
<listitem><para>Added a <function>map</function>
|
||||||
function.</para></listitem>
|
function.</para></listitem>
|
||||||
|
|
|
@ -33,7 +33,7 @@ is too old (i.e., for Nix <= 0.7)</screen>
|
||||||
|
|
||||||
then you should unsubscribe from the offending channel
|
then you should unsubscribe from the offending channel
|
||||||
(<command>nix-channel --remove
|
(<command>nix-channel --remove
|
||||||
<replaceable>URL</replaceable></command>; leave out
|
<emphasis>URL</emphasis></command>; leave out
|
||||||
<literal>/MANIFEST</literal>), and subscribe to the same URL, with
|
<literal>/MANIFEST</literal>), and subscribe to the same URL, with
|
||||||
<literal>channels</literal> replaced by <literal>channels-v3</literal>
|
<literal>channels</literal> replaced by <literal>channels-v3</literal>
|
||||||
(e.g., <link
|
(e.g., <link
|
||||||
|
@ -118,7 +118,7 @@ $ nix-store -q --referrers-closure \
|
||||||
subscribing to a channel.</para></listitem>
|
subscribing to a channel.</para></listitem>
|
||||||
|
|
||||||
<listitem><para><command>nix-store -r
|
<listitem><para><command>nix-store -r
|
||||||
<replaceable>PATHS</replaceable></command> now builds all the
|
<emphasis>PATHS</emphasis></command> now builds all the
|
||||||
derivations PATHS in parallel. Previously it did them sequentially
|
derivations PATHS in parallel. Previously it did them sequentially
|
||||||
(though exploiting possible parallelism between subderivations).
|
(though exploiting possible parallelism between subderivations).
|
||||||
This is nice for build farms.</para></listitem>
|
This is nice for build farms.</para></listitem>
|
||||||
|
|
|
@ -72,8 +72,8 @@
|
||||||
to get rid of the bootstrap binaries in the Nixpkgs source tree
|
to get rid of the bootstrap binaries in the Nixpkgs source tree
|
||||||
and download them instead. You can use it by doing
|
and download them instead. You can use it by doing
|
||||||
<literal>import <nix/fetchurl.nix> { url =
|
<literal>import <nix/fetchurl.nix> { url =
|
||||||
<replaceable>url</replaceable>; sha256 =
|
<emphasis>url</emphasis>; sha256 =
|
||||||
"<replaceable>hash</replaceable>"; }</literal>. (Shea Levy)</para>
|
"<emphasis>hash</emphasis>"; }</literal>. (Shea Levy)</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
|
|
|
@ -62,8 +62,8 @@ $ nix-prefetch-url -A nix-repl.src
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The new flag <option>--option build-repeat
|
The new flag <option>--option build-repeat
|
||||||
<replaceable>N</replaceable></option> will cause every build to
|
<emphasis>N</emphasis></option> will cause every build to
|
||||||
be executed <replaceable>N</replaceable>+1 times. If the build
|
be executed <emphasis>N</emphasis>+1 times. If the build
|
||||||
output differs between any round, the build is rejected, and the
|
output differs between any round, the build is rejected, and the
|
||||||
output paths are not registered as valid. This is primarily
|
output paths are not registered as valid. This is primarily
|
||||||
useful to verify build determinism. (We already had a
|
useful to verify build determinism. (We already had a
|
||||||
|
@ -78,11 +78,11 @@ $ nix-prefetch-url -A nix-repl.src
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The options <option>--check</option> and <option>--option
|
The options <option>--check</option> and <option>--option
|
||||||
build-repeat <replaceable>N</replaceable></option>, if they
|
build-repeat <emphasis>N</emphasis></option>, if they
|
||||||
detect a difference between two runs of the same derivation and
|
detect a difference between two runs of the same derivation and
|
||||||
<option>-K</option> is given, will make the output of the other
|
<option>-K</option> is given, will make the output of the other
|
||||||
run available under
|
run available under
|
||||||
<filename><replaceable>store-path</replaceable>-check</filename>. This
|
<filename><emphasis>store-path</emphasis>-check</filename>. This
|
||||||
makes it easier to investigate the non-determinism using tools
|
makes it easier to investigate the non-determinism using tools
|
||||||
like <command>diffoscope</command>, e.g.,
|
like <command>diffoscope</command>, e.g.,
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ outputs = [ "lib" "headers" "doc" ];
|
||||||
<literal>lib</literal>, <literal>headers</literal> and
|
<literal>lib</literal>, <literal>headers</literal> and
|
||||||
<literal>doc</literal>. Other packages can refer to a specific
|
<literal>doc</literal>. Other packages can refer to a specific
|
||||||
output by referring to
|
output by referring to
|
||||||
<literal><replaceable>pkg</replaceable>.<replaceable>output</replaceable></literal>,
|
<literal><emphasis>pkg</emphasis>.<emphasis>output</emphasis></literal>,
|
||||||
e.g.
|
e.g.
|
||||||
<programlisting>
|
<programlisting>
|
||||||
buildInputs = [ pkg.lib pkg.headers ];
|
buildInputs = [ pkg.lib pkg.headers ];
|
||||||
|
|
|
@ -20,8 +20,8 @@ xlink:href="https://github.com/NixOS/nix/commit/5526a282b5b44e9296e61e07d7d2626a
|
||||||
<function>builtins.hashString</function>.</para></listitem>
|
<function>builtins.hashString</function>.</para></listitem>
|
||||||
|
|
||||||
<listitem><para>Build logs are now stored in
|
<listitem><para>Build logs are now stored in
|
||||||
<filename>/nix/var/log/nix/drvs/<replaceable>XX</replaceable>/</filename>,
|
<filename>/nix/var/log/nix/drvs/<emphasis>XX</emphasis>/</filename>,
|
||||||
where <replaceable>XX</replaceable> is the first two characters of
|
where <emphasis>XX</emphasis> is the first two characters of
|
||||||
the derivation. This is useful on machines that keep a lot of build
|
the derivation. This is useful on machines that keep a lot of build
|
||||||
logs (such as Hydra servers).</para></listitem>
|
logs (such as Hydra servers).</para></listitem>
|
||||||
|
|
||||||
|
|
|
@ -19,15 +19,15 @@ are:</para>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Previously, Nix optimised expressions such as
|
<para>Previously, Nix optimised expressions such as
|
||||||
<literal>"${<replaceable>expr</replaceable>}"</literal> to
|
<literal>"${<emphasis>expr</emphasis>}"</literal> to
|
||||||
<replaceable>expr</replaceable>. Thus it neither checked whether
|
<emphasis>expr</emphasis>. Thus it neither checked whether
|
||||||
<replaceable>expr</replaceable> could be coerced to a string, nor
|
<emphasis>expr</emphasis> could be coerced to a string, nor
|
||||||
applied such coercions. This meant that
|
applied such coercions. This meant that
|
||||||
<literal>"${123}"</literal> evaluatued to <literal>123</literal>,
|
<literal>"${123}"</literal> evaluatued to <literal>123</literal>,
|
||||||
and <literal>"${./foo}"</literal> evaluated to
|
and <literal>"${./foo}"</literal> evaluated to
|
||||||
<literal>./foo</literal> (even though
|
<literal>./foo</literal> (even though
|
||||||
<literal>"${./foo} "</literal> evaluates to
|
<literal>"${./foo} "</literal> evaluates to
|
||||||
<literal>"/nix/store/<replaceable>hash</replaceable>-foo "</literal>).
|
<literal>"/nix/store/<emphasis>hash</emphasis>-foo "</literal>).
|
||||||
Nix now checks the type of antiquoted expressions and
|
Nix now checks the type of antiquoted expressions and
|
||||||
applies coercions.</para>
|
applies coercions.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
|
@ -34,7 +34,7 @@ following new features:</para>
|
||||||
<command>download-via-ssh</command>, that fetches binaries from
|
<command>download-via-ssh</command>, that fetches binaries from
|
||||||
remote machines via SSH. Specifying the flags <literal>--option
|
remote machines via SSH. Specifying the flags <literal>--option
|
||||||
use-ssh-substituter true --option ssh-substituter-hosts
|
use-ssh-substituter true --option ssh-substituter-hosts
|
||||||
<replaceable>user@hostname</replaceable></literal> will cause Nix
|
<emphasis>user@hostname</emphasis></literal> will cause Nix
|
||||||
to download binaries from the specified machine, if it has
|
to download binaries from the specified machine, if it has
|
||||||
them.</para>
|
them.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
@ -49,9 +49,9 @@ following new features:</para>
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
$ nix-build '<nixpkgs>' -A patchelf
|
$ nix-build '<nixpkgs>' -A patchelf
|
||||||
<replaceable>…</replaceable>
|
<emphasis>…</emphasis>
|
||||||
$ nix-build '<nixpkgs>' -A patchelf --check
|
$ nix-build '<nixpkgs>' -A patchelf --check
|
||||||
<replaceable>…</replaceable>
|
<emphasis>…</emphasis>
|
||||||
error: derivation `/nix/store/1ipvxs…-patchelf-0.6' may not be deterministic:
|
error: derivation `/nix/store/1ipvxs…-patchelf-0.6' may not be deterministic:
|
||||||
hash mismatch in output `/nix/store/4pc1dm…-patchelf-0.6.drv'
|
hash mismatch in output `/nix/store/4pc1dm…-patchelf-0.6.drv'
|
||||||
</screen>
|
</screen>
|
||||||
|
@ -173,11 +173,11 @@ $ nix-instantiate --eval '<nixos>' -A 'config.systemd.units."nscd.service".te
|
||||||
<listitem>
|
<listitem>
|
||||||
<para><command>nix-collect-garbage</command> has a new flag
|
<para><command>nix-collect-garbage</command> has a new flag
|
||||||
<option>--delete-older-than</option>
|
<option>--delete-older-than</option>
|
||||||
<replaceable>N</replaceable><literal>d</literal>, which deletes
|
<emphasis>N</emphasis><literal>d</literal>, which deletes
|
||||||
all user environment generations older than
|
all user environment generations older than
|
||||||
<replaceable>N</replaceable> days. Likewise, <command>nix-env
|
<emphasis>N</emphasis> days. Likewise, <command>nix-env
|
||||||
--delete-generations</command> accepts a
|
--delete-generations</command> accepts a
|
||||||
<replaceable>N</replaceable><literal>d</literal> age limit.</para>
|
<emphasis>N</emphasis><literal>d</literal> age limit.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
|
|
|
@ -38,8 +38,8 @@ log-servers = http://hydra.nixos.org/log
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
then it will try to get logs from
|
then it will try to get logs from
|
||||||
<literal>http://hydra.nixos.org/log/<replaceable>base name of the
|
<literal>http://hydra.nixos.org/log/<emphasis>base name of the
|
||||||
store path</replaceable></literal>. This allows you to do things like:
|
store path</emphasis></literal>. This allows you to do things like:
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
$ nix-store -l $(which xterm)
|
$ nix-store -l $(which xterm)
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
<para>The command <command>nix-push</command> has been removed as
|
<para>The command <command>nix-push</command> has been removed as
|
||||||
part of the effort to eliminate Nix's dependency on Perl. You can
|
part of the effort to eliminate Nix's dependency on Perl. You can
|
||||||
use <command>nix copy</command> instead, e.g. <literal>nix copy
|
use <command>nix copy</command> instead, e.g. <literal>nix copy
|
||||||
--to file:///tmp/my-binary-cache <replaceable>paths…</replaceable></literal></para>
|
--to file:///tmp/my-binary-cache <emphasis>paths…</emphasis></literal></para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
|
@ -136,8 +136,8 @@
|
||||||
http-connections 100</literal> you can write
|
http-connections 100</literal> you can write
|
||||||
<literal>--http-connections 100</literal>. Boolean options can
|
<literal>--http-connections 100</literal>. Boolean options can
|
||||||
be written as
|
be written as
|
||||||
<literal>--<replaceable>foo</replaceable></literal> or
|
<literal>--<emphasis>foo</emphasis></literal> or
|
||||||
<literal>--no-<replaceable>foo</replaceable></literal>
|
<literal>--no-<emphasis>foo</emphasis></literal>
|
||||||
(e.g. <option>--no-auto-optimise-store</option>).</para>
|
(e.g. <option>--no-auto-optimise-store</option>).</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
|
@ -551,7 +551,7 @@
|
||||||
is still supported for compatibility, but it is also possible to
|
is still supported for compatibility, but it is also possible to
|
||||||
specify builders in <command>nix.conf</command> by setting the
|
specify builders in <command>nix.conf</command> by setting the
|
||||||
option <literal>builders =
|
option <literal>builders =
|
||||||
@<replaceable>path</replaceable></literal>.</para>
|
@<emphasis>path</emphasis></literal>.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
|
@ -580,9 +580,9 @@
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>You can now use
|
<para>You can now use
|
||||||
<uri>channel:<replaceable>channel-name</replaceable></uri> as a
|
<uri>channel:<emphasis>channel-name</emphasis></uri> as a
|
||||||
short-hand for
|
short-hand for
|
||||||
<uri>https://nixos.org/channels/<replaceable>channel-name</replaceable>/nixexprs.tar.xz</uri>. For
|
<uri>https://nixos.org/channels/<emphasis>channel-name</emphasis>/nixexprs.tar.xz</uri>. For
|
||||||
example, <literal>nix-build channel:nixos-15.09 -A hello</literal>
|
example, <literal>nix-build channel:nixos-15.09 -A hello</literal>
|
||||||
will build the GNU Hello package from the
|
will build the GNU Hello package from the
|
||||||
<literal>nixos-15.09</literal> channel. In the future, this may
|
<literal>nixos-15.09</literal> channel. In the future, this may
|
||||||
|
|
|
@ -28,8 +28,8 @@ By default Nix reads settings from the following places:
|
||||||
The configuration files consist of `name =
|
The configuration files consist of `name =
|
||||||
value` pairs, one per line. Other files can be included with a line like
|
value` pairs, one per line. Other files can be included with a line like
|
||||||
`include
|
`include
|
||||||
path`, where path is interpreted relative to the current conf file and a
|
path`, where *path* is interpreted relative to the current conf file and
|
||||||
missing file is an error unless `!include` is used instead. Comments
|
a missing file is an error unless `!include` is used instead. Comments
|
||||||
start with a `#` character. Here is an example configuration file:
|
start with a `#` character. Here is an example configuration file:
|
||||||
|
|
||||||
keep-outputs = true # Nice for developers
|
keep-outputs = true # Nice for developers
|
||||||
|
@ -216,7 +216,7 @@ The following settings are currently available:
|
||||||
- `hashed-mirrors`
|
- `hashed-mirrors`
|
||||||
A list of web servers used by `builtins.fetchurl` to obtain files by
|
A list of web servers used by `builtins.fetchurl` to obtain files by
|
||||||
hash. The default is `http://tarballs.nixos.org/`. Given a hash type
|
hash. The default is `http://tarballs.nixos.org/`. Given a hash type
|
||||||
ht and a base-16 hash h, Nix will try to download the file from
|
*ht* and a base-16 hash *h*, Nix will try to download the file from
|
||||||
`hashed-mirror/ht/h`. This allows files to be downloaded even if
|
`hashed-mirror/ht/h`. This allows files to be downloaded even if
|
||||||
they have disappeared from their original URI. For example, given
|
they have disappeared from their original URI. For example, given
|
||||||
the default mirror `http://tarballs.nixos.org/`, when building the
|
the default mirror `http://tarballs.nixos.org/`, when building the
|
||||||
|
@ -504,8 +504,8 @@ The following settings are currently available:
|
||||||
A list of paths bind-mounted into Nix sandbox environments. You can
|
A list of paths bind-mounted into Nix sandbox environments. You can
|
||||||
use the syntax `target=source` to mount a path in a different
|
use the syntax `target=source` to mount a path in a different
|
||||||
location in the sandbox; for instance, `/bin=/nix-bin` will mount
|
location in the sandbox; for instance, `/bin=/nix-bin` will mount
|
||||||
the path `/nix-bin` as `/bin` inside the sandbox. If source is
|
the path `/nix-bin` as `/bin` inside the sandbox. If *source* is
|
||||||
followed by `?`, then it is not an error if source does not exist;
|
followed by `?`, then it is not an error if *source* does not exist;
|
||||||
for example, `/dev/nvidiactl?` specifies that `/dev/nvidiactl` will
|
for example, `/dev/nvidiactl?` specifies that `/dev/nvidiactl` will
|
||||||
only be mounted in the sandbox if it exists in the host filesystem.
|
only be mounted in the sandbox if it exists in the host filesystem.
|
||||||
|
|
||||||
|
|
|
@ -43,16 +43,16 @@ paths
|
||||||
# Description
|
# Description
|
||||||
|
|
||||||
The `nix-build` command builds the derivations described by the Nix
|
The `nix-build` command builds the derivations described by the Nix
|
||||||
expressions in paths. If the build succeeds, it places a symlink to the
|
expressions in *paths*. If the build succeeds, it places a symlink to
|
||||||
result in the current directory. The symlink is called `result`. If
|
the result in the current directory. The symlink is called `result`. If
|
||||||
there are multiple Nix expressions, or the Nix expressions evaluate to
|
there are multiple Nix expressions, or the Nix expressions evaluate to
|
||||||
multiple derivations, multiple sequentially numbered symlinks are
|
multiple derivations, multiple sequentially numbered symlinks are
|
||||||
created (`result`, `result-2`, and so on).
|
created (`result`, `result-2`, and so on).
|
||||||
|
|
||||||
If no paths are specified, then `nix-build` will use `default.nix` in
|
If no *paths* are specified, then `nix-build` will use `default.nix` in
|
||||||
the current directory, if it exists.
|
the current directory, if it exists.
|
||||||
|
|
||||||
If an element of paths starts with `http://` or `https://`, it is
|
If an element of *paths* starts with `http://` or `https://`, it is
|
||||||
interpreted as the URL of a tarball that will be downloaded and unpacked
|
interpreted as the URL of a tarball that will be downloaded and unpacked
|
||||||
to a temporary location. The tarball must include a single top-level
|
to a temporary location. The tarball must include a single top-level
|
||||||
directory containing at least a file named `default.nix`.
|
directory containing at least a file named `default.nix`.
|
||||||
|
@ -83,9 +83,9 @@ All options not listed here are passed to `nix-store
|
||||||
- `--dry-run`
|
- `--dry-run`
|
||||||
Show what store paths would be built or downloaded.
|
Show what store paths would be built or downloaded.
|
||||||
|
|
||||||
- `--out-link` / `-o` outlink
|
- `--out-link` / `-o` *outlink*
|
||||||
Change the name of the symlink to the output path created from
|
Change the name of the symlink to the output path created from
|
||||||
`result` to outlink.
|
`result` to *outlink*.
|
||||||
|
|
||||||
The following common options are supported:
|
The following common options are supported:
|
||||||
|
|
||||||
|
|
|
@ -42,25 +42,26 @@ To see the list of official NixOS channels, visit
|
||||||
|
|
||||||
This command has the following operations:
|
This command has the following operations:
|
||||||
|
|
||||||
- `--add` url \[name\]
|
- `--add` *url* \[*name*\]
|
||||||
Adds a channel named name with URL url to the list of subscribed
|
Adds a channel named *name* with URL *url* to the list of subscribed
|
||||||
channels. If name is omitted, it defaults to the last component of
|
channels. If *name* is omitted, it defaults to the last component of
|
||||||
url, with the suffixes `-stable` or `-unstable` removed.
|
*url*, with the suffixes `-stable` or `-unstable` removed.
|
||||||
|
|
||||||
- `--remove` name
|
- `--remove` *name*
|
||||||
Removes the channel named name from the list of subscribed channels.
|
Removes the channel named *name* from the list of subscribed
|
||||||
|
channels.
|
||||||
|
|
||||||
- `--list`
|
- `--list`
|
||||||
Prints the names and URLs of all subscribed channels on standard
|
Prints the names and URLs of all subscribed channels on standard
|
||||||
output.
|
output.
|
||||||
|
|
||||||
- `--update` \[names…\]
|
- `--update` \[*names*…\]
|
||||||
Downloads the Nix expressions of all subscribed channels (or only
|
Downloads the Nix expressions of all subscribed channels (or only
|
||||||
those included in names if specified) and makes them the default for
|
those included in *names* if specified) and makes them the default
|
||||||
`nix-env` operations (by symlinking them from the directory
|
for `nix-env` operations (by symlinking them from the directory
|
||||||
`~/.nix-defexpr`).
|
`~/.nix-defexpr`).
|
||||||
|
|
||||||
- `--rollback` \[generation\]
|
- `--rollback` \[*generation*\]
|
||||||
Reverts the previous call to `nix-channel
|
Reverts the previous call to `nix-channel
|
||||||
--update`. Optionally, you can specify a specific channel generation
|
--update`. Optionally, you can specify a specific channel generation
|
||||||
number to restore.
|
number to restore.
|
||||||
|
|
|
@ -33,7 +33,7 @@ additional options: `-d` (`--delete-old`), which deletes all old
|
||||||
generations of all profiles in `/nix/var/nix/profiles` by invoking
|
generations of all profiles in `/nix/var/nix/profiles` by invoking
|
||||||
`nix-env --delete-generations old` on all profiles (of course, this
|
`nix-env --delete-generations old` on all profiles (of course, this
|
||||||
makes rollbacks to previous configurations impossible); and
|
makes rollbacks to previous configurations impossible); and
|
||||||
`--delete-older-than` period, where period is a value such as `30d`,
|
`--delete-older-than` *period*, where period is a value such as `30d`,
|
||||||
which deletes all generations older than the specified number of days in
|
which deletes all generations older than the specified number of days in
|
||||||
all profiles in `/nix/var/nix/profiles` (except for the generations that
|
all profiles in `/nix/var/nix/profiles` (except for the generations that
|
||||||
were active at that point in time).
|
were active at that point in time).
|
||||||
|
|
|
@ -98,7 +98,7 @@ This section lists the options that are common to all operations. These
|
||||||
options are allowed for every subcommand, though they may not always
|
options are allowed for every subcommand, though they may not always
|
||||||
have an effect. See also [???](#sec-common-options).
|
have an effect. See also [???](#sec-common-options).
|
||||||
|
|
||||||
- `--file` / `-f` path
|
- `--file` / `-f` *path*
|
||||||
Specifies the Nix expression (designated below as the *active Nix
|
Specifies the Nix expression (designated below as the *active Nix
|
||||||
expression*) used by the `--install`, `--upgrade`, and `--query
|
expression*) used by the `--install`, `--upgrade`, and `--query
|
||||||
--available` operations to obtain derivations. The default is
|
--available` operations to obtain derivations. The default is
|
||||||
|
@ -109,7 +109,7 @@ have an effect. See also [???](#sec-common-options).
|
||||||
unpacked to a temporary location. The tarball must include a single
|
unpacked to a temporary location. The tarball must include a single
|
||||||
top-level directory containing at least a file named `default.nix`.
|
top-level directory containing at least a file named `default.nix`.
|
||||||
|
|
||||||
- `--profile` / `-p` path
|
- `--profile` / `-p` *path*
|
||||||
Specifies the profile to be used by those operations that operate on
|
Specifies the profile to be used by those operations that operate on
|
||||||
a profile (designated below as the *active profile*). A profile is a
|
a profile (designated below as the *active profile*). A profile is a
|
||||||
sequence of user environments called *generations*, one of which is
|
sequence of user environments called *generations*, one of which is
|
||||||
|
@ -125,10 +125,10 @@ have an effect. See also [???](#sec-common-options).
|
||||||
[substituted](#gloss-substitute) (i.e., downloaded) and which paths
|
[substituted](#gloss-substitute) (i.e., downloaded) and which paths
|
||||||
will be built from source (because no substitute is available).
|
will be built from source (because no substitute is available).
|
||||||
|
|
||||||
- `--system-filter` system
|
- `--system-filter` *system*
|
||||||
By default, operations such as `--query
|
By default, operations such as `--query
|
||||||
--available` show derivations matching any platform. This option
|
--available` show derivations matching any platform. This option
|
||||||
allows you to use derivations for the specified platform system.
|
allows you to use derivations for the specified platform *system*.
|
||||||
|
|
||||||
<!-- end list -->
|
<!-- end list -->
|
||||||
|
|
||||||
|
@ -200,17 +200,17 @@ args
|
||||||
|
|
||||||
The install operation creates a new user environment, based on the
|
The install operation creates a new user environment, based on the
|
||||||
current generation of the active profile, to which a set of store paths
|
current generation of the active profile, to which a set of store paths
|
||||||
described by args is added. The arguments args map to store paths in a
|
described by *args* is added. The arguments *args* map to store paths in
|
||||||
number of possible ways:
|
a number of possible ways:
|
||||||
|
|
||||||
- By default, args is a set of derivation names denoting derivations
|
- By default, *args* is a set of derivation names denoting derivations
|
||||||
in the active Nix expression. These are realised, and the resulting
|
in the active Nix expression. These are realised, and the resulting
|
||||||
output paths are installed. Currently installed derivations with a
|
output paths are installed. Currently installed derivations with a
|
||||||
name equal to the name of a derivation being added are removed
|
name equal to the name of a derivation being added are removed
|
||||||
unless the option `--preserve-installed` is specified.
|
unless the option `--preserve-installed` is specified.
|
||||||
|
|
||||||
If there are multiple derivations matching a name in args that have
|
If there are multiple derivations matching a name in *args* that
|
||||||
the same name (e.g., `gcc-3.3.6` and `gcc-4.1.1`), then the
|
have the same name (e.g., `gcc-3.3.6` and `gcc-4.1.1`), then the
|
||||||
derivation with the highest *priority* is used. A derivation can
|
derivation with the highest *priority* is used. A derivation can
|
||||||
define a priority by declaring the `meta.priority` attribute. This
|
define a priority by declaring the `meta.priority` attribute. This
|
||||||
attribute should be a number, with a higher value denoting a lower
|
attribute should be a number, with a higher value denoting a lower
|
||||||
|
@ -230,22 +230,23 @@ number of possible ways:
|
||||||
unambiguous. To find out the attribute paths of available packages,
|
unambiguous. To find out the attribute paths of available packages,
|
||||||
use `nix-env -qaP`.
|
use `nix-env -qaP`.
|
||||||
|
|
||||||
- If `--from-profile` path is given, args is a set of names denoting
|
- If `--from-profile` *path* is given, *args* is a set of names
|
||||||
installed store paths in the profile path. This is an easy way to
|
denoting installed store paths in the profile *path*. This is an
|
||||||
copy user environment elements from one profile to another.
|
easy way to copy user environment elements from one profile to
|
||||||
|
another.
|
||||||
|
|
||||||
- If `--from-expression` is given, args are Nix
|
- If `--from-expression` is given, *args* are Nix
|
||||||
[functions](#ss-functions) that are called with the active Nix
|
[functions](#ss-functions) that are called with the active Nix
|
||||||
expression as their single argument. The derivations returned by
|
expression as their single argument. The derivations returned by
|
||||||
those function calls are installed. This allows derivations to be
|
those function calls are installed. This allows derivations to be
|
||||||
specified in an unambiguous way, which is necessary if there are
|
specified in an unambiguous way, which is necessary if there are
|
||||||
multiple derivations with the same name.
|
multiple derivations with the same name.
|
||||||
|
|
||||||
- If args are store derivations, then these are
|
- If *args* are store derivations, then these are
|
||||||
[realised](#rsec-nix-store-realise), and the resulting output paths
|
[realised](#rsec-nix-store-realise), and the resulting output paths
|
||||||
are installed.
|
are installed.
|
||||||
|
|
||||||
- If args are store paths that are not store derivations, then these
|
- If *args* are store paths that are not store derivations, then these
|
||||||
are [realised](#rsec-nix-store-realise) and installed.
|
are [realised](#rsec-nix-store-realise) and installed.
|
||||||
|
|
||||||
- By default all outputs are installed for each derivation. That can
|
- By default all outputs are installed for each derivation. That can
|
||||||
|
@ -359,12 +360,12 @@ args
|
||||||
The upgrade operation creates a new user environment, based on the
|
The upgrade operation creates a new user environment, based on the
|
||||||
current generation of the active profile, in which all store paths are
|
current generation of the active profile, in which all store paths are
|
||||||
replaced for which there are newer versions in the set of paths
|
replaced for which there are newer versions in the set of paths
|
||||||
described by args. Paths for which there are no newer versions are left
|
described by *args*. Paths for which there are no newer versions are
|
||||||
untouched; this is not an error. It is also not an error if an element
|
left untouched; this is not an error. It is also not an error if an
|
||||||
of args matches no installed derivations.
|
element of *args* matches no installed derivations.
|
||||||
|
|
||||||
For a description of how args is mapped to a set of store paths, see
|
For a description of how *args* is mapped to a set of store paths, see
|
||||||
[`--install`](#rsec-nix-env-install). If args describes multiple store
|
[`--install`](#rsec-nix-env-install). If *args* describes multiple store
|
||||||
paths with the same symbolic name, only the one with the highest version
|
paths with the same symbolic name, only the one with the highest version
|
||||||
is installed.
|
is installed.
|
||||||
|
|
||||||
|
@ -462,7 +463,7 @@ drvnames
|
||||||
|
|
||||||
The uninstall operation creates a new user environment, based on the
|
The uninstall operation creates a new user environment, based on the
|
||||||
current generation of the active profile, from which the store paths
|
current generation of the active profile, from which the store paths
|
||||||
designated by the symbolic names names are removed.
|
designated by the symbolic names *names* are removed.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
@ -629,7 +630,7 @@ The query operation displays information about either the store paths
|
||||||
that are installed in the current generation of the active profile
|
that are installed in the current generation of the active profile
|
||||||
(`--installed`), or the derivations that are available for installation
|
(`--installed`), or the derivations that are available for installation
|
||||||
in the active Nix expression (`--available`). It only prints information
|
in the active Nix expression (`--available`). It only prints information
|
||||||
about derivations whose symbolic name matches one of names.
|
about derivations whose symbolic name matches one of *names*.
|
||||||
|
|
||||||
The derivations are sorted by their `name` attributes.
|
The derivations are sorted by their `name` attributes.
|
||||||
|
|
||||||
|
@ -696,14 +697,14 @@ derivation is shown unless `--no-name` is specified.
|
||||||
upgrades for installed packages are available in a Nix expression. A
|
upgrades for installed packages are available in a Nix expression. A
|
||||||
column is added with the following meaning:
|
column is added with the following meaning:
|
||||||
|
|
||||||
- `<` version
|
- `<` *version*
|
||||||
A newer version of the package is available or installed.
|
A newer version of the package is available or installed.
|
||||||
|
|
||||||
- `=` version
|
- `=` *version*
|
||||||
At most the same version of the package is available or
|
At most the same version of the package is available or
|
||||||
installed.
|
installed.
|
||||||
|
|
||||||
- `>` version
|
- `>` *version*
|
||||||
Only older versions of the package are available or installed.
|
Only older versions of the package are available or installed.
|
||||||
|
|
||||||
- `- ?`
|
- `- ?`
|
||||||
|
@ -806,8 +807,8 @@ path
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
This operation makes path the current profile for the user. That is, the
|
This operation makes *path* the current profile for the user. That is,
|
||||||
symlink `~/.nix-profile` is made to point to path.
|
the symlink `~/.nix-profile` is made to point to *path*.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
@ -882,9 +883,9 @@ generation
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
This operation makes generation number generation the current generation
|
This operation makes generation number *generation* the current
|
||||||
of the active profile. That is, if the `profile` is the path to the
|
generation of the active profile. That is, if the `profile` is the path
|
||||||
active profile, then the symlink `profile` is made to point to
|
to the active profile, then the symlink `profile` is made to point to
|
||||||
`profile-generation-link`, which is in turn a symlink to the actual user
|
`profile-generation-link`, which is in turn a symlink to the actual user
|
||||||
environment in the Nix store.
|
environment in the Nix store.
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ hash
|
||||||
# Description
|
# Description
|
||||||
|
|
||||||
The command `nix-hash` computes the cryptographic hash of the contents
|
The command `nix-hash` computes the cryptographic hash of the contents
|
||||||
of each path and prints it on standard output. By default, it computes
|
of each *path* and prints it on standard output. By default, it computes
|
||||||
an MD5 hash, but other hash algorithms are available as well. The hash
|
an MD5 hash, but other hash algorithms are available as well. The hash
|
||||||
is printed in hexadecimal. To generate the same hash as
|
is printed in hexadecimal. To generate the same hash as
|
||||||
`nix-prefetch-url` you have to specify multiple arguments, see below for
|
`nix-prefetch-url` you have to specify multiple arguments, see below for
|
||||||
|
@ -55,9 +55,9 @@ path | md5sum`.
|
||||||
|
|
||||||
- `--flat`
|
- `--flat`
|
||||||
Print the cryptographic hash of the contents of each regular file
|
Print the cryptographic hash of the contents of each regular file
|
||||||
path. That is, do not compute the hash over the dump of path. The
|
*path*. That is, do not compute the hash over the dump of *path*.
|
||||||
result is identical to that produced by the GNU commands `md5sum`
|
The result is identical to that produced by the GNU commands
|
||||||
and `sha1sum`.
|
`md5sum` and `sha1sum`.
|
||||||
|
|
||||||
- `--base32`
|
- `--base32`
|
||||||
Print the hash in a base-32 representation rather than hexadecimal.
|
Print the hash in a base-32 representation rather than hexadecimal.
|
||||||
|
@ -67,17 +67,17 @@ path | md5sum`.
|
||||||
- `--truncate`
|
- `--truncate`
|
||||||
Truncate hashes longer than 160 bits (such as SHA-256) to 160 bits.
|
Truncate hashes longer than 160 bits (such as SHA-256) to 160 bits.
|
||||||
|
|
||||||
- `--type` hashAlgo
|
- `--type` *hashAlgo*
|
||||||
Use the specified cryptographic hash algorithm, which can be one of
|
Use the specified cryptographic hash algorithm, which can be one of
|
||||||
`md5`, `sha1`, and `sha256`.
|
`md5`, `sha1`, and `sha256`.
|
||||||
|
|
||||||
- `--to-base16`
|
- `--to-base16`
|
||||||
Don’t hash anything, but convert the base-32 hash representation
|
Don’t hash anything, but convert the base-32 hash representation
|
||||||
hash to hexadecimal.
|
*hash* to hexadecimal.
|
||||||
|
|
||||||
- `--to-base32`
|
- `--to-base32`
|
||||||
Don’t hash anything, but convert the hexadecimal hash representation
|
Don’t hash anything, but convert the hexadecimal hash representation
|
||||||
hash to base-32.
|
*hash* to base-32.
|
||||||
|
|
||||||
# Examples
|
# Examples
|
||||||
|
|
||||||
|
|
|
@ -56,19 +56,19 @@ files
|
||||||
|
|
||||||
The command `nix-instantiate` generates [store
|
The command `nix-instantiate` generates [store
|
||||||
derivations](#gloss-derivation) from (high-level) Nix expressions. It
|
derivations](#gloss-derivation) from (high-level) Nix expressions. It
|
||||||
evaluates the Nix expressions in each of files (which defaults to
|
evaluates the Nix expressions in each of *files* (which defaults to
|
||||||
./default.nix). Each top-level expression should evaluate to a
|
*./default.nix*). Each top-level expression should evaluate to a
|
||||||
derivation, a list of derivations, or a set of derivations. The paths of
|
derivation, a list of derivations, or a set of derivations. The paths of
|
||||||
the resulting store derivations are printed on standard output.
|
the resulting store derivations are printed on standard output.
|
||||||
|
|
||||||
If files is the character `-`, then a Nix expression will be read from
|
If *files* is the character `-`, then a Nix expression will be read from
|
||||||
standard input.
|
standard input.
|
||||||
|
|
||||||
See also [???](#sec-common-options) for a list of common options.
|
See also [???](#sec-common-options) for a list of common options.
|
||||||
|
|
||||||
# Options
|
# Options
|
||||||
|
|
||||||
- `--add-root` path; `--indirect`
|
- `--add-root` *path*; `--indirect`
|
||||||
See the [corresponding options](#opt-add-root) in `nix-store`.
|
See the [corresponding options](#opt-add-root) in `nix-store`.
|
||||||
|
|
||||||
- `--parse`
|
- `--parse`
|
||||||
|
|
|
@ -31,9 +31,9 @@ hash
|
||||||
# Description
|
# Description
|
||||||
|
|
||||||
The command `nix-prefetch-url` downloads the file referenced by the URL
|
The command `nix-prefetch-url` downloads the file referenced by the URL
|
||||||
url, prints its cryptographic hash, and copies it into the Nix store.
|
*url*, prints its cryptographic hash, and copies it into the Nix store.
|
||||||
The file name in the store is `hash-baseName`, where baseName is
|
The file name in the store is `hash-baseName`, where *baseName* is
|
||||||
everything following the final slash in url.
|
everything following the final slash in *url*.
|
||||||
|
|
||||||
This command is just a convenience for Nix expression writers. Often a
|
This command is just a convenience for Nix expression writers. Often a
|
||||||
Nix expression fetches some source distribution from the network using
|
Nix expression fetches some source distribution from the network using
|
||||||
|
@ -44,10 +44,10 @@ again when you build your Nix expression. Since `fetchurl` uses the same
|
||||||
name for the downloaded file as `nix-prefetch-url`, the redundant
|
name for the downloaded file as `nix-prefetch-url`, the redundant
|
||||||
download can be avoided.
|
download can be avoided.
|
||||||
|
|
||||||
If hash is specified, then a download is not performed if the Nix store
|
If *hash* is specified, then a download is not performed if the Nix
|
||||||
already contains a file with the same hash and base name. Otherwise, the
|
store already contains a file with the same hash and base name.
|
||||||
file is downloaded, and an error is signaled if the actual hash of the
|
Otherwise, the file is downloaded, and an error is signaled if the
|
||||||
file does not match the specified hash.
|
actual hash of the file does not match the specified hash.
|
||||||
|
|
||||||
This command prints the hash on standard output. Additionally, if the
|
This command prints the hash on standard output. Additionally, if the
|
||||||
option `--print-path` is used, the path of the downloaded file in the
|
option `--print-path` is used, the path of the downloaded file in the
|
||||||
|
@ -55,7 +55,7 @@ Nix store is also printed.
|
||||||
|
|
||||||
# Options
|
# Options
|
||||||
|
|
||||||
- `--type` hashAlgo
|
- `--type` *hashAlgo*
|
||||||
Use the specified cryptographic hash algorithm, which can be one of
|
Use the specified cryptographic hash algorithm, which can be one of
|
||||||
`md5`, `sha1`, and `sha256`.
|
`md5`, `sha1`, and `sha256`.
|
||||||
|
|
||||||
|
@ -67,10 +67,10 @@ Nix store is also printed.
|
||||||
result to the Nix store. The resulting hash can be used with
|
result to the Nix store. The resulting hash can be used with
|
||||||
functions such as Nixpkgs’s `fetchzip` or `fetchFromGitHub`.
|
functions such as Nixpkgs’s `fetchzip` or `fetchFromGitHub`.
|
||||||
|
|
||||||
- `--name` name
|
- `--name` *name*
|
||||||
Override the name of the file in the Nix store. By default, this is
|
Override the name of the file in the Nix store. By default, this is
|
||||||
`hash-basename`, where basename is the last component of url.
|
`hash-basename`, where *basename* is the last component of *url*.
|
||||||
Overriding the name is necessary when basename contains characters
|
Overriding the name is necessary when *basename* contains characters
|
||||||
that are not allowed in Nix store paths.
|
that are not allowed in Nix store paths.
|
||||||
|
|
||||||
# Examples
|
# Examples
|
||||||
|
|
|
@ -61,14 +61,14 @@ path
|
||||||
The command `nix-shell` will build the dependencies of the specified
|
The command `nix-shell` will build the dependencies of the specified
|
||||||
derivation, but not the derivation itself. It will then start an
|
derivation, but not the derivation itself. It will then start an
|
||||||
interactive shell in which all environment variables defined by the
|
interactive shell in which all environment variables defined by the
|
||||||
derivation path have been set to their corresponding values, and the
|
derivation *path* have been set to their corresponding values, and the
|
||||||
script `$stdenv/setup` has been sourced. This is useful for reproducing
|
script `$stdenv/setup` has been sourced. This is useful for reproducing
|
||||||
the environment of a derivation for development.
|
the environment of a derivation for development.
|
||||||
|
|
||||||
If path is not given, `nix-shell` defaults to `shell.nix` if it exists,
|
If *path* is not given, `nix-shell` defaults to `shell.nix` if it
|
||||||
and `default.nix` otherwise.
|
exists, and `default.nix` otherwise.
|
||||||
|
|
||||||
If path starts with `http://` or `https://`, it is interpreted as the
|
If *path* starts with `http://` or `https://`, it is interpreted as the
|
||||||
URL of a tarball that will be downloaded and unpacked to a temporary
|
URL of a tarball that will be downloaded and unpacked to a temporary
|
||||||
location. The tarball must include a single top-level directory
|
location. The tarball must include a single top-level directory
|
||||||
containing at least a file named `default.nix`.
|
containing at least a file named `default.nix`.
|
||||||
|
@ -91,8 +91,8 @@ All options not listed here are passed to `nix-store
|
||||||
--realise`, except for `--arg` and `--attr` / `-A` which are passed to
|
--realise`, except for `--arg` and `--attr` / `-A` which are passed to
|
||||||
`nix-instantiate`. See also [???](#sec-common-options).
|
`nix-instantiate`. See also [???](#sec-common-options).
|
||||||
|
|
||||||
- `--command` cmd
|
- `--command` *cmd*
|
||||||
In the environment of the derivation, run the shell command cmd.
|
In the environment of the derivation, run the shell command *cmd*.
|
||||||
This command is executed in an interactive shell. (Use `--run` to
|
This command is executed in an interactive shell. (Use `--run` to
|
||||||
use a non-interactive shell instead.) However, a call to `exit` is
|
use a non-interactive shell instead.) However, a call to `exit` is
|
||||||
implicitly added to the command, so the shell will exit after
|
implicitly added to the command, so the shell will exit after
|
||||||
|
@ -102,14 +102,14 @@ All options not listed here are passed to `nix-store
|
||||||
interactive shell. This can be useful for doing any additional
|
interactive shell. This can be useful for doing any additional
|
||||||
initialisation.
|
initialisation.
|
||||||
|
|
||||||
- `--run` cmd
|
- `--run` *cmd*
|
||||||
Like `--command`, but executes the command in a non-interactive
|
Like `--command`, but executes the command in a non-interactive
|
||||||
shell. This means (among other things) that if you hit Ctrl-C while
|
shell. This means (among other things) that if you hit Ctrl-C while
|
||||||
the command is running, the shell exits.
|
the command is running, the shell exits.
|
||||||
|
|
||||||
- `--exclude` regexp
|
- `--exclude` *regexp*
|
||||||
Do not build any dependencies whose store path matches the regular
|
Do not build any dependencies whose store path matches the regular
|
||||||
expression regexp. This option may be specified multiple times.
|
expression *regexp*. This option may be specified multiple times.
|
||||||
|
|
||||||
- `--pure`
|
- `--pure`
|
||||||
If this flag is specified, the environment is almost entirely
|
If this flag is specified, the environment is almost entirely
|
||||||
|
@ -120,19 +120,19 @@ All options not listed here are passed to `nix-store
|
||||||
installation) `/etc/bashrc` are still sourced, so any variables set
|
installation) `/etc/bashrc` are still sourced, so any variables set
|
||||||
there will affect the interactive shell.
|
there will affect the interactive shell.
|
||||||
|
|
||||||
- `--packages` / `-p` packages…
|
- `--packages` / `-p` *packages*…
|
||||||
Set up an environment in which the specified packages are present.
|
Set up an environment in which the specified packages are present.
|
||||||
The command line arguments are interpreted as attribute names inside
|
The command line arguments are interpreted as attribute names inside
|
||||||
the Nix Packages collection. Thus, `nix-shell -p libjpeg openjdk`
|
the Nix Packages collection. Thus, `nix-shell -p libjpeg openjdk`
|
||||||
will start a shell in which the packages denoted by the attribute
|
will start a shell in which the packages denoted by the attribute
|
||||||
names `libjpeg` and `openjdk` are present.
|
names `libjpeg` and `openjdk` are present.
|
||||||
|
|
||||||
- `-i` interpreter
|
- `-i` *interpreter*
|
||||||
The chained script interpreter to be invoked by `nix-shell`. Only
|
The chained script interpreter to be invoked by `nix-shell`. Only
|
||||||
applicable in `#!`-scripts (described
|
applicable in `#!`-scripts (described
|
||||||
[below](#ssec-nix-shell-shebang)).
|
[below](#ssec-nix-shell-shebang)).
|
||||||
|
|
||||||
- `--keep` name
|
- `--keep` *name*
|
||||||
When a `--pure` shell is started, keep the listed environment
|
When a `--pure` shell is started, keep the listed environment
|
||||||
variables.
|
variables.
|
||||||
|
|
||||||
|
@ -199,10 +199,10 @@ done by starting the script with the following lines:
|
||||||
#! /usr/bin/env nix-shell
|
#! /usr/bin/env nix-shell
|
||||||
#! nix-shell -i real-interpreter -p packages
|
#! nix-shell -i real-interpreter -p packages
|
||||||
|
|
||||||
where real-interpreter is the “real” script interpreter that will be
|
where *real-interpreter* is the “real” script interpreter that will be
|
||||||
invoked by `nix-shell` after it has obtained the dependencies and
|
invoked by `nix-shell` after it has obtained the dependencies and
|
||||||
initialised the environment, and packages are the attribute names of the
|
initialised the environment, and *packages* are the attribute names of
|
||||||
dependencies in Nixpkgs.
|
the dependencies in Nixpkgs.
|
||||||
|
|
||||||
The lines starting with `#! nix-shell` specify `nix-shell` options (see
|
The lines starting with `#! nix-shell` specify `nix-shell` options (see
|
||||||
above). Note that you cannot write `#! /usr/bin/env nix-shell -i ...`
|
above). Note that you cannot write `#! /usr/bin/env nix-shell -i ...`
|
||||||
|
|
|
@ -37,10 +37,10 @@ options are allowed for every subcommand, though they may not always
|
||||||
have an effect. See also [???](#sec-common-options) for a list of common
|
have an effect. See also [???](#sec-common-options) for a list of common
|
||||||
options.
|
options.
|
||||||
|
|
||||||
- `--add-root` path
|
- `--add-root` *path*
|
||||||
Causes the result of a realisation (`--realise` and
|
Causes the result of a realisation (`--realise` and
|
||||||
`--force-realise`) to be registered as a root of the garbage
|
`--force-realise`) to be registered as a root of the garbage
|
||||||
collector(see [???](#ssec-gc-roots)). The root is stored in path,
|
collector(see [???](#ssec-gc-roots)). The root is stored in *path*,
|
||||||
which must be inside a directory that is scanned for roots by the
|
which must be inside a directory that is scanned for roots by the
|
||||||
garbage collector (i.e., typically in a subdirectory of
|
garbage collector (i.e., typically in a subdirectory of
|
||||||
`/nix/var/nix/gcroots/`) *unless* the `--indirect` flag is used.
|
`/nix/var/nix/gcroots/`) *unless* the `--indirect` flag is used.
|
||||||
|
@ -56,8 +56,8 @@ options.
|
||||||
result in the current directory; such a build result should not be
|
result in the current directory; such a build result should not be
|
||||||
garbage-collected unless the symlink is removed.
|
garbage-collected unless the symlink is removed.
|
||||||
|
|
||||||
The `--indirect` flag causes a uniquely named symlink to path to be
|
The `--indirect` flag causes a uniquely named symlink to *path* to
|
||||||
stored in `/nix/var/nix/gcroots/auto/`. For instance,
|
be stored in `/nix/var/nix/gcroots/auto/`. For instance,
|
||||||
|
|
||||||
$ nix-store --add-root /home/eelco/bla/result --indirect -r ...
|
$ nix-store --add-root /home/eelco/bla/result --indirect -r ...
|
||||||
|
|
||||||
|
@ -262,10 +262,11 @@ The following suboperations may be specified:
|
||||||
By default, all unreachable paths are deleted. The following options
|
By default, all unreachable paths are deleted. The following options
|
||||||
control what gets deleted and in what order:
|
control what gets deleted and in what order:
|
||||||
|
|
||||||
- `--max-freed` bytes
|
- `--max-freed` *bytes*
|
||||||
Keep deleting paths until at least bytes bytes have been deleted,
|
Keep deleting paths until at least *bytes* bytes have been deleted,
|
||||||
then stop. The argument bytes can be followed by the multiplicative
|
then stop. The argument *bytes* can be followed by the
|
||||||
suffix `K`, `M`, `G` or `T`, denoting KiB, MiB, GiB or TiB units.
|
multiplicative suffix `K`, `M`, `G` or `T`, denoting KiB, MiB, GiB
|
||||||
|
or TiB units.
|
||||||
|
|
||||||
The behaviour of the collector is also influenced by the
|
The behaviour of the collector is also influenced by the
|
||||||
[`keep-outputs`](#conf-keep-outputs) and
|
[`keep-outputs`](#conf-keep-outputs) and
|
||||||
|
@ -303,7 +304,7 @@ paths
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
The operation `--delete` deletes the store paths paths from the Nix
|
The operation `--delete` deletes the store paths *paths* from the Nix
|
||||||
store, but only if it is safe to do so; that is, when the path is not
|
store, but only if it is safe to do so; that is, when the path is not
|
||||||
reachable from a root of the garbage collector. This means that you can
|
reachable from a root of the garbage collector. This means that you can
|
||||||
only delete paths that would also be deleted by `nix-store --gc`. Thus,
|
only delete paths that would also be deleted by `nix-store --gc`. Thus,
|
||||||
|
@ -379,7 +380,7 @@ The operation `--query` displays various bits of information about the
|
||||||
store paths . The queries are described below. At most one query can be
|
store paths . The queries are described below. At most one query can be
|
||||||
specified. The default query is `--outputs`.
|
specified. The default query is `--outputs`.
|
||||||
|
|
||||||
The paths paths may also be symlinks from outside of the Nix store, to
|
The paths *paths* may also be symlinks from outside of the Nix store, to
|
||||||
the Nix store. In that case, the query is applied to the target of the
|
the Nix store. In that case, the query is applied to the target of the
|
||||||
symlink.
|
symlink.
|
||||||
|
|
||||||
|
@ -397,11 +398,11 @@ symlink.
|
||||||
|
|
||||||
- `--outputs`
|
- `--outputs`
|
||||||
Prints out the [output paths](#gloss-output-path) of the store
|
Prints out the [output paths](#gloss-output-path) of the store
|
||||||
derivations paths. These are the paths that will be produced when
|
derivations *paths*. These are the paths that will be produced when
|
||||||
the derivation is built.
|
the derivation is built.
|
||||||
|
|
||||||
- `--requisites`; `-R`
|
- `--requisites`; `-R`
|
||||||
Prints out the [closure](#gloss-closure) of the store path paths.
|
Prints out the [closure](#gloss-closure) of the store path *paths*.
|
||||||
|
|
||||||
This query has one option:
|
This query has one option:
|
||||||
|
|
||||||
|
@ -419,29 +420,30 @@ symlink.
|
||||||
|
|
||||||
- `--references`
|
- `--references`
|
||||||
Prints the set of [references](#gloss-reference) of the store paths
|
Prints the set of [references](#gloss-reference) of the store paths
|
||||||
paths, that is, their immediate dependencies. (For *all*
|
*paths*, that is, their immediate dependencies. (For *all*
|
||||||
dependencies, use `--requisites`.)
|
dependencies, use `--requisites`.)
|
||||||
|
|
||||||
- `--referrers`
|
- `--referrers`
|
||||||
Prints the set of *referrers* of the store paths paths, that is, the
|
Prints the set of *referrers* of the store paths *paths*, that is,
|
||||||
store paths currently existing in the Nix store that refer to one of
|
the store paths currently existing in the Nix store that refer to
|
||||||
paths. Note that contrary to the references, the set of referrers is
|
one of *paths*. Note that contrary to the references, the set of
|
||||||
not constant; it can change as store paths are added or removed.
|
referrers is not constant; it can change as store paths are added or
|
||||||
|
removed.
|
||||||
|
|
||||||
- `--referrers-closure`
|
- `--referrers-closure`
|
||||||
Prints the closure of the set of store paths paths under the
|
Prints the closure of the set of store paths *paths* under the
|
||||||
referrers relation; that is, all store paths that directly or
|
referrers relation; that is, all store paths that directly or
|
||||||
indirectly refer to one of paths. These are all the path currently
|
indirectly refer to one of *paths*. These are all the path currently
|
||||||
in the Nix store that are dependent on paths.
|
in the Nix store that are dependent on *paths*.
|
||||||
|
|
||||||
- `--deriver`; `-d`
|
- `--deriver`; `-d`
|
||||||
Prints the [deriver](#gloss-deriver) of the store paths paths. If
|
Prints the [deriver](#gloss-deriver) of the store paths *paths*. If
|
||||||
the path has no deriver (e.g., if it is a source file), or if the
|
the path has no deriver (e.g., if it is a source file), or if the
|
||||||
deriver is not known (e.g., in the case of a binary-only
|
deriver is not known (e.g., in the case of a binary-only
|
||||||
deployment), the string `unknown-deriver` is printed.
|
deployment), the string `unknown-deriver` is printed.
|
||||||
|
|
||||||
- `--graph`
|
- `--graph`
|
||||||
Prints the references graph of the store paths paths in the format
|
Prints the references graph of the store paths *paths* in the format
|
||||||
of the `dot` tool of AT\&T's [Graphviz
|
of the `dot` tool of AT\&T's [Graphviz
|
||||||
package](http://www.graphviz.org/). This can be used to visualise
|
package](http://www.graphviz.org/). This can be used to visualise
|
||||||
dependency graphs. To obtain a build-time dependency graph, apply
|
dependency graphs. To obtain a build-time dependency graph, apply
|
||||||
|
@ -449,40 +451,40 @@ symlink.
|
||||||
apply it to an output path.
|
apply it to an output path.
|
||||||
|
|
||||||
- `--tree`
|
- `--tree`
|
||||||
Prints the references graph of the store paths paths as a nested
|
Prints the references graph of the store paths *paths* as a nested
|
||||||
ASCII tree. References are ordered by descending closure size; this
|
ASCII tree. References are ordered by descending closure size; this
|
||||||
tends to flatten the tree, making it more readable. The query only
|
tends to flatten the tree, making it more readable. The query only
|
||||||
recurses into a store path when it is first encountered; this
|
recurses into a store path when it is first encountered; this
|
||||||
prevents a blowup of the tree representation of the graph.
|
prevents a blowup of the tree representation of the graph.
|
||||||
|
|
||||||
- `--graphml`
|
- `--graphml`
|
||||||
Prints the references graph of the store paths paths in the
|
Prints the references graph of the store paths *paths* in the
|
||||||
[GraphML](http://graphml.graphdrawing.org/) file format. This can be
|
[GraphML](http://graphml.graphdrawing.org/) file format. This can be
|
||||||
used to visualise dependency graphs. To obtain a build-time
|
used to visualise dependency graphs. To obtain a build-time
|
||||||
dependency graph, apply this to a store derivation. To obtain a
|
dependency graph, apply this to a store derivation. To obtain a
|
||||||
runtime dependency graph, apply it to an output path.
|
runtime dependency graph, apply it to an output path.
|
||||||
|
|
||||||
- `--binding` name; `-b` name
|
- `--binding` *name*; `-b` *name*
|
||||||
Prints the value of the attribute name (i.e., environment variable)
|
Prints the value of the attribute *name* (i.e., environment
|
||||||
of the store derivations paths. It is an error for a derivation to
|
variable) of the store derivations *paths*. It is an error for a
|
||||||
not have the specified attribute.
|
derivation to not have the specified attribute.
|
||||||
|
|
||||||
- `--hash`
|
- `--hash`
|
||||||
Prints the SHA-256 hash of the contents of the store paths paths
|
Prints the SHA-256 hash of the contents of the store paths *paths*
|
||||||
(that is, the hash of the output of `nix-store --dump` on the given
|
(that is, the hash of the output of `nix-store --dump` on the given
|
||||||
paths). Since the hash is stored in the Nix database, this is a fast
|
paths). Since the hash is stored in the Nix database, this is a fast
|
||||||
operation.
|
operation.
|
||||||
|
|
||||||
- `--size`
|
- `--size`
|
||||||
Prints the size in bytes of the contents of the store paths paths —
|
Prints the size in bytes of the contents of the store paths *paths*
|
||||||
to be precise, the size of the output of `nix-store --dump` on the
|
— to be precise, the size of the output of `nix-store --dump` on
|
||||||
given paths. Note that the actual disk space required by the store
|
the given paths. Note that the actual disk space required by the
|
||||||
paths may be higher, especially on filesystems with large cluster
|
store paths may be higher, especially on filesystems with large
|
||||||
sizes.
|
cluster sizes.
|
||||||
|
|
||||||
- `--roots`
|
- `--roots`
|
||||||
Prints the garbage collector roots that point, directly or
|
Prints the garbage collector roots that point, directly or
|
||||||
indirectly, at the store paths paths.
|
indirectly, at the store paths *paths*.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
@ -708,8 +710,8 @@ path
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
The operation `--dump` produces a NAR (Nix ARchive) file containing the
|
The operation `--dump` produces a NAR (Nix ARchive) file containing the
|
||||||
contents of the file system tree rooted at path. The archive is written
|
contents of the file system tree rooted at *path*. The archive is
|
||||||
to standard output.
|
written to standard output.
|
||||||
|
|
||||||
A NAR archive is like a TAR or Zip archive, but it contains only the
|
A NAR archive is like a TAR or Zip archive, but it contains only the
|
||||||
information that Nix considers important. For instance, timestamps are
|
information that Nix considers important. For instance, timestamps are
|
||||||
|
@ -745,8 +747,8 @@ path
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
The operation `--restore` unpacks a NAR archive to path, which must not
|
The operation `--restore` unpacks a NAR archive to *path*, which must
|
||||||
already exist. The archive is read from standard input.
|
not already exist. The archive is read from standard input.
|
||||||
|
|
||||||
# Operation `--export`
|
# Operation `--export`
|
||||||
|
|
||||||
|
|
|
@ -44,9 +44,9 @@ Most Nix commands accept the following command-line options:
|
||||||
This option may be specified repeatedly. See the previous verbosity
|
This option may be specified repeatedly. See the previous verbosity
|
||||||
levels list.
|
levels list.
|
||||||
|
|
||||||
- `--log-format` format
|
- `--log-format` *format*
|
||||||
This option can be used to change the output of the log format, with
|
This option can be used to change the output of the log format, with
|
||||||
format being one of:
|
*format* being one of:
|
||||||
|
|
||||||
- raw
|
- raw
|
||||||
This is the raw format, as outputted by nix-build.
|
This is the raw format, as outputted by nix-build.
|
||||||
|
@ -68,7 +68,7 @@ Most Nix commands accept the following command-line options:
|
||||||
output and error are always written to a log file in
|
output and error are always written to a log file in
|
||||||
`prefix/nix/var/log/nix`.
|
`prefix/nix/var/log/nix`.
|
||||||
|
|
||||||
- `--max-jobs` / `-j` number
|
- `--max-jobs` / `-j` *number*
|
||||||
Sets the maximum number of build jobs that Nix will perform in
|
Sets the maximum number of build jobs that Nix will perform in
|
||||||
parallel to the specified number. Specify `auto` to use the number
|
parallel to the specified number. Specify `auto` to use the number
|
||||||
of CPUs in the system. The default is specified by the
|
of CPUs in the system. The default is specified by the
|
||||||
|
@ -144,7 +144,7 @@ Most Nix commands accept the following command-line options:
|
||||||
database. Most Nix operations do need database access, so those
|
database. Most Nix operations do need database access, so those
|
||||||
operations will fail.
|
operations will fail.
|
||||||
|
|
||||||
- `--arg` name value
|
- `--arg` *name* *value*
|
||||||
This option is accepted by `nix-env`, `nix-instantiate`, `nix-shell`
|
This option is accepted by `nix-env`, `nix-instantiate`, `nix-shell`
|
||||||
and `nix-build`. When evaluating Nix expressions, the expression
|
and `nix-build`. When evaluating Nix expressions, the expression
|
||||||
evaluator will automatically try to call functions that it
|
evaluator will automatically try to call functions that it
|
||||||
|
@ -153,8 +153,8 @@ Most Nix commands accept the following command-line options:
|
||||||
defaultValue }:
|
defaultValue }:
|
||||||
...`). With `--arg`, you can also call functions that have arguments
|
...`). With `--arg`, you can also call functions that have arguments
|
||||||
without a default value (or override a default value). That is, if
|
without a default value (or override a default value). That is, if
|
||||||
the evaluator encounters a function with an argument named name, it
|
the evaluator encounters a function with an argument named *name*,
|
||||||
will call it with value value.
|
it will call it with value *value*.
|
||||||
|
|
||||||
For instance, the top-level `default.nix` in Nixpkgs is actually a
|
For instance, the top-level `default.nix` in Nixpkgs is actually a
|
||||||
function:
|
function:
|
||||||
|
@ -172,18 +172,18 @@ Most Nix commands accept the following command-line options:
|
||||||
\"i686-freebsd\"`. (Note that since the argument is a Nix string
|
\"i686-freebsd\"`. (Note that since the argument is a Nix string
|
||||||
literal, you have to escape the quotes.)
|
literal, you have to escape the quotes.)
|
||||||
|
|
||||||
- `--argstr` name value
|
- `--argstr` *name* *value*
|
||||||
This option is like `--arg`, only the value is not a Nix expression
|
This option is like `--arg`, only the value is not a Nix expression
|
||||||
but a string. So instead of `--arg system \"i686-linux\"` (the outer
|
but a string. So instead of `--arg system \"i686-linux\"` (the outer
|
||||||
quotes are to keep the shell happy) you can say `--argstr system
|
quotes are to keep the shell happy) you can say `--argstr system
|
||||||
i686-linux`.
|
i686-linux`.
|
||||||
|
|
||||||
- `--attr` / `-A` attrPath
|
- `--attr` / `-A` *attrPath*
|
||||||
Select an attribute from the top-level Nix expression being
|
Select an attribute from the top-level Nix expression being
|
||||||
evaluated. (`nix-env`, `nix-instantiate`, `nix-build` and
|
evaluated. (`nix-env`, `nix-instantiate`, `nix-build` and
|
||||||
`nix-shell` only.) The *attribute path* attrPath is a sequence of
|
`nix-shell` only.) The *attribute path* *attrPath* is a sequence of
|
||||||
attribute names separated by dots. For instance, given a top-level
|
attribute names separated by dots. For instance, given a top-level
|
||||||
Nix expression e, the attribute path `xorg.xorgserver` would cause
|
Nix expression *e*, the attribute path `xorg.xorgserver` would cause
|
||||||
the expression `e.xorg.xorgserver` to be used. See [`nix-env
|
the expression `e.xorg.xorgserver` to be used. See [`nix-env
|
||||||
--install`](#refsec-nix-env-install-examples) for some concrete
|
--install`](#refsec-nix-env-install-examples) for some concrete
|
||||||
examples.
|
examples.
|
||||||
|
@ -204,14 +204,14 @@ Most Nix commands accept the following command-line options:
|
||||||
use, give your expression to the `nix-shell -p` convenience flag
|
use, give your expression to the `nix-shell -p` convenience flag
|
||||||
instead.
|
instead.
|
||||||
|
|
||||||
- `-I` path
|
- `-I` *path*
|
||||||
Add a path to the Nix expression search path. This option may be
|
Add a path to the Nix expression search path. This option may be
|
||||||
given multiple times. See the NIX\_PATH\</literal\> environment
|
given multiple times. See the NIX\_PATH\</literal\> environment
|
||||||
variable for information on the semantics of the Nix search path.
|
variable for information on the semantics of the Nix search path.
|
||||||
Paths added through `-I` take precedence over `NIX_PATH`.
|
Paths added through `-I` take precedence over `NIX_PATH`.
|
||||||
|
|
||||||
- `--option` name value
|
- `--option` *name* *value*
|
||||||
Set the Nix configuration option name to value. This overrides
|
Set the Nix configuration option *name* to *value*. This overrides
|
||||||
settings in the Nix configuration file (see nix.conf5).
|
settings in the Nix configuration file (see nix.conf5).
|
||||||
|
|
||||||
- `--repair`
|
- `--repair`
|
||||||
|
|
|
@ -54,9 +54,9 @@ Derivations can declare some infrequently used optional attributes.
|
||||||
attribute should be a list of pairs `[ name1
|
attribute should be a list of pairs `[ name1
|
||||||
path1 name2
|
path1 name2
|
||||||
path2 ...
|
path2 ...
|
||||||
]`. The references graph of each pathN will be stored in a text file
|
]`. The references graph of each *pathN* will be stored in a text
|
||||||
nameN in the temporary build directory. The text files have the
|
file *nameN* in the temporary build directory. The text files have
|
||||||
format used by `nix-store
|
the format used by `nix-store
|
||||||
--register-validity` (with the deriver fields left empty). For
|
--register-validity` (with the deriver fields left empty). For
|
||||||
example, when the following derivation is built:
|
example, when the following derivation is built:
|
||||||
|
|
||||||
|
@ -204,9 +204,9 @@ Derivations can declare some infrequently used optional attributes.
|
||||||
then when the builder runs, the environment variable `bigPath` will
|
then when the builder runs, the environment variable `bigPath` will
|
||||||
contain the absolute path to a temporary file containing `a very
|
contain the absolute path to a temporary file containing `a very
|
||||||
long
|
long
|
||||||
string`. That is, for any attribute x listed in `passAsFile`, Nix
|
string`. That is, for any attribute *x* listed in `passAsFile`, Nix
|
||||||
will pass an environment variable `xPath` holding the path of the
|
will pass an environment variable `xPath` holding the path of the
|
||||||
file containing the value of attribute x. This is useful when you
|
file containing the value of attribute *x*. This is useful when you
|
||||||
need to pass large strings to a builder, since most operating
|
need to pass large strings to a builder, since most operating
|
||||||
systems impose a limit on the size of the environment (typically, a
|
systems impose a limit on the size of the environment (typically, a
|
||||||
few hundred kilobyte).
|
few hundred kilobyte).
|
||||||
|
|
|
@ -9,42 +9,42 @@ scope. Instead, you can access them through the `builtins` built-in
|
||||||
value, which is a set that contains all built-in functions and values.
|
value, which is a set that contains all built-in functions and values.
|
||||||
For instance, `derivation` is also available as `builtins.derivation`.
|
For instance, `derivation` is also available as `builtins.derivation`.
|
||||||
|
|
||||||
- `abort` s; `builtins.abort` s
|
- `abort` *s*; `builtins.abort` *s*
|
||||||
Abort Nix expression evaluation, print error message s.
|
Abort Nix expression evaluation, print error message *s*.
|
||||||
|
|
||||||
- `builtins.add` e1 e2
|
- `builtins.add` *e1* *e2*
|
||||||
Return the sum of the numbers e1 and e2.
|
Return the sum of the numbers *e1* and *e2*.
|
||||||
|
|
||||||
- `builtins.all` pred list
|
- `builtins.all` *pred* *list*
|
||||||
Return `true` if the function pred returns `true` for all elements
|
Return `true` if the function *pred* returns `true` for all elements
|
||||||
of list, and `false` otherwise.
|
of *list*, and `false` otherwise.
|
||||||
|
|
||||||
- `builtins.any` pred list
|
- `builtins.any` *pred* *list*
|
||||||
Return `true` if the function pred returns `true` for at least one
|
Return `true` if the function *pred* returns `true` for at least one
|
||||||
element of list, and `false` otherwise.
|
element of *list*, and `false` otherwise.
|
||||||
|
|
||||||
- `builtins.attrNames` set
|
- `builtins.attrNames` *set*
|
||||||
Return the names of the attributes in the set set in an
|
Return the names of the attributes in the set *set* in an
|
||||||
alphabetically sorted list. For instance, `builtins.attrNames { y
|
alphabetically sorted list. For instance, `builtins.attrNames { y
|
||||||
= 1; x = "foo"; }` evaluates to `[ "x" "y" ]`.
|
= 1; x = "foo"; }` evaluates to `[ "x" "y" ]`.
|
||||||
|
|
||||||
- `builtins.attrValues` set
|
- `builtins.attrValues` *set*
|
||||||
Return the values of the attributes in the set set in the order
|
Return the values of the attributes in the set *set* in the order
|
||||||
corresponding to the sorted attribute names.
|
corresponding to the sorted attribute names.
|
||||||
|
|
||||||
- `baseNameOf` s
|
- `baseNameOf` *s*
|
||||||
Return the *base name* of the string s, that is, everything
|
Return the *base name* of the string *s*, that is, everything
|
||||||
following the final slash in the string. This is similar to the GNU
|
following the final slash in the string. This is similar to the GNU
|
||||||
`basename` command.
|
`basename` command.
|
||||||
|
|
||||||
- `builtins.bitAnd` e1 e2
|
- `builtins.bitAnd` *e1* *e2*
|
||||||
Return the bitwise AND of the integers e1 and e2.
|
Return the bitwise AND of the integers *e1* and *e2*.
|
||||||
|
|
||||||
- `builtins.bitOr` e1 e2
|
- `builtins.bitOr` *e1* *e2*
|
||||||
Return the bitwise OR of the integers e1 and e2.
|
Return the bitwise OR of the integers *e1* and *e2*.
|
||||||
|
|
||||||
- `builtins.bitXor` e1 e2
|
- `builtins.bitXor` *e1* *e2*
|
||||||
Return the bitwise XOR of the integers e1 and e2.
|
Return the bitwise XOR of the integers *e1* and *e2*.
|
||||||
|
|
||||||
- `builtins`
|
- `builtins`
|
||||||
The set `builtins` contains all the built-in functions and values.
|
The set `builtins` contains all the built-in functions and values.
|
||||||
|
@ -56,17 +56,17 @@ For instance, `derivation` is also available as `builtins.derivation`.
|
||||||
This allows a Nix expression to fall back gracefully on older Nix
|
This allows a Nix expression to fall back gracefully on older Nix
|
||||||
installations that don’t have the desired built-in function.
|
installations that don’t have the desired built-in function.
|
||||||
|
|
||||||
- `builtins.compareVersions` s1 s2
|
- `builtins.compareVersions` *s1* *s2*
|
||||||
Compare two strings representing versions and return `-1` if version
|
Compare two strings representing versions and return `-1` if version
|
||||||
s1 is older than version s2, `0` if they are the same, and `1` if s1
|
*s1* is older than version *s2*, `0` if they are the same, and `1`
|
||||||
is newer than s2. The version comparison algorithm is the same as
|
if *s1* is newer than *s2*. The version comparison algorithm is the
|
||||||
the one used by [`nix-env
|
same as the one used by [`nix-env
|
||||||
-u`](#ssec-version-comparisons).
|
-u`](#ssec-version-comparisons).
|
||||||
|
|
||||||
- `builtins.concatLists` lists
|
- `builtins.concatLists` *lists*
|
||||||
Concatenate a list of lists into a single list.
|
Concatenate a list of lists into a single list.
|
||||||
|
|
||||||
- `builtins.concatStringsSep` separator list
|
- `builtins.concatStringsSep` *separator* *list*
|
||||||
Concatenate a list of strings with a separator between each element,
|
Concatenate a list of strings with a separator between each element,
|
||||||
e.g. `concatStringsSep "/"
|
e.g. `concatStringsSep "/"
|
||||||
["usr" "local" "bin"] == "usr/local/bin"`
|
["usr" "local" "bin"] == "usr/local/bin"`
|
||||||
|
@ -76,37 +76,37 @@ For instance, `derivation` is also available as `builtins.derivation`.
|
||||||
identifier for the Nix installation on which the expression is being
|
identifier for the Nix installation on which the expression is being
|
||||||
evaluated, such as `"i686-linux"` or `"x86_64-darwin"`.
|
evaluated, such as `"i686-linux"` or `"x86_64-darwin"`.
|
||||||
|
|
||||||
- `builtins.deepSeq` e1 e2
|
- `builtins.deepSeq` *e1* *e2*
|
||||||
This is like `seq
|
This is like `seq
|
||||||
e1
|
e1
|
||||||
e2`, except that e1 is evaluated *deeply*: if it’s a list or set,
|
e2`, except that *e1* is evaluated *deeply*: if it’s a list or set,
|
||||||
its elements or attributes are also evaluated recursively.
|
its elements or attributes are also evaluated recursively.
|
||||||
|
|
||||||
- `derivation` attrs; `builtins.derivation` attrs
|
- `derivation` *attrs*; `builtins.derivation` *attrs*
|
||||||
`derivation` is described in [???](#ssec-derivation).
|
`derivation` is described in [???](#ssec-derivation).
|
||||||
|
|
||||||
- `dirOf` s; `builtins.dirOf` s
|
- `dirOf` *s*; `builtins.dirOf` *s*
|
||||||
Return the directory part of the string s, that is, everything
|
Return the directory part of the string *s*, that is, everything
|
||||||
before the final slash in the string. This is similar to the GNU
|
before the final slash in the string. This is similar to the GNU
|
||||||
`dirname` command.
|
`dirname` command.
|
||||||
|
|
||||||
- `builtins.div` e1 e2
|
- `builtins.div` *e1* *e2*
|
||||||
Return the quotient of the numbers e1 and e2.
|
Return the quotient of the numbers *e1* and *e2*.
|
||||||
|
|
||||||
- `builtins.elem` x xs
|
- `builtins.elem` *x* *xs*
|
||||||
Return `true` if a value equal to x occurs in the list xs, and
|
Return `true` if a value equal to *x* occurs in the list *xs*, and
|
||||||
`false` otherwise.
|
`false` otherwise.
|
||||||
|
|
||||||
- `builtins.elemAt` xs n
|
- `builtins.elemAt` *xs* *n*
|
||||||
Return element n from the list xs. Elements are counted starting
|
Return element *n* from the list *xs*. Elements are counted starting
|
||||||
from 0. A fatal error occurs if the index is out of bounds.
|
from 0. A fatal error occurs if the index is out of bounds.
|
||||||
|
|
||||||
- `builtins.fetchurl` url
|
- `builtins.fetchurl` *url*
|
||||||
Download the specified URL and return the path of the downloaded
|
Download the specified URL and return the path of the downloaded
|
||||||
file. This function is not available if [restricted evaluation
|
file. This function is not available if [restricted evaluation
|
||||||
mode](#conf-restrict-eval) is enabled.
|
mode](#conf-restrict-eval) is enabled.
|
||||||
|
|
||||||
- `fetchTarball` url; `builtins.fetchTarball` url
|
- `fetchTarball` *url*; `builtins.fetchTarball` *url*
|
||||||
Download the specified URL, unpack it and return the path of the
|
Download the specified URL, unpack it and return the path of the
|
||||||
unpacked tree. The file must be a tape archive (`.tar`) compressed
|
unpacked tree. The file must be a tape archive (`.tar`) compressed
|
||||||
with `gzip`, `bzip2` or `xz`. The top-level path component of the
|
with `gzip`, `bzip2` or `xz`. The top-level path component of the
|
||||||
|
@ -142,10 +142,10 @@ For instance, `derivation` is also available as `builtins.derivation`.
|
||||||
This function is not available if [restricted evaluation
|
This function is not available if [restricted evaluation
|
||||||
mode](#conf-restrict-eval) is enabled.
|
mode](#conf-restrict-eval) is enabled.
|
||||||
|
|
||||||
- `builtins.fetchGit` args
|
- `builtins.fetchGit` *args*
|
||||||
Fetch a path from git. args can be a URL, in which case the HEAD of
|
Fetch a path from git. *args* can be a URL, in which case the HEAD
|
||||||
the repo at that URL is fetched. Otherwise, it can be an attribute
|
of the repo at that URL is fetched. Otherwise, it can be an
|
||||||
with the following attributes (all except `url` optional):
|
attribute with the following attributes (all except `url` optional):
|
||||||
|
|
||||||
- url
|
- url
|
||||||
The URL of the repo.
|
The URL of the repo.
|
||||||
|
@ -240,11 +240,11 @@ For instance, `derivation` is also available as `builtins.derivation`.
|
||||||
>
|
>
|
||||||
> This behavior is disabled in *Pure evaluation mode*.
|
> This behavior is disabled in *Pure evaluation mode*.
|
||||||
|
|
||||||
- `builtins.filter` f xs
|
- `builtins.filter` *f* *xs*
|
||||||
Return a list consisting of the elements of xs for which the
|
Return a list consisting of the elements of *xs* for which the
|
||||||
function f returns `true`.
|
function *f* returns `true`.
|
||||||
|
|
||||||
- `builtins.filterSource` e1 e2
|
- `builtins.filterSource` *e1* *e2*
|
||||||
This function allows you to copy sources into the Nix store while
|
This function allows you to copy sources into the Nix store while
|
||||||
filtering certain files. For instance, suppose that you want to use
|
filtering certain files. For instance, suppose that you want to use
|
||||||
the directory `source-dir` as an input to a Nix expression, e.g.
|
the directory `source-dir` as an input to a Nix expression, e.g.
|
||||||
|
@ -266,9 +266,9 @@ For instance, `derivation` is also available as `builtins.derivation`.
|
||||||
./source-dir;
|
./source-dir;
|
||||||
```
|
```
|
||||||
|
|
||||||
Thus, the first argument e1 must be a predicate function that is
|
Thus, the first argument *e1* must be a predicate function that is
|
||||||
called for each regular file, directory or symlink in the source
|
called for each regular file, directory or symlink in the source
|
||||||
tree e2. If the function returns `true`, the file is copied to the
|
tree *e2*. If the function returns `true`, the file is copied to the
|
||||||
Nix store, otherwise it is omitted. The function is called with two
|
Nix store, otherwise it is omitted. The function is called with two
|
||||||
arguments. The first is the full path of the file. The second is a
|
arguments. The first is the full path of the file. The second is a
|
||||||
string that identifies the type of the file, which is either
|
string that identifies the type of the file, which is either
|
||||||
|
@ -276,19 +276,19 @@ For instance, `derivation` is also available as `builtins.derivation`.
|
||||||
kinds of files such as device nodes or fifos — but note that those
|
kinds of files such as device nodes or fifos — but note that those
|
||||||
cannot be copied to the Nix store, so if the predicate returns
|
cannot be copied to the Nix store, so if the predicate returns
|
||||||
`true` for them, the copy will fail). If you exclude a directory,
|
`true` for them, the copy will fail). If you exclude a directory,
|
||||||
the entire corresponding subtree of e2 will be excluded.
|
the entire corresponding subtree of *e2* will be excluded.
|
||||||
|
|
||||||
- `builtins.foldl’` op nul list
|
- `builtins.foldl’` *op* *nul* *list*
|
||||||
Reduce a list by applying a binary operator, from left to right,
|
Reduce a list by applying a binary operator, from left to right,
|
||||||
e.g. `foldl’ op nul [x0 x1 x2 ...] = op (op
|
e.g. `foldl’ op nul [x0 x1 x2 ...] = op (op
|
||||||
(op nul x0) x1) x2) ...`. The operator is applied strictly, i.e.,
|
(op nul x0) x1) x2) ...`. The operator is applied strictly, i.e.,
|
||||||
its arguments are evaluated first. For example, `foldl’ (x: y: x +
|
its arguments are evaluated first. For example, `foldl’ (x: y: x +
|
||||||
y) 0 [1 2 3]` evaluates to 6.
|
y) 0 [1 2 3]` evaluates to 6.
|
||||||
|
|
||||||
- `builtins.functionArgs` f
|
- `builtins.functionArgs` *f*
|
||||||
Return a set containing the names of the formal arguments expected
|
Return a set containing the names of the formal arguments expected
|
||||||
by the function f. The value of each attribute is a Boolean denoting
|
by the function *f*. The value of each attribute is a Boolean
|
||||||
whether the corresponding argument has a default value. For
|
denoting whether the corresponding argument has a default value. For
|
||||||
instance, `functionArgs ({ x, y ? 123}: ...) = { x = false; y =
|
instance, `functionArgs ({ x, y ? 123}: ...) = { x = false; y =
|
||||||
true; }`.
|
true; }`.
|
||||||
|
|
||||||
|
@ -296,7 +296,7 @@ For instance, `derivation` is also available as `builtins.derivation`.
|
||||||
the function. Plain lambdas are not included, e.g. `functionArgs (x:
|
the function. Plain lambdas are not included, e.g. `functionArgs (x:
|
||||||
...) = { }`.
|
...) = { }`.
|
||||||
|
|
||||||
- `builtins.fromJSON` e
|
- `builtins.fromJSON` *e*
|
||||||
Convert a JSON string to a Nix value. For example,
|
Convert a JSON string to a Nix value. For example,
|
||||||
|
|
||||||
builtins.fromJSON ''{"x": [1, 2, 3], "y": null}''
|
builtins.fromJSON ''{"x": [1, 2, 3], "y": null}''
|
||||||
|
@ -304,21 +304,22 @@ For instance, `derivation` is also available as `builtins.derivation`.
|
||||||
returns the value `{ x = [ 1 2 3 ]; y = null;
|
returns the value `{ x = [ 1 2 3 ]; y = null;
|
||||||
}`.
|
}`.
|
||||||
|
|
||||||
- `builtins.genList` generator length
|
- `builtins.genList` *generator* *length*
|
||||||
Generate list of size length, with each element i equal to the value
|
Generate list of size *length*, with each element *i* equal to the
|
||||||
returned by generator `i`. For example,
|
value returned by *generator* `i`. For example,
|
||||||
|
|
||||||
builtins.genList (x: x * x) 5
|
builtins.genList (x: x * x) 5
|
||||||
|
|
||||||
returns the list `[ 0 1 4 9 16 ]`.
|
returns the list `[ 0 1 4 9 16 ]`.
|
||||||
|
|
||||||
- `builtins.getAttr` s set
|
- `builtins.getAttr` *s* *set*
|
||||||
`getAttr` returns the attribute named s from set. Evaluation aborts
|
`getAttr` returns the attribute named *s* from *set*. Evaluation
|
||||||
if the attribute doesn’t exist. This is a dynamic version of the `.`
|
aborts if the attribute doesn’t exist. This is a dynamic version of
|
||||||
operator, since s is an expression rather than an identifier.
|
the `.` operator, since *s* is an expression rather than an
|
||||||
|
identifier.
|
||||||
|
|
||||||
- `builtins.getEnv` s
|
- `builtins.getEnv` *s*
|
||||||
`getEnv` returns the value of the environment variable s, or an
|
`getEnv` returns the value of the environment variable *s*, or an
|
||||||
empty string if the variable doesn’t exist. This function should be
|
empty string if the variable doesn’t exist. This function should be
|
||||||
used with care, as it can introduce all sorts of nasty environment
|
used with care, as it can introduce all sorts of nasty environment
|
||||||
dependencies in your Nix expression.
|
dependencies in your Nix expression.
|
||||||
|
@ -328,29 +329,29 @@ For instance, `derivation` is also available as `builtins.derivation`.
|
||||||
Packages. (That is, it does a `getEnv "HOME"` to locate the user’s
|
Packages. (That is, it does a `getEnv "HOME"` to locate the user’s
|
||||||
home directory.)
|
home directory.)
|
||||||
|
|
||||||
- `builtins.hasAttr` s set
|
- `builtins.hasAttr` *s* *set*
|
||||||
`hasAttr` returns `true` if set has an attribute named s, and
|
`hasAttr` returns `true` if *set* has an attribute named *s*, and
|
||||||
`false` otherwise. This is a dynamic version of the `?` operator,
|
`false` otherwise. This is a dynamic version of the `?` operator,
|
||||||
since s is an expression rather than an identifier.
|
since *s* is an expression rather than an identifier.
|
||||||
|
|
||||||
- `builtins.hashString` type s
|
- `builtins.hashString` *type* *s*
|
||||||
Return a base-16 representation of the cryptographic hash of string
|
Return a base-16 representation of the cryptographic hash of string
|
||||||
s. The hash algorithm specified by type must be one of `"md5"`,
|
*s*. The hash algorithm specified by *type* must be one of `"md5"`,
|
||||||
`"sha1"`, `"sha256"` or `"sha512"`.
|
`"sha1"`, `"sha256"` or `"sha512"`.
|
||||||
|
|
||||||
- `builtins.hashFile` type p
|
- `builtins.hashFile` *type* *p*
|
||||||
Return a base-16 representation of the cryptographic hash of the
|
Return a base-16 representation of the cryptographic hash of the
|
||||||
file at path p. The hash algorithm specified by type must be one of
|
file at path *p*. The hash algorithm specified by *type* must be one
|
||||||
`"md5"`, `"sha1"`, `"sha256"` or `"sha512"`.
|
of `"md5"`, `"sha1"`, `"sha256"` or `"sha512"`.
|
||||||
|
|
||||||
- `builtins.head` list
|
- `builtins.head` *list*
|
||||||
Return the first element of a list; abort evaluation if the argument
|
Return the first element of a list; abort evaluation if the argument
|
||||||
isn’t a list or is an empty list. You can test whether a list is
|
isn’t a list or is an empty list. You can test whether a list is
|
||||||
empty by comparing it with `[]`.
|
empty by comparing it with `[]`.
|
||||||
|
|
||||||
- `import` path; `builtins.import` path
|
- `import` *path*; `builtins.import` *path*
|
||||||
Load, parse and return the Nix expression in the file path. If path
|
Load, parse and return the Nix expression in the file *path*. If
|
||||||
is a directory, the file ` default.nix
|
*path* is a directory, the file ` default.nix
|
||||||
` in that directory is loaded. Evaluation aborts if the file
|
` in that directory is loaded. Evaluation aborts if the file
|
||||||
doesn’t exist or contains an incorrect Nix expression. `import`
|
doesn’t exist or contains an incorrect Nix expression. `import`
|
||||||
implements Nix’s module system: you can put any Nix expression (such
|
implements Nix’s module system: you can put any Nix expression (such
|
||||||
|
@ -361,7 +362,8 @@ For instance, `derivation` is also available as `builtins.derivation`.
|
||||||
>
|
>
|
||||||
> Unlike some languages, `import` is a regular function in Nix.
|
> Unlike some languages, `import` is a regular function in Nix.
|
||||||
> Paths using the angle bracket syntax (e.g., `
|
> Paths using the angle bracket syntax (e.g., `
|
||||||
> > > > > import` \<foo\>) are normal path values (see [???](#ssec-values)).
|
> > > > > import` *\<foo\>*) are normal path values (see
|
||||||
|
> [???](#ssec-values)).
|
||||||
|
|
||||||
A Nix expression loaded by `import` must not contain any *free
|
A Nix expression loaded by `import` must not contain any *free
|
||||||
variables* (identifiers that are not defined in the Nix expression
|
variables* (identifiers that are not defined in the Nix expression
|
||||||
|
@ -393,50 +395,50 @@ For instance, `derivation` is also available as `builtins.derivation`.
|
||||||
(The function argument doesn’t have to be called `x` in `foo.nix`;
|
(The function argument doesn’t have to be called `x` in `foo.nix`;
|
||||||
any name would work.)
|
any name would work.)
|
||||||
|
|
||||||
- `builtins.intersectAttrs` e1 e2
|
- `builtins.intersectAttrs` *e1* *e2*
|
||||||
Return a set consisting of the attributes in the set e2 that also
|
Return a set consisting of the attributes in the set *e2* that also
|
||||||
exist in the set e1.
|
exist in the set *e1*.
|
||||||
|
|
||||||
- `builtins.isAttrs` e
|
- `builtins.isAttrs` *e*
|
||||||
Return `true` if e evaluates to a set, and `false` otherwise.
|
Return `true` if *e* evaluates to a set, and `false` otherwise.
|
||||||
|
|
||||||
- `builtins.isList` e
|
- `builtins.isList` *e*
|
||||||
Return `true` if e evaluates to a list, and `false` otherwise.
|
Return `true` if *e* evaluates to a list, and `false` otherwise.
|
||||||
|
|
||||||
- `builtins.isFunction` e
|
- `builtins.isFunction` *e*
|
||||||
Return `true` if e evaluates to a function, and `false` otherwise.
|
Return `true` if *e* evaluates to a function, and `false` otherwise.
|
||||||
|
|
||||||
- `builtins.isString` e
|
- `builtins.isString` *e*
|
||||||
Return `true` if e evaluates to a string, and `false` otherwise.
|
Return `true` if *e* evaluates to a string, and `false` otherwise.
|
||||||
|
|
||||||
- `builtins.isInt` e
|
- `builtins.isInt` *e*
|
||||||
Return `true` if e evaluates to an int, and `false` otherwise.
|
Return `true` if *e* evaluates to an int, and `false` otherwise.
|
||||||
|
|
||||||
- `builtins.isFloat` e
|
- `builtins.isFloat` *e*
|
||||||
Return `true` if e evaluates to a float, and `false` otherwise.
|
Return `true` if *e* evaluates to a float, and `false` otherwise.
|
||||||
|
|
||||||
- `builtins.isBool` e
|
- `builtins.isBool` *e*
|
||||||
Return `true` if e evaluates to a bool, and `false` otherwise.
|
Return `true` if *e* evaluates to a bool, and `false` otherwise.
|
||||||
|
|
||||||
- `builtins.isPath` e
|
- `builtins.isPath` *e*
|
||||||
Return `true` if e evaluates to a path, and `false` otherwise.
|
Return `true` if *e* evaluates to a path, and `false` otherwise.
|
||||||
|
|
||||||
- `isNull` e; `builtins.isNull` e
|
- `isNull` *e*; `builtins.isNull` *e*
|
||||||
Return `true` if e evaluates to `null`, and `false` otherwise.
|
Return `true` if *e* evaluates to `null`, and `false` otherwise.
|
||||||
|
|
||||||
> **Warning**
|
> **Warning**
|
||||||
>
|
>
|
||||||
> This function is *deprecated*; just write `e == null` instead.
|
> This function is *deprecated*; just write `e == null` instead.
|
||||||
|
|
||||||
- `builtins.length` e
|
- `builtins.length` *e*
|
||||||
Return the length of the list e.
|
Return the length of the list *e*.
|
||||||
|
|
||||||
- `builtins.lessThan` e1 e2
|
- `builtins.lessThan` *e1* *e2*
|
||||||
Return `true` if the number e1 is less than the number e2, and
|
Return `true` if the number *e1* is less than the number *e2*, and
|
||||||
`false` otherwise. Evaluation aborts if either e1 or e2 does not
|
`false` otherwise. Evaluation aborts if either *e1* or *e2* does not
|
||||||
evaluate to a number.
|
evaluate to a number.
|
||||||
|
|
||||||
- `builtins.listToAttrs` e
|
- `builtins.listToAttrs` *e*
|
||||||
Construct a set from a list specifying the names and values of each
|
Construct a set from a list specifying the names and values of each
|
||||||
attribute. Each element of the list should be a set consisting of a
|
attribute. Each element of the list should be a set consisting of a
|
||||||
string-valued attribute `name` specifying the name of the attribute,
|
string-valued attribute `name` specifying the name of the attribute,
|
||||||
|
@ -451,19 +453,20 @@ For instance, `derivation` is also available as `builtins.derivation`.
|
||||||
|
|
||||||
{ foo = 123; bar = 456; }
|
{ foo = 123; bar = 456; }
|
||||||
|
|
||||||
- `map` f list; `builtins.map` f list
|
- `map` *f* *list*; `builtins.map` *f* *list*
|
||||||
Apply the function f to each element in the list list. For example,
|
Apply the function *f* to each element in the list *list*. For
|
||||||
|
example,
|
||||||
|
|
||||||
map (x: "foo" + x) [ "bar" "bla" "abc" ]
|
map (x: "foo" + x) [ "bar" "bla" "abc" ]
|
||||||
|
|
||||||
evaluates to `[ "foobar" "foobla" "fooabc"
|
evaluates to `[ "foobar" "foobla" "fooabc"
|
||||||
]`.
|
]`.
|
||||||
|
|
||||||
- `builtins.match` regex str
|
- `builtins.match` *regex* *str*
|
||||||
Returns a list if the [extended POSIX regular
|
Returns a list if the [extended POSIX regular
|
||||||
expression](http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04)
|
expression](http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04)
|
||||||
regex matches str precisely, otherwise returns `null`. Each item in
|
*regex* matches *str* precisely, otherwise returns `null`. Each item
|
||||||
the list is a regex group.
|
in the list is a regex group.
|
||||||
|
|
||||||
builtins.match "ab" "abc"
|
builtins.match "ab" "abc"
|
||||||
|
|
||||||
|
@ -481,21 +484,21 @@ For instance, `derivation` is also available as `builtins.derivation`.
|
||||||
|
|
||||||
Evaluates to `[ "foo" ]`.
|
Evaluates to `[ "foo" ]`.
|
||||||
|
|
||||||
- `builtins.mul` e1 e2
|
- `builtins.mul` *e1* *e2*
|
||||||
Return the product of the numbers e1 and e2.
|
Return the product of the numbers *e1* and *e2*.
|
||||||
|
|
||||||
- `builtins.parseDrvName` s
|
- `builtins.parseDrvName` *s*
|
||||||
Split the string s into a package name and version. The package name
|
Split the string *s* into a package name and version. The package
|
||||||
is everything up to but not including the first dash followed by a
|
name is everything up to but not including the first dash followed
|
||||||
digit, and the version is everything following that dash. The result
|
by a digit, and the version is everything following that dash. The
|
||||||
is returned in a set `{ name, version }`. Thus,
|
result is returned in a set `{ name, version }`. Thus,
|
||||||
`builtins.parseDrvName "nix-0.12pre12876"` returns `{ name = "nix";
|
`builtins.parseDrvName "nix-0.12pre12876"` returns `{ name = "nix";
|
||||||
version = "0.12pre12876";
|
version = "0.12pre12876";
|
||||||
}`.
|
}`.
|
||||||
|
|
||||||
- `builtins.path` args
|
- `builtins.path` *args*
|
||||||
An enrichment of the built-in path type, based on the attributes
|
An enrichment of the built-in path type, based on the attributes
|
||||||
present in args. All are optional except `path`:
|
present in *args*. All are optional except `path`:
|
||||||
|
|
||||||
- path
|
- path
|
||||||
The underlying path.
|
The underlying path.
|
||||||
|
@ -523,20 +526,20 @@ For instance, `derivation` is also available as `builtins.derivation`.
|
||||||
providing a hash allows `builtins.path` to be used even when the
|
providing a hash allows `builtins.path` to be used even when the
|
||||||
`pure-eval` nix config option is on.
|
`pure-eval` nix config option is on.
|
||||||
|
|
||||||
- `builtins.pathExists` path
|
- `builtins.pathExists` *path*
|
||||||
Return `true` if the path path exists at evaluation time, and
|
Return `true` if the path *path* exists at evaluation time, and
|
||||||
`false` otherwise.
|
`false` otherwise.
|
||||||
|
|
||||||
- `builtins.placeholder` output
|
- `builtins.placeholder` *output*
|
||||||
Return a placeholder string for the specified output that will be
|
Return a placeholder string for the specified *output* that will be
|
||||||
substituted by the corresponding output path at build time. Typical
|
substituted by the corresponding output path at build time. Typical
|
||||||
outputs would be `"out"`, `"bin"` or `"dev"`.
|
outputs would be `"out"`, `"bin"` or `"dev"`.
|
||||||
|
|
||||||
- `builtins.readDir` path
|
- `builtins.readDir` *path*
|
||||||
Return the contents of the directory path as a set mapping directory
|
Return the contents of the directory *path* as a set mapping
|
||||||
entries to the corresponding file type. For instance, if directory
|
directory entries to the corresponding file type. For instance, if
|
||||||
`A` contains a regular file `B` and another directory `C`, then
|
directory `A` contains a regular file `B` and another directory `C`,
|
||||||
`builtins.readDir
|
then `builtins.readDir
|
||||||
./A` will return the set
|
./A` will return the set
|
||||||
|
|
||||||
{ B = "regular"; C = "directory"; }
|
{ B = "regular"; C = "directory"; }
|
||||||
|
@ -544,33 +547,33 @@ For instance, `derivation` is also available as `builtins.derivation`.
|
||||||
The possible values for the file type are `"regular"`,
|
The possible values for the file type are `"regular"`,
|
||||||
`"directory"`, `"symlink"` and `"unknown"`.
|
`"directory"`, `"symlink"` and `"unknown"`.
|
||||||
|
|
||||||
- `builtins.readFile` path
|
- `builtins.readFile` *path*
|
||||||
Return the contents of the file path as a string.
|
Return the contents of the file *path* as a string.
|
||||||
|
|
||||||
- `removeAttrs` set list; `builtins.removeAttrs` set list
|
- `removeAttrs` *set* *list*; `builtins.removeAttrs` *set* *list*
|
||||||
Remove the attributes listed in list from set. The attributes don’t
|
Remove the attributes listed in *list* from *set*. The attributes
|
||||||
have to exist in set. For instance,
|
don’t have to exist in *set*. For instance,
|
||||||
|
|
||||||
removeAttrs { x = 1; y = 2; z = 3; } [ "a" "x" "z" ]
|
removeAttrs { x = 1; y = 2; z = 3; } [ "a" "x" "z" ]
|
||||||
|
|
||||||
evaluates to `{ y = 2; }`.
|
evaluates to `{ y = 2; }`.
|
||||||
|
|
||||||
- `builtins.replaceStrings` from to s
|
- `builtins.replaceStrings` *from* *to* *s*
|
||||||
Given string s, replace every occurrence of the strings in from with
|
Given string *s*, replace every occurrence of the strings in *from*
|
||||||
the corresponding string in to. For example,
|
with the corresponding string in *to*. For example,
|
||||||
|
|
||||||
builtins.replaceStrings ["oo" "a"] ["a" "i"] "foobar"
|
builtins.replaceStrings ["oo" "a"] ["a" "i"] "foobar"
|
||||||
|
|
||||||
evaluates to `"fabir"`.
|
evaluates to `"fabir"`.
|
||||||
|
|
||||||
- `builtins.seq` e1 e2
|
- `builtins.seq` *e1* *e2*
|
||||||
Evaluate e1, then evaluate and return e2. This ensures that a
|
Evaluate *e1*, then evaluate and return *e2*. This ensures that a
|
||||||
computation is strict in the value of e1.
|
computation is strict in the value of *e1*.
|
||||||
|
|
||||||
- `builtins.sort` comparator list
|
- `builtins.sort` *comparator* *list*
|
||||||
Return list in sorted order. It repeatedly calls the function
|
Return *list* in sorted order. It repeatedly calls the function
|
||||||
comparator with two elements. The comparator should return `true` if
|
*comparator* with two elements. The comparator should return `true`
|
||||||
the first element is less than the second, and `false` otherwise.
|
if the first element is less than the second, and `false` otherwise.
|
||||||
For example,
|
For example,
|
||||||
|
|
||||||
builtins.sort builtins.lessThan [ 483 249 526 147 42 77 ]
|
builtins.sort builtins.lessThan [ 483 249 526 147 42 77 ]
|
||||||
|
@ -581,12 +584,12 @@ For instance, `derivation` is also available as `builtins.derivation`.
|
||||||
This is a stable sort: it preserves the relative order of elements
|
This is a stable sort: it preserves the relative order of elements
|
||||||
deemed equal by the comparator.
|
deemed equal by the comparator.
|
||||||
|
|
||||||
- `builtins.split` regex str
|
- `builtins.split` *regex* *str*
|
||||||
Returns a list composed of non matched strings interleaved with the
|
Returns a list composed of non matched strings interleaved with the
|
||||||
lists of the [extended POSIX regular
|
lists of the [extended POSIX regular
|
||||||
expression](http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04)
|
expression](http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04)
|
||||||
regex matches of str. Each item in the lists of matched sequences is
|
*regex* matches of *str*. Each item in the lists of matched
|
||||||
a regex group.
|
sequences is a regex group.
|
||||||
|
|
||||||
builtins.split "(a)b" "abc"
|
builtins.split "(a)b" "abc"
|
||||||
|
|
||||||
|
@ -604,44 +607,44 @@ For instance, `derivation` is also available as `builtins.derivation`.
|
||||||
|
|
||||||
Evaluates to `[ " " [ "FOO" ] " " ]`.
|
Evaluates to `[ " " [ "FOO" ] " " ]`.
|
||||||
|
|
||||||
- `builtins.splitVersion` s
|
- `builtins.splitVersion` *s*
|
||||||
Split a string representing a version into its components, by the
|
Split a string representing a version into its components, by the
|
||||||
same version splitting logic underlying the version comparison in
|
same version splitting logic underlying the version comparison in
|
||||||
[`nix-env -u`](#ssec-version-comparisons).
|
[`nix-env -u`](#ssec-version-comparisons).
|
||||||
|
|
||||||
- `builtins.stringLength` e
|
- `builtins.stringLength` *e*
|
||||||
Return the length of the string e. If e is not a string, evaluation
|
Return the length of the string *e*. If *e* is not a string,
|
||||||
is aborted.
|
evaluation is aborted.
|
||||||
|
|
||||||
- `builtins.sub` e1 e2
|
- `builtins.sub` *e1* *e2*
|
||||||
Return the difference between the numbers e1 and e2.
|
Return the difference between the numbers *e1* and *e2*.
|
||||||
|
|
||||||
- `builtins.substring` start len s
|
- `builtins.substring` *start* *len* *s*
|
||||||
Return the substring of s from character position start (zero-based)
|
Return the substring of *s* from character position *start*
|
||||||
up to but not including start + len. If start is greater than the
|
(zero-based) up to but not including *start + len*. If *start* is
|
||||||
length of the string, an empty string is returned, and if start +
|
greater than the length of the string, an empty string is returned,
|
||||||
len lies beyond the end of the string, only the substring up to the
|
and if *start + len* lies beyond the end of the string, only the
|
||||||
end of the string is returned. start must be non-negative. For
|
substring up to the end of the string is returned. *start* must be
|
||||||
example,
|
non-negative. For example,
|
||||||
|
|
||||||
builtins.substring 0 3 "nixos"
|
builtins.substring 0 3 "nixos"
|
||||||
|
|
||||||
evaluates to `"nix"`.
|
evaluates to `"nix"`.
|
||||||
|
|
||||||
- `builtins.tail` list
|
- `builtins.tail` *list*
|
||||||
Return the second to last elements of a list; abort evaluation if
|
Return the second to last elements of a list; abort evaluation if
|
||||||
the argument isn’t a list or is an empty list.
|
the argument isn’t a list or is an empty list.
|
||||||
|
|
||||||
- `throw` s; `builtins.throw` s
|
- `throw` *s*; `builtins.throw` *s*
|
||||||
Throw an error message s. This usually aborts Nix expression
|
Throw an error message *s*. This usually aborts Nix expression
|
||||||
evaluation, but in `nix-env -qa` and other commands that try to
|
evaluation, but in `nix-env -qa` and other commands that try to
|
||||||
evaluate a set of derivations to get information about those
|
evaluate a set of derivations to get information about those
|
||||||
derivations, a derivation that throws an error is silently skipped
|
derivations, a derivation that throws an error is silently skipped
|
||||||
(which is not the case for `abort`).
|
(which is not the case for `abort`).
|
||||||
|
|
||||||
- `builtins.toFile` name s
|
- `builtins.toFile` *name* *s*
|
||||||
Store the string s in a file in the Nix store and return its path.
|
Store the string *s* in a file in the Nix store and return its path.
|
||||||
The file has suffix name. This file can be used as an input to
|
The file has suffix *name*. This file can be used as an input to
|
||||||
derivations. One application is to write builders “inline”. For
|
derivations. One application is to write builders “inline”. For
|
||||||
instance, the following Nix expression combines [???](#ex-hello-nix)
|
instance, the following Nix expression combines [???](#ex-hello-nix)
|
||||||
and [???](#ex-hello-builder) into one file:
|
and [???](#ex-hello-builder) into one file:
|
||||||
|
@ -705,20 +708,20 @@ For instance, `derivation` is also available as `builtins.derivation`.
|
||||||
you are using Nixpkgs, the `writeTextFile` function is able to do
|
you are using Nixpkgs, the `writeTextFile` function is able to do
|
||||||
that.
|
that.
|
||||||
|
|
||||||
- `builtins.toJSON` e
|
- `builtins.toJSON` *e*
|
||||||
Return a string containing a JSON representation of e. Strings,
|
Return a string containing a JSON representation of *e*. Strings,
|
||||||
integers, floats, booleans, nulls and lists are mapped to their JSON
|
integers, floats, booleans, nulls and lists are mapped to their JSON
|
||||||
equivalents. Sets (except derivations) are represented as objects.
|
equivalents. Sets (except derivations) are represented as objects.
|
||||||
Derivations are translated to a JSON string containing the
|
Derivations are translated to a JSON string containing the
|
||||||
derivation’s output path. Paths are copied to the store and
|
derivation’s output path. Paths are copied to the store and
|
||||||
represented as a JSON string of the resulting store path.
|
represented as a JSON string of the resulting store path.
|
||||||
|
|
||||||
- `builtins.toPath` s
|
- `builtins.toPath` *s*
|
||||||
DEPRECATED. Use `/. + "/path"` to convert a string into an absolute
|
DEPRECATED. Use `/. + "/path"` to convert a string into an absolute
|
||||||
path. For relative paths, use `./. + "/path"`.
|
path. For relative paths, use `./. + "/path"`.
|
||||||
|
|
||||||
- `toString` e; `builtins.toString` e
|
- `toString` *e*; `builtins.toString` *e*
|
||||||
Convert the expression e to a string. e can be:
|
Convert the expression *e* to a string. *e* can be:
|
||||||
|
|
||||||
- A string (in which case the string is returned unmodified).
|
- A string (in which case the string is returned unmodified).
|
||||||
|
|
||||||
|
@ -735,8 +738,8 @@ For instance, `derivation` is also available as `builtins.derivation`.
|
||||||
|
|
||||||
- `null`, which yields the empty string.
|
- `null`, which yields the empty string.
|
||||||
|
|
||||||
- `builtins.toXML` e
|
- `builtins.toXML` *e*
|
||||||
Return a string containing an XML representation of e. The main
|
Return a string containing an XML representation of *e*. The main
|
||||||
application for `toXML` is to communicate information with the
|
application for `toXML` is to communicate information with the
|
||||||
builder in a more structured format than plain environment
|
builder in a more structured format than plain environment
|
||||||
variables.
|
variables.
|
||||||
|
@ -822,22 +825,23 @@ For instance, `derivation` is also available as `builtins.derivation`.
|
||||||
of the stylesheet is spliced into the builder using the syntax
|
of the stylesheet is spliced into the builder using the syntax
|
||||||
`xsltproc ${stylesheet}`.
|
`xsltproc ${stylesheet}`.
|
||||||
|
|
||||||
- `builtins.trace` e1 e2
|
- `builtins.trace` *e1* *e2*
|
||||||
Evaluate e1 and print its abstract syntax representation on standard
|
Evaluate *e1* and print its abstract syntax representation on
|
||||||
error. Then return e2. This function is useful for debugging.
|
standard error. Then return *e2*. This function is useful for
|
||||||
|
debugging.
|
||||||
|
|
||||||
- `builtins.tryEval` e
|
- `builtins.tryEval` *e*
|
||||||
Try to shallowly evaluate e. Return a set containing the attributes
|
Try to shallowly evaluate *e*. Return a set containing the
|
||||||
`success` (`true` if e evaluated successfully, `false` if an error
|
attributes `success` (`true` if *e* evaluated successfully, `false`
|
||||||
was thrown) and `value`, equalling e if successful and `false`
|
if an error was thrown) and `value`, equalling *e* if successful and
|
||||||
otherwise. Note that this doesn't evaluate e deeply, so ` let e = {
|
`false` otherwise. Note that this doesn't evaluate *e* deeply, so
|
||||||
x = throw ""; }; in (builtins.tryEval e).success
|
` let e = { x = throw ""; }; in (builtins.tryEval e).success
|
||||||
` will be `true`. Using ` builtins.deepSeq
|
` will be `true`. Using ` builtins.deepSeq
|
||||||
` one can get the expected result: `let e = { x = throw "";
|
` one can get the expected result: `let e = { x = throw "";
|
||||||
}; in (builtins.tryEval (builtins.deepSeq e e)).success` will be
|
}; in (builtins.tryEval (builtins.deepSeq e e)).success` will be
|
||||||
`false`.
|
`false`.
|
||||||
|
|
||||||
- `builtins.typeOf` e
|
- `builtins.typeOf` *e*
|
||||||
Return a string representing the type of the value e, namely
|
Return a string representing the type of the value *e*, namely
|
||||||
`"int"`, `"bool"`, `"string"`, `"path"`, `"null"`, `"set"`,
|
`"int"`, `"bool"`, `"string"`, `"path"`, `"null"`, `"set"`,
|
||||||
`"list"`, `"lambda"` or `"float"`.
|
`"list"`, `"lambda"` or `"float"`.
|
||||||
|
|
|
@ -33,7 +33,7 @@ elements (referenced from the figure by number):
|
||||||
|
|
||||||
Nix functions generally have the form `{ x, y, ...,
|
Nix functions generally have the form `{ x, y, ...,
|
||||||
z }: e` where `x`, `y`, etc. are the names of the expected
|
z }: e` where `x`, `y`, etc. are the names of the expected
|
||||||
arguments, and where e is the body of the function. So here, the
|
arguments, and where *e* is the body of the function. So here, the
|
||||||
entire remainder of the file is the body of the function; when given
|
entire remainder of the file is the body of the function; when given
|
||||||
the required arguments, the body should describe how to build an
|
the required arguments, the body should describe how to build an
|
||||||
instance of the Hello package.
|
instance of the Hello package.
|
||||||
|
|
|
@ -147,7 +147,7 @@ three kinds of patterns:
|
||||||
It is possible to provide *default values* for attributes, in which
|
It is possible to provide *default values* for attributes, in which
|
||||||
case they are allowed to be missing. A default value is specified by
|
case they are allowed to be missing. A default value is specified by
|
||||||
writing `name ?
|
writing `name ?
|
||||||
e`, where e is an arbitrary expression. For example,
|
e`, where *e* is an arbitrary expression. For example,
|
||||||
|
|
||||||
{ x, y ? "foo", z ? "bar" }: z + y + x
|
{ x, y ? "foo", z ? "bar" }: z + y + x
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ Conditionals look like this:
|
||||||
|
|
||||||
if e1 then e2 else e3
|
if e1 then e2 else e3
|
||||||
|
|
||||||
where e1 is an expression that should evaluate to a Boolean value
|
where *e1* is an expression that should evaluate to a Boolean value
|
||||||
(`true` or `false`).
|
(`true` or `false`).
|
||||||
|
|
||||||
## Assertions
|
## Assertions
|
||||||
|
@ -211,9 +211,9 @@ between features and dependencies hold. They look like this:
|
||||||
|
|
||||||
assert e1; e2
|
assert e1; e2
|
||||||
|
|
||||||
where e1 is an expression that should evaluate to a Boolean value. If it
|
where *e1* is an expression that should evaluate to a Boolean value. If
|
||||||
evaluates to `true`, e2 is returned; otherwise expression evaluation is
|
it evaluates to `true`, *e2* is returned; otherwise expression
|
||||||
aborted and a backtrace is printed.
|
evaluation is aborted and a backtrace is printed.
|
||||||
|
|
||||||
Here is a Nix expression for the Subversion package that shows how
|
Here is a Nix expression for the Subversion package that shows how
|
||||||
assertions can be used:.
|
assertions can be used:.
|
||||||
|
@ -275,8 +275,8 @@ A *with-expression*,
|
||||||
|
|
||||||
with e1; e2
|
with e1; e2
|
||||||
|
|
||||||
introduces the set e1 into the lexical scope of the expression e2. For
|
introduces the set *e1* into the lexical scope of the expression *e2*.
|
||||||
instance,
|
For instance,
|
||||||
|
|
||||||
let as = { x = "foo"; y = "bar"; };
|
let as = { x = "foo"; y = "bar"; };
|
||||||
in with as; x + y
|
in with as; x + y
|
||||||
|
|
|
@ -5,28 +5,28 @@ expression language, in order of precedence (from strongest to weakest
|
||||||
binding).
|
binding).
|
||||||
|
|
||||||
| Name | Syntax | Associativity | Description | Precedence |
|
| Name | Syntax | Associativity | Description | Precedence |
|
||||||
| ------------------------ | ----------------------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
|
| ------------------------ | ----------------------------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
|
||||||
| Select | e `.` attrpath \[ `or` def \] | none | Select attribute denoted by the attribute path attrpath from set e. (An attribute path is a dot-separated list of attribute names.) If the attribute doesn’t exist, return def if provided, otherwise abort evaluation. | 1 |
|
| Select | *e* `.` *attrpath* \[ `or` *def* \] | none | Select attribute denoted by the attribute path *attrpath* from set *e*. (An attribute path is a dot-separated list of attribute names.) If the attribute doesn’t exist, return *def* if provided, otherwise abort evaluation. | 1 |
|
||||||
| Application | e1 e2 | left | Call function e1 with argument e2. | 2 |
|
| Application | *e1* *e2* | left | Call function *e1* with argument *e2*. | 2 |
|
||||||
| Arithmetic Negation | `-` e | none | Arithmetic negation. | 3 |
|
| Arithmetic Negation | `-` *e* | none | Arithmetic negation. | 3 |
|
||||||
| Has Attribute | e `?` attrpath | none | Test whether set e contains the attribute denoted by attrpath; return `true` or `false`. | 4 |
|
| Has Attribute | *e* `?` *attrpath* | none | Test whether set *e* contains the attribute denoted by *attrpath*; return `true` or `false`. | 4 |
|
||||||
| List Concatenation | e1 `++` e2 | right | List concatenation. | 5 |
|
| List Concatenation | *e1* `++` *e2* | right | List concatenation. | 5 |
|
||||||
| Multiplication | e1 `*` e2, | left | Arithmetic multiplication. | 6 |
|
| Multiplication | *e1* `*` *e2*, | left | Arithmetic multiplication. | 6 |
|
||||||
| Division | e1 `/` e2 | left | Arithmetic division. | 6 |
|
| Division | *e1* `/` *e2* | left | Arithmetic division. | 6 |
|
||||||
| Addition | e1 `+` e2 | left | Arithmetic addition. | 7 |
|
| Addition | *e1* `+` *e2* | left | Arithmetic addition. | 7 |
|
||||||
| Subtraction | e1 `-` e2 | left | Arithmetic subtraction. | 7 |
|
| Subtraction | *e1* `-` *e2* | left | Arithmetic subtraction. | 7 |
|
||||||
| String Concatenation | string1 `+` string2 | left | String concatenation. | 7 |
|
| String Concatenation | *string1* `+` *string2* | left | String concatenation. | 7 |
|
||||||
| Not | `!` e | none | Boolean negation. | 8 |
|
| Not | `!` *e* | none | Boolean negation. | 8 |
|
||||||
| Update | e1 `//` e2 | right | Return a set consisting of the attributes in e1 and e2 (with the latter taking precedence over the former in case of equally named attributes). | 9 |
|
| Update | *e1* `//` *e2* | right | Return a set consisting of the attributes in *e1* and *e2* (with the latter taking precedence over the former in case of equally named attributes). | 9 |
|
||||||
| Less Than | e1 `<` e2, | none | Arithmetic comparison. | 10 |
|
| Less Than | *e1* `<` *e2*, | none | Arithmetic comparison. | 10 |
|
||||||
| Less Than or Equal To | e1 `<=` e2 | none | Arithmetic comparison. | 10 |
|
| Less Than or Equal To | *e1* `<=` *e2* | none | Arithmetic comparison. | 10 |
|
||||||
| Greater Than | e1 `>` e2 | none | Arithmetic comparison. | 10 |
|
| Greater Than | *e1* `>` *e2* | none | Arithmetic comparison. | 10 |
|
||||||
| Greater Than or Equal To | e1 `>=` e2 | none | Arithmetic comparison. | 10 |
|
| Greater Than or Equal To | *e1* `>=` *e2* | none | Arithmetic comparison. | 10 |
|
||||||
| Equality | e1 `==` e2 | none | Equality. | 11 |
|
| Equality | *e1* `==` *e2* | none | Equality. | 11 |
|
||||||
| Inequality | e1 `!=` e2 | none | Inequality. | 11 |
|
| Inequality | *e1* `!=` *e2* | none | Inequality. | 11 |
|
||||||
| Logical AND | e1 `&&` e2 | left | Logical AND. | 12 |
|
| Logical AND | *e1* `&&` *e2* | left | Logical AND. | 12 |
|
||||||
| Logical OR | e1 `\|\|` e2 | left | Logical OR. | 13 |
|
| Logical OR | *e1* `\|\|` *e2* | left | Logical OR. | 13 |
|
||||||
| Logical Implication | e1 `->` e2 | none | Logical implication (equivalent to `!e1 \|\|
|
| Logical Implication | *e1* `->` *e2* | none | Logical implication (equivalent to `!e1 \|\|
|
||||||
e2`). | 14 |
|
e2`). | 14 |
|
||||||
|
|
||||||
Operators
|
Operators
|
||||||
|
|
|
@ -17,7 +17,7 @@ command:
|
||||||
The installation path can be specified by passing the `--prefix=prefix`
|
The installation path can be specified by passing the `--prefix=prefix`
|
||||||
to `configure`. The default installation directory is `/usr/local`. You
|
to `configure`. The default installation directory is `/usr/local`. You
|
||||||
can change this to any location you like. You must have write permission
|
can change this to any location you like. You must have write permission
|
||||||
to the prefix path.
|
to the *prefix* path.
|
||||||
|
|
||||||
Nix keeps its *store* (the place where packages are stored) in
|
Nix keeps its *store* (the place where packages are stored) in
|
||||||
`/nix/store` by default. This can be changed using
|
`/nix/store` by default. This can be changed using
|
||||||
|
|
|
@ -60,7 +60,8 @@ Nixpkgs tree using the `-f` flag:
|
||||||
|
|
||||||
$ nix-env -qaf /path/to/nixpkgs
|
$ nix-env -qaf /path/to/nixpkgs
|
||||||
|
|
||||||
where /path/to/nixpkgs is where you’ve unpacked or checked out Nixpkgs.
|
where */path/to/nixpkgs* is where you’ve unpacked or checked out
|
||||||
|
Nixpkgs.
|
||||||
|
|
||||||
You can select specific packages by name:
|
You can select specific packages by name:
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
- `nix-env -i
|
- `nix-env -i
|
||||||
pkgname` will now install the highest available version of
|
pkgname` will now install the highest available version of
|
||||||
pkgname, rather than installing all available versions (which
|
*pkgname*, rather than installing all available versions (which
|
||||||
would probably give collisions) (`NIX-31`).
|
would probably give collisions) (`NIX-31`).
|
||||||
|
|
||||||
- `nix-env (-i|-u) --dry-run` now shows exactly which missing
|
- `nix-env (-i|-u) --dry-run` now shows exactly which missing
|
||||||
|
|
|
@ -41,10 +41,10 @@
|
||||||
|
|
||||||
- The garbage collector has a number of new options to allow only some
|
- The garbage collector has a number of new options to allow only some
|
||||||
of the garbage to be deleted. The option `--max-freed N` tells the
|
of the garbage to be deleted. The option `--max-freed N` tells the
|
||||||
collector to stop after at least N bytes have been deleted. The
|
collector to stop after at least *N* bytes have been deleted. The
|
||||||
option `--max-links
|
option `--max-links
|
||||||
N` tells it to stop after the link count on `/nix/store` has dropped
|
N` tells it to stop after the link count on `/nix/store` has dropped
|
||||||
below N. This is useful for very large Nix stores on filesystems
|
below *N*. This is useful for very large Nix stores on filesystems
|
||||||
with a 32000 subdirectories limit (like `ext3`). The option
|
with a 32000 subdirectories limit (like `ext3`). The option
|
||||||
`--use-atime` causes store paths to be deleted in order of ascending
|
`--use-atime` causes store paths to be deleted in order of ascending
|
||||||
last access time. This allows non-recently used stuff to be deleted.
|
last access time. This allows non-recently used stuff to be deleted.
|
||||||
|
|
|
@ -51,5 +51,5 @@ This is primarily a bug fix release. It has some new features:
|
||||||
option is used.
|
option is used.
|
||||||
|
|
||||||
- The scoping rules for `inherit
|
- The scoping rules for `inherit
|
||||||
(e) ...` in recursive attribute sets have changed. The expression e
|
(e) ...` in recursive attribute sets have changed. The expression
|
||||||
can now refer to the attributes defined in the containing set.
|
*e* can now refer to the attributes defined in the containing set.
|
||||||
|
|
|
@ -15,7 +15,7 @@ This release has the following improvements:
|
||||||
`--cores
|
`--cores
|
||||||
N` as well as a configuration setting `build-cores =
|
N` as well as a configuration setting `build-cores =
|
||||||
N` that causes the environment variable `NIX_BUILD_CORES` to be set
|
N` that causes the environment variable `NIX_BUILD_CORES` to be set
|
||||||
to N when the builder is invoked. The builder can use this at its
|
to *N* when the builder is invoked. The builder can use this at its
|
||||||
discretion to perform a parallel build, e.g., by calling `make -j
|
discretion to perform a parallel build, e.g., by calling `make -j
|
||||||
N`. In Nixpkgs, this can be enabled on a per-package basis by
|
N`. In Nixpkgs, this can be enabled on a per-package basis by
|
||||||
setting the derivation attribute `enableParallelBuilding` to `true`.
|
setting the derivation attribute `enableParallelBuilding` to `true`.
|
||||||
|
|
|
@ -49,8 +49,8 @@
|
||||||
|
|
||||||
- New language construct: `with
|
- New language construct: `with
|
||||||
E1;
|
E1;
|
||||||
E2` brings all attributes defined in the attribute set E1 in
|
E2` brings all attributes defined in the attribute set *E1* in
|
||||||
scope in E2.
|
scope in *E2*.
|
||||||
|
|
||||||
- Added a `map` function.
|
- Added a `map` function.
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ features:
|
||||||
derivations, and in `builtins.hashString`.
|
derivations, and in `builtins.hashString`.
|
||||||
|
|
||||||
- The new flag `--option build-repeat
|
- The new flag `--option build-repeat
|
||||||
N` will cause every build to be executed N+1 times. If the build
|
N` will cause every build to be executed *N*+1 times. If the build
|
||||||
output differs between any round, the build is rejected, and the
|
output differs between any round, the build is rejected, and the
|
||||||
output paths are not registered as valid. This is primarily useful
|
output paths are not registered as valid. This is primarily useful
|
||||||
to verify build determinism. (We already had a `--check` option to
|
to verify build determinism. (We already had a `--check` option to
|
||||||
|
|
|
@ -10,7 +10,7 @@ There are also the following improvements:
|
||||||
|
|
||||||
- New built-in function: `builtins.hashString`.
|
- New built-in function: `builtins.hashString`.
|
||||||
|
|
||||||
- Build logs are now stored in `/nix/var/log/nix/drvs/XX/`, where XX
|
- Build logs are now stored in `/nix/var/log/nix/drvs/XX/`, where *XX*
|
||||||
is the first two characters of the derivation. This is useful on
|
is the first two characters of the derivation. This is useful on
|
||||||
machines that keep a lot of build logs (such as Hydra servers).
|
machines that keep a lot of build logs (such as Hydra servers).
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@ This is primarily a bug fix release. Changes of interest are:
|
||||||
strings, such as `"${/foo}/bar"`. This release reverts to the Nix
|
strings, such as `"${/foo}/bar"`. This release reverts to the Nix
|
||||||
1.5.3 behaviour.
|
1.5.3 behaviour.
|
||||||
|
|
||||||
- Previously, Nix optimised expressions such as `"${expr}"` to expr.
|
- Previously, Nix optimised expressions such as `"${expr}"` to *expr*.
|
||||||
Thus it neither checked whether expr could be coerced to a string,
|
Thus it neither checked whether *expr* could be coerced to a string,
|
||||||
nor applied such coercions. This meant that `"${123}"` evaluatued to
|
nor applied such coercions. This meant that `"${123}"` evaluatued to
|
||||||
`123`, and `"${./foo}"` evaluated to `./foo` (even though `"${./foo}
|
`123`, and `"${./foo}"` evaluated to `./foo` (even though `"${./foo}
|
||||||
"` evaluates to `"/nix/store/hash-foo "`). Nix now checks the type
|
"` evaluates to `"/nix/store/hash-foo "`). Nix now checks the type
|
||||||
|
|
|
@ -89,10 +89,10 @@ features:
|
||||||
specifier. For example, `nix-store --gc --max-freed
|
specifier. For example, `nix-store --gc --max-freed
|
||||||
1G` will free up to 1 gigabyte of disk space.
|
1G` will free up to 1 gigabyte of disk space.
|
||||||
|
|
||||||
- `nix-collect-garbage` has a new flag `--delete-older-than` N`d`,
|
- `nix-collect-garbage` has a new flag `--delete-older-than` *N*`d`,
|
||||||
which deletes all user environment generations older than N days.
|
which deletes all user environment generations older than *N* days.
|
||||||
Likewise, `nix-env
|
Likewise, `nix-env
|
||||||
--delete-generations` accepts a N`d` age limit.
|
--delete-generations` accepts a *N*`d` age limit.
|
||||||
|
|
||||||
- Nix now heuristically detects whether a build failure was due to a
|
- Nix now heuristically detects whether a build failure was due to a
|
||||||
disk-full condition. In that case, the build is not flagged as
|
disk-full condition. In that case, the build is not flagged as
|
||||||
|
|
Loading…
Reference in a new issue