mirror of
https://github.com/NixOS/nix.git
synced 2024-11-01 14:50:49 +00:00
Merge branch 'master' into no-manifests
This commit is contained in:
commit
9c2decaa19
@ -37,6 +37,11 @@
|
|||||||
<option>-I</option>
|
<option>-I</option>
|
||||||
<replaceable>path</replaceable>
|
<replaceable>path</replaceable>
|
||||||
</arg>
|
</arg>
|
||||||
|
<arg>
|
||||||
|
<option>--option</option>
|
||||||
|
<replaceable>name</replaceable>
|
||||||
|
<replaceable>value</replaceable>
|
||||||
|
</arg>
|
||||||
<sbr />
|
<sbr />
|
||||||
|
|
||||||
</nop>
|
</nop>
|
||||||
|
@ -337,7 +337,7 @@
|
|||||||
|
|
||||||
<listitem><para>Causes Nix to print out a stack trace in case of Nix
|
<listitem><para>Causes Nix to print out a stack trace in case of Nix
|
||||||
expression evaluation errors.</para></listitem>
|
expression evaluation errors.</para></listitem>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
|
||||||
@ -351,6 +351,16 @@
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
|
||||||
|
<varlistentry><term><option>--option</option> <replaceable>name</replaceable> <replaceable>value</replaceable></term>
|
||||||
|
|
||||||
|
<listitem><para>Set the Nix configuration option
|
||||||
|
<replaceable>name</replaceable> to <replaceable>value</replaceable>.
|
||||||
|
This overrides settings in the Nix configuration file (see
|
||||||
|
<citerefentry><refentrytitle>nix.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>).</para></listitem>
|
||||||
|
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
|
|
||||||
|
@ -175,21 +175,6 @@ upgrading `coreutils-5.0' to `coreutils-5.2.1'</screen>
|
|||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>If you grow bored of specifying the Nix expressions using
|
|
||||||
<parameter>-f</parameter> all the time, you can set a default
|
|
||||||
location:
|
|
||||||
|
|
||||||
<screen>
|
|
||||||
$ nix-env -I nixpkgs-<replaceable>version</replaceable></screen>
|
|
||||||
|
|
||||||
After this you can just say, for instance, <literal>nix-env -u
|
|
||||||
'*'</literal>.<footnote><para>Setting a default using
|
|
||||||
<parameter>-I</parameter> currently clashes with using Nix channels,
|
|
||||||
since <literal>nix-channel --update</literal> calls <literal>nix-env
|
|
||||||
-I</literal> to set the default to the Nix expressions it downloaded
|
|
||||||
from the channel, replacing whatever default you had
|
|
||||||
set.</para></footnote></para>
|
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include "util.hh"
|
#include "util.hh"
|
||||||
#include "local-store.hh"
|
#include "local-store.hh"
|
||||||
#include "immutable.hh"
|
#include "immutable.hh"
|
||||||
@ -51,6 +53,8 @@ struct MakeImmutable
|
|||||||
|
|
||||||
void LocalStore::optimisePath_(OptimiseStats & stats, const Path & path)
|
void LocalStore::optimisePath_(OptimiseStats & stats, const Path & path)
|
||||||
{
|
{
|
||||||
|
checkInterrupt();
|
||||||
|
|
||||||
struct stat st;
|
struct stat st;
|
||||||
if (lstat(path.c_str(), &st))
|
if (lstat(path.c_str(), &st))
|
||||||
throw SysError(format("getting attributes of path `%1%'") % path);
|
throw SysError(format("getting attributes of path `%1%'") % path);
|
||||||
@ -65,7 +69,6 @@ void LocalStore::optimisePath_(OptimiseStats & stats, const Path & path)
|
|||||||
/* We can hard link regular files and maybe symlinks. */
|
/* We can hard link regular files and maybe symlinks. */
|
||||||
if (!S_ISREG(st.st_mode)
|
if (!S_ISREG(st.st_mode)
|
||||||
#if CAN_LINK_SYMLINK
|
#if CAN_LINK_SYMLINK
|
||||||
x
|
|
||||||
&& !S_ISLNK(st.st_mode)
|
&& !S_ISLNK(st.st_mode)
|
||||||
#endif
|
#endif
|
||||||
) return;
|
) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user