* Manual updates.

This commit is contained in:
Eelco Dolstra 2005-03-17 10:30:53 +00:00
parent ad3121a52d
commit 67eff20906
5 changed files with 130 additions and 101 deletions

View file

@ -107,6 +107,17 @@ $ mount -o bind /mnt/otherdisk/nix /nix</screen>
</varlistentry> </varlistentry>
<varlistentry><term><envar>TMPDIR</envar></term>
<listitem><para>Use the specified directory to store temporary
files. In particular, this includes temporary build directories;
these can take up substantial amounts of disk space. The default is
<filename>/tmp</filename>.</para></listitem>
</varlistentry>
</variablelist> </variablelist>
</sect1> </sect1>

View file

@ -1,133 +1,150 @@
<refentry> <refentry>
<refnamediv>
<refname>nix-store</refname>
<refpurpose>manipulate or query the Nix store</refpurpose>
</refnamediv>
<refsynopsisdiv> <refnamediv>
<cmdsynopsis> <refname>nix-store</refname>
<command>nix-store</command> <refpurpose>manipulate or query the Nix store</refpurpose>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="opt-common-syn.xml#xpointer(/nop/*)" /> </refnamediv>
<arg choice='plain'><replaceable>operation</replaceable></arg>
<arg rep='repeat'><replaceable>options</replaceable></arg>
<arg rep='repeat'><replaceable>arguments</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsection> <refsynopsisdiv>
<title>Description</title> <cmdsynopsis>
<command>nix-store</command>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="opt-common-syn.xml#xpointer(/nop/*)" />
<arg><option>--add-root</option> <replaceable>path</replaceable></arg>
<arg><option>--indirect</option></arg>
<arg choice='plain'><replaceable>operation</replaceable></arg>
<arg rep='repeat'><replaceable>options</replaceable></arg>
<arg rep='repeat'><replaceable>arguments</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<para>
The command <command>nix-store</command> performs primitive
operations on the Nix store. You generally do not need to run
this command manually.
</para>
<para> <refsection><title>Description</title>
<command>nix-store</command> takes exactly one
<emphasis>operation</emphasis> flag which indicates the
subcommand to be performed. These are documented below.
</para>
</refsection> <para>The command <command>nix-store</command> performs primitive
operations on the Nix store. You generally do not need to run this
command manually.</para>
<para><command>nix-store</command> takes exactly one
<emphasis>operation</emphasis> flag which indicates the subcommand to
be performed. These are documented below.</para>
</refsection>
<!--######################################################################--> <!--######################################################################-->
<refsection> <refsection><title>Common options</title>
<title>Common options</title>
<para> <para>This section lists the options that are common to all
This section lists the options that are common to all operations. These options are allowed for every subcommand, though
operations. These options are allowed for every subcommand, they may not always have an effect. See also <xref
though they may not always have an effect. See also <xref linkend="sec-common-options" />.</para>
linkend="sec-common-options" />.
</para>
</refsection> <variablelist>
<varlistentry><term><option>--add-root</option> <replaceable>path</replaceable></term>
<!--######################################################################--> <listitem><para>Causes the result of a build action
(<option>--realise</option> and <option>--force-realise</option>)
to be registered as a root of the garbage collector (see <xref
linkend="ssec-gc-roots" />). The root is stored in
<replaceable>path</replaceable>, which must be inside a directory
that is scanned for roots by the garbage collector (i.e.,
typically in a subdirectory of
<filename>/nix/var/nix/gcroots/</filename>)
<emphasis>unless</emphasis> the <option>--indirect</option> flag
is used.</para></listitem>
<refsection> </varlistentry>
<title>Environment variables</title>
<para> <varlistentry><term><option>--indirect</option></term>
The following environment variables affect the behaviour of
<command>nix-store</command>. <listitem>
</para>
<para>In conjunction with <option>--add-root</option>, this option
allows roots to be stored <emphasis>outside</emphasis> of the GC
roots directory. This is useful for commands such as
<command>nix-build</command> that place a symlink to the build
result in the current directory; such a build result should not be
garbage-collected unless the symlink is removed.</para>
<para>The <option>--indirect</option> flag causes a uniquely named
symlink to <replaceable>path</replaceable> to be stored in
<filename>/nix/var/nix/gcroots/auto/</filename>. For instance,
<screen>
$ nix-store --add-root /home/eelco/bla/result --indirect -r <replaceable>...</replaceable>
$ ls -l /nix/var/nix/gcroots/auto
lrwxrwxrwx 1 ... 2005-03-13 21:10 dn54lcypm8f8... -> /home/eelco/bla/result
$ ls -l /home/eelco/bla/result
lrwxrwxrwx 1 ... 2005-03-13 21:10 /home/eelco/bla/result -> /nix/store/1r11343n6qd4...-f-spot-0.0.10</screen>
Thus, when <filename>/home/eelco/bla/result</filename> is removed,
the GC root in the <filename>auto</filename> directory becomes a
dangling symlink and will be ignored by the collector.</para>
<warning><para>Note that it is not possible to move or rename
indirect GC roots, since the symlink in the
<filename>auto</filename> directory will still point to the old
location.</para></warning>
</listitem>
</varlistentry>
<variablelist> </variablelist>
<varlistentry> </refsection>
<term><envar>TMPDIR</envar>=<replaceable>path</replaceable></term>
<listitem>
<para>
Use the directory <replaceable>path</replaceable> to store
temporary files. In particular, this includes temporary
build directories; these can take up substantial amounts
of disk space. The default is <filename>/tmp</filename>.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<!--######################################################################--> <!--######################################################################-->
<refsection id='rsec-nix-store-realise'> <refsection id='rsec-nix-store-realise'><title>Operation
<title>Operation <option>--realise</option></title> <option>--realise</option></title>
<refsection> <refsection><title>Synopsis</title>
<title>Synopsis</title>
<cmdsynopsis>
<command>nix-store</command>
<group choice='req'>
<arg choice='plain'><option>--realise</option></arg>
<arg choice='plain'><option>-r</option></arg>
</group>
<arg choice='plain' rep='repeat'><replaceable>paths</replaceable></arg>
</cmdsynopsis>
</refsection>
<refsection> <cmdsynopsis>
<title>Description</title> <command>nix-store</command>
<group choice='req'>
<arg choice='plain'><option>--realise</option></arg>
<arg choice='plain'><option>-r</option></arg>
</group>
<arg choice='plain' rep='repeat'><replaceable>paths</replaceable></arg>
</cmdsynopsis>
</refsection>
<refsection><title>Description</title>
<para> <para>The operation <option>--install</option> realises in the file
The operation <option>--install</option> realises in the file system the store expressions stored in
system the store expressions stored in <replaceable>paths</replaceable>. If these expressions are derivation
<replaceable>paths</replaceable>. If these expressions are expressions, they are first <emphasis>normalised</emphasis> into a
derivation expressions, they are first closure expression. This may happen in two ways. First, the
<emphasis>normalised</emphasis> into a closure expression. corresponding closure expression (the <emphasis>successor</emphasis>)
This may happen in two ways. First, the corresponding closure may already known (either because the build has already been
expression (the <emphasis>successor</emphasis>) may already performed, or because a successor was explicitly registered through
known (either because the build has already been performed, or the <option>--successor</option> operation). Otherwise, the build
because a successor was explicitly registered through the action described by the derivation is performed, and a closure
<option>--successor</option> operation). Otherwise, the build expression is computed by scanning the result of the build for
action described by the derivation is performed, and a closure references to other paths in the store.</para>
expression is computed by scanning the result of the build for
references to other paths in the store.
</para>
<para> <para>The paths of the closure expression corresponding to each
The paths of the closure expression corresponding to each expression in <replaceable>paths</replaceable> is printed on standard
expression in <replaceable>paths</replaceable> is printed on output.</para>
standard output.
</para>
</refsection> </refsection>
</refsection> </refsection>
<!--######################################################################--> <!--######################################################################-->
<refsection> <refsection>
<title>Operation <option>--gc</option></title> <title>Operation <option>--gc</option></title>

View file

@ -19,5 +19,6 @@
<arg><option>-K</option></arg> <arg><option>-K</option></arg>
<arg><option>--fallback</option></arg> <arg><option>--fallback</option></arg>
<arg><option>--readonly-mode</option></arg> <arg><option>--readonly-mode</option></arg>
<arg><option>--log-type</option> <replaceable>type</replaceable></arg>
</nop> </nop>

View file

@ -379,7 +379,7 @@ $ nix-collect-garbage --print-dead</screen>
Likewise, the option <option>--print-live</option> will show the paths Likewise, the option <option>--print-live</option> will show the paths
that <emphasis>wont</emphasis> be deleted.</para> that <emphasis>wont</emphasis> be deleted.</para>
<sect2><title>Garbage collector roots</title> <sect2 id="ssec-gc-roots"><title>Garbage collector roots</title>
<para>TODO</para> <para>TODO</para>

View file

@ -154,7 +154,7 @@ a:hover { background: #ffffcd; }
Special elements: Special elements:
***************************************************************************/ ***************************************************************************/
tt tt, code
{ {
color: #400000; color: #400000;
} }