* 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,4 +1,5 @@
<refentry> <refentry>
<refnamediv> <refnamediv>
<refname>nix-store</refname> <refname>nix-store</refname>
<refpurpose>manipulate or query the Nix store</refpurpose> <refpurpose>manipulate or query the Nix store</refpurpose>
@ -8,26 +9,24 @@
<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#xpointer(/nop/*)" /> <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 choice='plain'><replaceable>operation</replaceable></arg>
<arg rep='repeat'><replaceable>options</replaceable></arg> <arg rep='repeat'><replaceable>options</replaceable></arg>
<arg rep='repeat'><replaceable>arguments</replaceable></arg> <arg rep='repeat'><replaceable>arguments</replaceable></arg>
</cmdsynopsis> </cmdsynopsis>
</refsynopsisdiv> </refsynopsisdiv>
<refsection>
<title>Description</title>
<para> <refsection><title>Description</title>
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> <para>The command <command>nix-store</command> performs primitive
<command>nix-store</command> takes exactly one operations on the Nix store. You generally do not need to run this
<emphasis>operation</emphasis> flag which indicates the command manually.</para>
subcommand to be performed. These are documented below.
</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>
@ -35,42 +34,65 @@
<!--######################################################################--> <!--######################################################################-->
<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>
<!--######################################################################-->
<refsection>
<title>Environment variables</title>
<para>
The following environment variables affect the behaviour of
<command>nix-store</command>.
</para>
<variablelist> <variablelist>
<varlistentry> <varlistentry><term><option>--add-root</option> <replaceable>path</replaceable></term>
<term><envar>TMPDIR</envar>=<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>
</varlistentry>
<varlistentry><term><option>--indirect</option></term>
<listitem> <listitem>
<para>
Use the directory <replaceable>path</replaceable> to store <para>In conjunction with <option>--add-root</option>, this option
temporary files. In particular, this includes temporary allows roots to be stored <emphasis>outside</emphasis> of the GC
build directories; these can take up substantial amounts roots directory. This is useful for commands such as
of disk space. The default is <filename>/tmp</filename>. <command>nix-build</command> that place a symlink to the build
</para> 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> </listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>
@ -81,11 +103,11 @@
<!--######################################################################--> <!--######################################################################-->
<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><title>Synopsis</title>
<refsection>
<title>Synopsis</title>
<cmdsynopsis> <cmdsynopsis>
<command>nix-store</command> <command>nix-store</command>
<group choice='req'> <group choice='req'>
@ -94,32 +116,27 @@
</group> </group>
<arg choice='plain' rep='repeat'><replaceable>paths</replaceable></arg> <arg choice='plain' rep='repeat'><replaceable>paths</replaceable></arg>
</cmdsynopsis> </cmdsynopsis>
</refsection> </refsection>
<refsection> <refsection><title>Description</title>
<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 <replaceable>paths</replaceable>. If these expressions are derivation
derivation expressions, they are first expressions, they are first <emphasis>normalised</emphasis> into a
<emphasis>normalised</emphasis> into a closure expression. closure expression. This may happen in two ways. First, the
This may happen in two ways. First, the corresponding closure corresponding closure expression (the <emphasis>successor</emphasis>)
expression (the <emphasis>successor</emphasis>) may already may already known (either because the build has already been
known (either because the build has already been performed, or performed, or because a successor was explicitly registered through
because a successor was explicitly registered through the the <option>--successor</option> operation). Otherwise, the build
<option>--successor</option> operation). Otherwise, the build
action described by the derivation is performed, and a closure action described by the derivation is performed, and a closure
expression is computed by scanning the result of the build for expression is computed by scanning the result of the build for
references to other paths in the store. references to other paths in the store.</para>
</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>

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;
} }