lix/doc/manual/release-notes.xml

2534 lines
88 KiB
XML
Raw Normal View History

2006-08-22 13:19:06 +00:00
<article xmlns="http://docbook.org/ns/docbook"
2007-09-19 14:01:41 +00:00
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:id="sec-relnotes">
<title>Nix Release Notes</title>
2014-07-17 22:01:06 +00:00
<!--==================================================================-->
<section xml:id="ssec-relnotes-1.8"><title>Release 1.8 (TBA)</title>
<para>TODO</para>
2014-08-27 14:46:02 +00:00
<itemizedlist>
<listitem><para>Derivations can specify the new special attribute
<varname>allowedRequisites</varname>, which has a similar meaning to
<varname>allowedReferences</varname>. But instead of only enforcing
to explicitly specify the immediate references, it requires the
derivation to specify all the dependencies recursively (hence the
name, requisites) that are used by the resulting
output.</para></listitem>
2014-08-27 14:46:02 +00:00
</itemizedlist>
2014-07-17 22:01:06 +00:00
</section>
<!--==================================================================-->
2014-04-10 21:42:48 +00:00
<section xml:id="ssec-relnotes-1.7"><title>Release 1.7 (April 11, 2014)</title>
2014-03-12 12:58:06 +00:00
<para>In addition to the usual bug fixes, this release has the
following new features:</para>
<itemizedlist>
2014-03-12 12:58:06 +00:00
<listitem>
<para>Antiquotation is now allowed inside of quoted attribute
names (e.g. <literal>set."${foo}"</literal>). In the case where
the attribute name is just a single antiquotation, the quotes can
be dropped (e.g. the above example can be written
<literal>set.${foo}</literal>). If an attribute name inside of a
set declaration evaluates to <literal>null</literal> (e.g.
<literal>{ ${null} = false; }</literal>), then that attribute is
not added to the set.</para>
</listitem>
<listitem>
<para>Experimental support for cryptographically signed binary
caches. See <link
xlink:href="https://github.com/NixOS/nix/commit/0fdf4da0e979f992db75cc17376e455ddc5a96d8">the
commit for details</link>.</para>
</listitem>
<listitem>
<para>An experimental new substituter,
<command>download-via-ssh</command>, that fetches binaries from
remote machines via SSH. Specifying the flags <literal>--option
use-ssh-substituter true --option ssh-substituter-hosts
<replaceable>user@hostname</replaceable></literal> will cause Nix
to download binaries from the specified machine, if it has
them.</para>
</listitem>
<listitem>
<para><command>nix-store -r</command> and
<command>nix-build</command> have a new flag,
<option>--check</option>, that builds a previously built
derivation again, and prints an error message if the output is not
exactly the same. This helps to verify whether a derivation is
truly deterministic. For example:
<screen>
$ nix-build '&lt;nixpkgs>' -A patchelf
<replaceable></replaceable>
$ nix-build '&lt;nixpkgs>' -A patchelf --check
<replaceable></replaceable>
error: derivation `/nix/store/1ipvxs…-patchelf-0.6' may not be deterministic:
hash mismatch in output `/nix/store/4pc1dm…-patchelf-0.6.drv'
</screen>
</para>
</listitem>
<listitem>
<para>The <command>nix-instantiate</command> flags
<option>--eval-only</option> and <option>--parse-only</option>
have been renamed to <option>--eval</option> and
<option>--parse</option>, respectively.</para>
</listitem>
<listitem>
<para><command>nix-instantiate</command>,
<command>nix-build</command> and <command>nix-shell</command> now
have a flag <option>--expr</option> (or <option>-E</option>) that
allows you to specify the expression to be evaluated as a command
line argument. For instance, <literal>nix-instantiate --eval -E
'1 + 2'</literal> will print <literal>3</literal>.</para>
</listitem>
<listitem>
<para><command>nix-shell</command> improvements:</para>
<itemizedlist>
<listitem>
<para>It has a new flag, <option>--packages</option> (or
<option>-p</option>), that sets up a build environment
containing the specified packages from Nixpkgs. For example,
the command
<screen>
$ nix-shell -p sqlite xorg.libX11 hello
</screen>
will start a shell in which the given packages are
present.</para>
</listitem>
<listitem>
<para>It now uses <filename>shell.nix</filename> as the
default expression, falling back to
<filename>default.nix</filename> if the former doesnt
exist. This makes it convenient to have a
<filename>shell.nix</filename> in your project to set up a
nice development environment.</para>
</listitem>
<listitem>
<para>It evaluates the derivation attribute
<varname>shellHook</varname>, if set. Since
<literal>stdenv</literal> does not normally execute this hook,
it allows you to do <command>nix-shell</command>-specific
setup.</para>
</listitem>
<listitem>
<para>It preserves the users timezone setting.</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>In chroots, Nix now sets up a <filename>/dev</filename>
containing only a minimal set of devices (such as
<filename>/dev/null</filename>). Note that it only does this if
you <emphasis>dont</emphasis> have <filename>/dev</filename>
listed in your <option>build-chroot-dirs</option> setting;
otherwise, it will bind-mount the <literal>/dev</literal> from
outside the chroot.</para>
<para>Similarly, if you dont have <filename>/dev/pts</filename> listed
in <option>build-chroot-dirs</option>, Nix will mount a private
<literal>devpts</literal> filesystem on the chroots
<filename>/dev/pts</filename>.</para>
</listitem>
2013-11-18 23:03:11 +00:00
<listitem>
<para>New built-in function: <function>builtins.toJSON</function>,
which returns a JSON representation of a value.</para>
</listitem>
2014-03-12 12:58:06 +00:00
<listitem>
<para><command>nix-env -q</command> has a new flag
<option>--json</option> to print a JSON representation of the
installed or available packages.</para>
</listitem>
<listitem>
<para><command>nix-env</command> now supports meta attributes with
more complex values, such as attribute sets.</para>
</listitem>
<listitem>
<para>The <option>-A</option> flag now allows attribute names with
dots in them, e.g.
<screen>
$ nix-instantiate --eval '&lt;nixos>' -A 'config.systemd.units."nscd.service".text'
</screen>
2014-03-12 12:58:06 +00:00
</para>
</listitem>
<listitem>
<para>The <option>--max-freed</option> option to
<command>nix-store --gc</command> now accepts a unit
specifier. For example, <literal>nix-store --gc --max-freed
1G</literal> will free up to 1 gigabyte of disk space.</para>
</listitem>
2014-04-04 12:51:07 +00:00
<listitem>
<para><command>nix-collect-garbage</command> has a new flag
<option>--delete-older-than</option>
<replaceable>N</replaceable><literal>d</literal>, which deletes
all user environment generations older than
<replaceable>N</replaceable> days. Likewise, <command>nix-env
--delete-generations</command> accepts a
<replaceable>N</replaceable><literal>d</literal> age limit.</para>
</listitem>
2014-03-12 12:58:06 +00:00
<listitem>
<para>Nix now heuristically detects whether a build failure was
due to a disk-full condition. In that case, the build is not
flagged as “permanently failed”. This is mostly useful for Hydra,
which needs to distinguish between permanent and transient build
failures.</para>
</listitem>
<listitem>
<para>There is a new symbol <literal>__curPos</literal> that
expands to an attribute set containing its file name and line and
column numbers, e.g. <literal>{ file = "foo.nix"; line = 10;
column = 5; }</literal>. There also is a new builtin function,
<varname>unsafeGetAttrPos</varname>, that returns the position of
an attribute. This is used by Nixpkgs to provide location
information in error messages, e.g.
<screen>
$ nix-build '&lt;nixpkgs>' -A libreoffice --argstr system x86_64-darwin
error: the package libreoffice-4.0.5.2 in .../applications/office/libreoffice/default.nix:263
is not supported on x86_64-darwin
</screen>
</para>
</listitem>
<listitem>
<para>The garbage collector is now more concurrent with other Nix
processes because it releases certain locks earlier.</para>
</listitem>
<listitem>
<para>The binary tarball installer has been improved. You can now
install Nix by running:
<screen>
$ bash &lt;(curl https://nixos.org/nix/install)
</screen>
</para>
</listitem>
2014-04-07 10:00:23 +00:00
<listitem>
<para>More evaluation errors include position information. For
instance, selecting a missing attribute will print something like
<screen>
error: attribute `nixUnstabl' missing, at /etc/nixos/configurations/misc/eelco/mandark.nix:216:15
</screen>
</para>
</listitem>
2014-03-12 12:58:06 +00:00
<listitem>
<para>The command <command>nix-setuid-helper</command> is
gone.</para>
</listitem>
<listitem>
<para>Nix no longer uses Automake, but instead has a
non-recursive, GNU Make-based build system.</para>
</listitem>
<listitem>
<para>All installed libraries now have the prefix
<literal>libnix</literal>. In particular, this gets rid of
<literal>libutil</literal>, which could clash with libraries with
the same name from other packages.</para>
</listitem>
<listitem>
<para>Nix now requires a compiler that supports C++11.</para>
</listitem>
</itemizedlist>
2014-04-04 12:51:07 +00:00
<para>This release has contributions from Danny Wilson, Domen Kožar,
Eelco Dolstra, Ian-Woo Kim, Ludovic Courtès, Maxim Ivanov, Petr
Rockai, Ricardo M. Correia and Shea Levy.</para>
</section>
2013-10-17 09:40:20 +00:00
<!--==================================================================-->
<section xml:id="ssec-relnotes-1.6.1"><title>Release 1.6.1 (October 28, 2013)</title>
2013-10-17 09:40:20 +00:00
<para>This is primarily a bug fix release. Changes of interest
are:</para>
<itemizedlist>
<listitem>
<para>Nix 1.6 accidentally changed the semantics of antiquoted
paths in strings, such as <literal>"${/foo}/bar"</literal>. This
release reverts to the Nix 1.5.3 behaviour.</para>
</listitem>
<listitem>
<para>Previously, Nix optimised expressions such as
<literal>"${<replaceable>expr</replaceable>}"</literal> to
<replaceable>expr</replaceable>. Thus it neither checked whether
<replaceable>expr</replaceable> could be coerced to a string, nor
applied such coercions. This meant that
<literal>"${123}"</literal> evaluatued to <literal>123</literal>,
and <literal>"${./foo}"</literal> evaluated to
<literal>./foo</literal> (even though
<literal>"${./foo} "</literal> evaluates to
<literal>"/nix/store/<replaceable>hash</replaceable>-foo "</literal>).
Nix now checks the type of antiquoted expressions and
applies coercions.</para>
</listitem>
<listitem>
<para>Nix now shows the exact position of undefined variables. In
particular, undefined variable errors in a <literal>with</literal>
previously didn't show <emphasis>any</emphasis> position
information, so this makes it a lot easier to fix such
errors.</para>
</listitem>
<listitem>
<para>Undefined variables are now treated consistently.
Previously, the <function>tryEval</function> function would catch
undefined variables inside a <literal>with</literal> but not
outside. Now <function>tryEval</function> never catches undefined
variables.</para>
</listitem>
<listitem>
<para>Bash completion in <command>nix-shell</command> now works
correctly.</para>
</listitem>
<listitem>
<para>Stack traces are less verbose: they no longer show calls to
builtin functions and only show a single line for each derivation
on the call stack.</para>
2013-10-17 09:40:20 +00:00
</listitem>
<listitem>
<para>New built-in function: <function>builtins.typeOf</function>,
which returns the type of its argument as a string.</para>
</listitem>
2013-10-17 09:40:20 +00:00
</itemizedlist>
</section>
2006-09-27 12:43:00 +00:00
<!--==================================================================-->
2013-09-10 15:47:39 +00:00
<section xml:id="ssec-relnotes-1.6.0"><title>Release 1.6 (September 10, 2013)</title>
2013-09-02 11:11:36 +00:00
<para>In addition to the usual bug fixes, this release has several new
features:</para>
<itemizedlist>
<listitem>
<para>The command <command>nix-build --run-env</command> has been
renamed to <command>nix-shell</command>.</para>
</listitem>
<listitem>
<para><command>nix-shell</command> now sources
<filename>$stdenv/setup</filename> <emphasis>inside</emphasis> the
interactive shell, rather than in a parent shell. This ensures
that shell functions defined by <literal>stdenv</literal> can be
used in the interactive shell.</para>
</listitem>
<listitem>
<para><command>nix-shell</command> has a new flag
<option>--pure</option> to clear the environment, so you get an
environment that more closely corresponds to the “real” Nix build.
</para>
</listitem>
<listitem>
<para><command>nix-shell</command> now sets the shell prompt
(<envar>PS1</envar>) to ensure that Nix shells are distinguishable
from your regular shells.</para>
</listitem>
2013-09-10 09:21:30 +00:00
<listitem>
<para><command>nix-env</command> no longer requires a
<literal>*</literal> argument to match all packages, so
<literal>nix-env -qa</literal> is equivalent to <literal>nix-env
-qa '*'</literal>.</para>
</listitem>
<listitem>
<para><command>nix-env -i</command> has a new flag
<option>--remove-all</option> (<option>-r</option>) to remove all
previous packages from the profile. This makes it easier to do
declarative package management similar to NixOSs
<option>environment.systemPackages</option>. For instance, if you
have a specification <filename>my-packages.nix</filename> like this:
<programlisting>
with import &lt;nixpkgs> {};
[ thunderbird
geeqie
...
]
</programlisting>
then after any change to this file, you can run:
<screen>
$ nix-env -f my-packages.nix -ir
</screen>
to update your profile to match the specification.</para>
</listitem>
2013-09-02 11:11:36 +00:00
<listitem>
<para>The <literal>with</literal> language construct is now more
lazy. It only evaluates its argument if a variable might actually
refer to an attribute in the argument. For instance, this now
works:
<programlisting>
let
pkgs = with pkgs; { foo = "old"; bar = foo; } // overrides;
overrides = { foo = "new"; };
in pkgs.bar
</programlisting>
This evaluates to <literal>"new"</literal>, while previously it
gave an “infinite recursion” error.</para>
</listitem>
<listitem>
<para>Nix now has proper integer arithmetic operators. For
instance, you can write <literal>x + y</literal> instead of
<literal>builtins.add x y</literal>, or <literal>x &lt;
y</literal> instead of <literal>builtins.lessThan x y</literal>.
The comparison operators also work on strings.</para>
</listitem>
<listitem>
<para>On 64-bit systems, Nix integers are now 64 bits rather than
32 bits.</para>
</listitem>
<listitem>
<para>When using the Nix daemon, the <command>nix-daemon</command>
worker process now runs on the same CPU as the client, on systems
that support setting CPU affinity. This gives a significant speedup
on some systems.</para>
</listitem>
<listitem>
<para>If a stack overflow occurs in the Nix evaluator, you now get
a proper error message (rather than “Segmentation fault”) on some
systems.</para>
</listitem>
<listitem>
<para>In addition to directories, you can now bind-mount regular
files in chroots through the (now misnamed) option
<option>build-chroot-dirs</option>.</para>
</listitem>
</itemizedlist>
2013-09-10 09:21:30 +00:00
<para>This release has contributions from Domen Kožar, Eelco Dolstra,
Florian Friesdorf, Gergely Risko, Ivan Kozik, Ludovic Courtès and Shea
Levy.</para>
</section>
2013-06-17 09:47:38 +00:00
<!--==================================================================-->
<section xml:id="ssec-relnotes-1.5.3"><title>Release 1.5.3 (June 17, 2013)</title>
<para>This is primarily a bug fix release. The following changes are
noteworthy:</para>
<itemizedlist>
<listitem>
<para>Yet another security bug involving hard links to files
outside the store was fixed. This bug only affected multi-user
installations that do not have hard link restrictions
enabled. (NixOS is thus not vulnerable.)</para>
</listitem>
<listitem>
<para>The default binary cache URL has changed from
<uri>http://nixos.org/binary-cache</uri> to
<uri>http://cache.nixos.org</uri>. The latter is hosted on Amazon
CloudFront (courtesy of <link
xlink:href="http://www.logicblox.com/">LogicBlox</link>) and
should provide better performance for users in both Europe and
North America.</para>
</listitem>
<listitem>
<para>The binary cache substituter now prints a warning message if
fetching information from the cache takes more than five seconds.
Thus network or server problems no longer make Nix appear to just
hang.</para>
</listitem>
<listitem>
<para>Stack traces now show function names, e.g.
<screen>
while evaluating `concatMapStrings' at `<replaceable>...</replaceable>/nixpkgs/pkgs/lib/strings.nix:18:25':
</screen>
Also, if a function is called with an unexpected argument, Nix
now shows the name of the argument.
</para>
</listitem>
</itemizedlist>
</section>
2013-05-01 11:31:33 +00:00
<!--==================================================================-->
2013-05-13 14:52:08 +00:00
<section xml:id="ssec-relnotes-1.5.2"><title>Release 1.5.2 (May 13, 2013)</title>
2013-05-01 11:31:33 +00:00
2013-05-03 09:28:32 +00:00
<para>This is primarily a bug fix release. It has contributions from
Eelco Dolstra, Lluís Batlle i Rossell and Shea Levy.</para>
2013-05-01 11:31:33 +00:00
</section>
<!--==================================================================-->
<section xml:id="ssec-relnotes-1.5.1"><title>Release 1.5.1 (February 28, 2013)</title>
<para>The bug fix to the bug fix had a bug itself, of course. But
this time it will work for sure!</para>
</section>
<!--==================================================================-->
<section xml:id="ssec-relnotes-1.5"><title>Release 1.5 (February 27, 2013)</title>
<para>This is a brown paper bag release to fix a regression introduced
by the hard link security fix in 1.4.</para>
</section>
<!--==================================================================-->
<section xml:id="ssec-relnotes-1.4"><title>Release 1.4 (February 26, 2013)</title>
<para>This release fixes a security bug in multi-user operation. It
was possible for derivations to cause the mode of files outside of the
Nix store to be changed to 444 (read-only but world-readable) by
creating hard links to those files (<link
xlink:href="https://github.com/NixOS/nix/commit/5526a282b5b44e9296e61e07d7d2626a79141ac4">details</link>).</para>
<para>There are also the following improvements:</para>
<itemizedlist>
<listitem><para>New built-in function:
<function>builtins.hashString</function>.</para></listitem>
<listitem><para>Build logs are now stored in
<filename>/nix/var/log/nix/drvs/<replaceable>XX</replaceable>/</filename>,
where <replaceable>XX</replaceable> is the first two characters of
the derivation. This is useful on machines that keep a lot of build
logs (such as Hydra servers).</para></listitem>
<listitem><para>The function <function>corepkgs/fetchurl</function>
can now make the downloaded file executable. This will allow
getting rid of all bootstrap binaries in the Nixpkgs source
tree.</para></listitem>
<listitem><para>Language change: The expression <literal>"${./path}
..."</literal> now evaluates to a string instead of a
path.</para></listitem>
</itemizedlist>
</section>
2013-01-02 11:59:49 +00:00
<!--==================================================================-->
2013-01-04 14:17:19 +00:00
<section xml:id="ssec-relnotes-1.3"><title>Release 1.3 (January 4, 2013)</title>
2013-01-02 11:59:49 +00:00
<para>This is primarily a bug fix release. When this version is first
run on Linux, it removes any immutable bits from the Nix store and
increases the schema version of the Nix store. (The previous release
removed support for setting the immutable bit; this release clears any
remaining immutable bits to make certain operations more
efficient.)</para>
<para>This release has contributions from Eelco Dolstra and Stuart
Pernsteiner.</para>
2013-01-02 11:59:49 +00:00
</section>
2012-09-25 20:04:50 +00:00
<!--==================================================================-->
<section xml:id="ssec-relnotes-1.2"><title>Release 1.2 (December 6, 2012)</title>
2012-09-25 20:04:50 +00:00
2012-10-03 21:57:20 +00:00
<para>This release has the following improvements and changes:</para>
2012-09-25 20:04:50 +00:00
<itemizedlist>
2012-11-09 12:33:24 +00:00
<listitem>
<para>Nix has a new binary substituter mechanism: the
<emphasis>binary cache</emphasis>. A binary cache contains
pre-built binaries of Nix packages. Whenever Nix wants to build a
missing Nix store path, it will check a set of binary caches to
see if any of them has a pre-built binary of that path. The
configuration setting <option>binary-caches</option> contains a
list of URLs of binary caches. For instance, doing
<screen>
$ nix-env -i thunderbird --option binary-caches http://cache.nixos.org
2012-11-09 12:33:24 +00:00
</screen>
will install Thunderbird and its dependencies, using the available
pre-built binaries in <uri>http://cache.nixos.org</uri>.
2012-11-09 12:33:24 +00:00
The main advantage over the old “manifest”-based method of getting
pre-built binaries is that you dont have to worry about your
manifest being in sync with the Nix expressions youre installing
from; i.e., you dont need to run <command>nix-pull</command> to
update your manifest. Its also more scalable because you dont
need to redownload a giant manifest file every time.
</para>
<para>A Nix channel can provide a binary cache URL that will be
used automatically if you subscribe to that channel. If you use
the Nixpkgs or NixOS channels
(<uri>http://nixos.org/channels</uri>) you automatically get the
cache <uri>http://cache.nixos.org</uri>.</para>
2012-11-09 12:33:24 +00:00
<para>Binary caches are created using <command>nix-push</command>.
For details on the operation and format of binary caches, see the
<command>nix-push</command> manpage. More details are provided in
<link xlink:href="http://lists.science.uu.nl/pipermail/nix-dev/2012-September/009826.html">this
nix-dev posting</link>.</para>
</listitem>
2012-12-04 16:41:51 +00:00
<listitem>
<para>Multiple output support should now be usable. A derivation
can declare that it wants to produce multiple store paths by
saying something like
<programlisting>
outputs = [ "lib" "headers" "doc" ];
</programlisting>
This will cause Nix to pass the intended store path of each output
to the builder through the environment variables
<literal>lib</literal>, <literal>headers</literal> and
<literal>doc</literal>. Other packages can refer to a specific
output by referring to
<literal><replaceable>pkg</replaceable>.<replaceable>output</replaceable></literal>,
e.g.
<programlisting>
buildInputs = [ pkg.lib pkg.headers ];
</programlisting>
If you install a package with multiple outputs using
<command>nix-env</command>, each output path will be symlinked
into the user environment.</para>
</listitem>
<listitem>
<para>Dashes are now valid as part of identifiers and attribute
names.</para>
</listitem>
<listitem>
<para>The new operation <command>nix-store --repair-path</command>
2012-10-03 19:53:25 +00:00
allows corrupted or missing store paths to be repaired by
redownloading them. <command>nix-store --verify --check-contents
--repair</command> will scan and repair all paths in the Nix
store. Similarly, <command>nix-env</command>,
<command>nix-build</command>, <command>nix-instantiate</command>
and <command>nix-store --realise</command> have a
<option>--repair</option> flag to detect and fix bad paths by
rebuilding or redownloading them.</para>
</listitem>
2012-09-25 20:04:50 +00:00
<listitem>
<para>Nix no longer sets the immutable bit on files in the Nix
store. Instead, the recommended way to guard the Nix store
2012-09-25 20:30:37 +00:00
against accidental modification on Linux is to make it a read-only
bind mount, like this:
2012-09-25 20:04:50 +00:00
<screen>
$ mount --bind /nix/store /nix/store
$ mount -o remount,ro,bind /nix/store
</screen>
Nix will automatically make <filename>/nix/store</filename>
writable as needed (using a private mount namespace) to allow
modifications.</para>
</listitem>
2012-12-04 16:41:51 +00:00
<listitem>
<para>Store optimisation (replacing identical files in the store
with hard links) can now be done automatically every time a path
is added to the store. This is enabled by setting the
configuration option <literal>auto-optimise-store</literal> to
<literal>true</literal> (disabled by default).</para>
</listitem>
<listitem>
<para>Nix now supports <command>xz</command> compression for NARs
in addition to <command>bzip2</command>. It compresses about 30%
better on typical archives and decompresses about twice as
fast.</para>
</listitem>
<listitem>
<para>Basic Nix expression evaluation profiling: setting the
environment variable <envar>NIX_COUNT_CALLS</envar> to
<literal>1</literal> will cause Nix to print how many times each
primop or function was executed.</para>
</listitem>
<listitem>
<para>New primops: <varname>concatLists</varname>,
<varname>elem</varname>, <varname>elemAt</varname> and
<varname>filter</varname>.</para>
</listitem>
<listitem>
<para>The command <command>nix-copy-closure</command> has a new
flag <option>--use-substitutes</option> (<option>-s</option>) to
download missing paths on the target machine using the substitute
mechanism.</para>
</listitem>
2012-10-03 21:57:20 +00:00
<listitem>
<para>The command <command>nix-worker</command> has been renamed
to <command>nix-daemon</command>. Support for running the Nix
worker in “slave” mode has been removed.</para>
</listitem>
2012-12-04 16:41:51 +00:00
<listitem>
<para>The <option>--help</option> flag of every Nix command now
invokes <command>man</command>.</para>
</listitem>
<listitem>
<para>Chroot builds are now supported on systemd machines.</para>
</listitem>
2012-09-25 20:04:50 +00:00
</itemizedlist>
2012-12-04 16:41:51 +00:00
<para>This release has contributions from Eelco Dolstra, Florian
Friesdorf, Mats Erik Andersson and Shea Levy.</para>
2012-09-25 20:04:50 +00:00
</section>
<!--==================================================================-->
2012-07-18 15:51:27 +00:00
<section xml:id="ssec-relnotes-1.1"><title>Release 1.1 (July 18, 2012)</title>
<para>This release has the following improvements:</para>
<itemizedlist>
2012-06-23 18:59:13 +00:00
<listitem>
2012-07-17 14:06:20 +00:00
<para>On Linux, when doing a chroot build, Nix now uses various
namespace features provided by the Linux kernel to improve
build isolation. Namely:
<itemizedlist>
<listitem><para>The private network namespace ensures that
builders cannot talk to the outside world (or vice versa): each
build only sees a private loopback interface. This also means
that two concurrent builds can listen on the same port (e.g. as
part of a test) without conflicting with each
other.</para></listitem>
<listitem><para>The PID namespace causes each build to start as
PID 1. Processes outside of the chroot are not visible to those
on the inside. On the other hand, processes inside the chroot
<emphasis>are</emphasis> visible from the outside (though with
different PIDs).</para></listitem>
<listitem><para>The IPC namespace prevents the builder from
communicating with outside processes using SysV IPC mechanisms
(shared memory, message queues, semaphores). It also ensures
that all IPC objects are destroyed when the builder
exits.</para></listitem>
<listitem><para>The UTS namespace ensures that builders see a
hostname of <literal>localhost</literal> rather than the actual
hostname.</para></listitem>
<listitem><para>The private mount namespace was already used by
Nix to ensure that the bind-mounts used to set up the chroot are
cleaned up automatically.</para></listitem>
</itemizedlist>
</para>
2012-06-23 18:59:13 +00:00
</listitem>
<listitem>
<para>Build logs are now compressed using
<command>bzip2</command>. The command <command>nix-store
2012-07-17 14:06:20 +00:00
-l</command> decompresses them on the fly. This can be disabled
by setting the option <literal>build-compress-log</literal> to
<literal>false</literal>.</para>
2012-06-23 18:59:13 +00:00
</listitem>
<listitem>
<para>The creation of build logs in
<filename>/nix/var/log/nix/drvs</filename> can be disabled by
setting the new option <literal>build-keep-log</literal> to
2012-07-17 14:06:20 +00:00
<literal>false</literal>. This is useful, for instance, for Hydra
build machines.</para>
</listitem>
<listitem>
<para>Nix now reserves some space in
<filename>/nix/var/nix/db/reserved</filename> to ensure that the
garbage collector can run successfully if the disk is full. This
is necessary because SQLite transactions fail if the disk is
full.</para>
</listitem>
<listitem>
<para>Added a basic <function>fetchurl</function> function. This
is not intended to replace the <function>fetchurl</function> in
Nixpkgs, but is useful for bootstrapping; e.g., it will allow us
to get rid of the bootstrap binaries in the Nixpkgs source tree
and download them instead. You can use it by doing
<literal>import &lt;nix/fetchurl.nix> { url =
<replaceable>url</replaceable>; sha256 =
"<replaceable>hash</replaceable>"; }</literal>. (Shea Levy)</para>
</listitem>
<listitem>
<para>Improved RPM spec file. (Michel Alexandre Salim)</para>
</listitem>
<listitem>
<para>Support for on-demand socket-based activation in the Nix
daemon with <command>systemd</command>.</para>
</listitem>
<listitem>
<para>Added a manpage for
<citerefentry><refentrytitle>nix.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
</listitem>
2012-07-11 22:52:23 +00:00
<listitem>
<para>When using the Nix daemon, the <option>-s</option> flag in
<command>nix-env -qa</command> is now much faster.</para>
</listitem>
2014-03-12 12:58:06 +00:00
</itemizedlist>
</section>
2010-10-29 14:44:02 +00:00
<!--==================================================================-->
2012-05-11 21:40:58 +00:00
<section xml:id="ssec-relnotes-1.0"><title>Release 1.0 (May 11, 2012)</title>
2010-10-29 14:44:02 +00:00
2012-05-09 23:05:30 +00:00
<para>There have been numerous improvements and bug fixes since the
previous release. Here are the most significant:</para>
2010-10-29 14:44:02 +00:00
<itemizedlist>
<listitem>
<para>Nix can now optionally use the Boehm garbage collector.
This significantly reduces the Nix evaluators memory footprint,
especially when evaluating large NixOS system configurations. It
can be enabled using the <option>--enable-gc</option> configure
option.</para>
</listitem>
<listitem>
2012-05-09 23:05:30 +00:00
<para>Nix now uses SQLite for its database. This is faster and
more flexible than the old <emphasis>ad hoc</emphasis> format.
SQLite is also used to cache the manifests in
<filename>/nix/var/nix/manifests</filename>, resulting in a
significant speedup.</para>
</listitem>
2014-03-12 12:58:06 +00:00
2012-05-09 23:05:30 +00:00
<listitem>
<para>Nix now has an search path for expressions. The search path
is set using the environment variable <envar>NIX_PATH</envar> and
the <option>-I</option> command line option. In Nix expressions,
paths between angle brackets are used to specify files that must
be looked up in the search path. For instance, the expression
<literal>&lt;nixpkgs/default.nix></literal> looks for a file
<filename>nixpkgs/default.nix</filename> relative to every element
in the search path.</para>
</listitem>
<listitem>
2012-05-09 23:05:30 +00:00
<para>The new command <command>nix-build --run-env</command>
builds all dependencies of a derivation, then starts a shell in an
environment containing all variables from the derivation. This is
useful for reproducing the environment of a derivation for
development.</para>
</listitem>
<listitem>
2012-05-09 23:05:30 +00:00
<para>The new command <command>nix-store --verify-path</command>
verifies that the contents of a store path have not
changed.</para>
</listitem>
<listitem>
2012-05-09 23:05:30 +00:00
<para>The new command <command>nix-store --print-env</command>
prints out the environment of a derivation in a format that can be
evaluated by a shell.</para>
</listitem>
<listitem>
<para>Attribute names can now be arbitrary strings. For instance,
you can write <literal>{ "foo-1.2" = …; "bla bla" = …; }."bla
bla"</literal>.</para>
</listitem>
2014-03-12 12:58:06 +00:00
2012-05-09 23:05:30 +00:00
<listitem>
<para>Attribute selection can now provide a default value using
the <literal>or</literal> operator. For instance, the expression
<literal>x.y.z or e</literal> evaluates to the attribute
<literal>x.y.z</literal> if it exists, and <literal>e</literal>
otherwise.</para>
</listitem>
<listitem>
<para>The right-hand side of the <literal>?</literal> operator can
now be an attribute path, e.g., <literal>attrs ?
a.b.c</literal>.</para>
</listitem>
<listitem>
<para>On Linux, Nix will now make files in the Nix store immutable
on filesystems that support it. This prevents accidental
modification of files in the store by the root user.</para>
</listitem>
<listitem>
<para>Nix has preliminary support for derivations with multiple
outputs. This is useful because it allows parts of a package to
be deployed and garbage-collected separately. For instance,
development parts of a package such as header files or static
libraries would typically not be part of the closure of an
application, resulting in reduced disk usage and installation
time.</para>
</listitem>
<listitem>
<para>The Nix store garbage collector is faster and holds the
global lock for a shorter amount of time.</para>
</listitem>
<listitem>
<para>The option <option>--timeout</option> (corresponding to the
configuration setting <literal>build-timeout</literal>) allows you
to set an absolute timeout on builds — if a build runs for more than
the given number of seconds, it is terminated. This is useful for
recovering automatically from builds that are stuck in an infinite
loop but keep producing output, and for which
<literal>--max-silent-time</literal> is ineffective.</para>
</listitem>
<listitem>
2012-05-09 23:05:30 +00:00
<para>Nix development has moved to GitHub (<link
xlink:href="https://github.com/NixOS/nix" />).</para>
</listitem>
2010-10-29 14:44:02 +00:00
</itemizedlist>
</section>
2010-08-16 12:38:32 +00:00
<!--==================================================================-->
2010-08-17 07:22:05 +00:00
<section xml:id="ssec-relnotes-0.16"><title>Release 0.16 (August 17, 2010)</title>
2010-08-16 12:38:32 +00:00
<para>This release has the following improvements:</para>
<itemizedlist>
<listitem>
<para>The Nix expression evaluator is now much faster in most
cases: typically, <link
xlink:href="http://www.mail-archive.com/nix-dev@cs.uu.nl/msg04113.html">3
to 8 times compared to the old implementation</link>. It also
uses less memory. It no longer depends on the ATerm
library.</para>
</listitem>
<listitem>
<para>
Support for configurable parallelism inside builders. Build
scripts have always had the ability to perform multiple build
actions in parallel (for instance, by running <command>make -j
2</command>), but this was not desirable because the number of
actions to be performed in parallel was not configurable. Nix
now has an option <option>--cores
<replaceable>N</replaceable></option> as well as a configuration
setting <varname>build-cores =
<replaceable>N</replaceable></varname> that causes the
environment variable <envar>NIX_BUILD_CORES</envar> to be set to
<replaceable>N</replaceable> when the builder is invoked. The
builder can use this at its discretion to perform a parallel
build, e.g., by calling <command>make -j
<replaceable>N</replaceable></command>. In Nixpkgs, this can be
2010-08-17 07:22:05 +00:00
enabled on a per-package basis by setting the derivation
attribute <varname>enableParallelBuilding</varname> to
2010-08-16 12:38:32 +00:00
<literal>true</literal>.
</para>
</listitem>
<listitem>
<para><command>nix-store -q</command> now supports XML output
through the <option>--xml</option> flag.</para>
</listitem>
<listitem>
<para>Several bug fixes.</para>
</listitem>
</itemizedlist>
</section>
2010-03-16 13:12:18 +00:00
<!--==================================================================-->
2010-03-17 10:08:34 +00:00
<section xml:id="ssec-relnotes-0.15"><title>Release 0.15 (March 17, 2010)</title>
2010-03-16 13:12:18 +00:00
<para>This is a bug-fix release. Among other things, it fixes
building on Mac OS X (Snow Leopard), and improves the contents of
<filename>/etc/passwd</filename> and <filename>/etc/group</filename>
in <literal>chroot</literal> builds.</para>
</section>
2009-12-09 21:02:24 +00:00
<!--==================================================================-->
2010-02-04 14:00:47 +00:00
<section xml:id="ssec-relnotes-0.14"><title>Release 0.14 (February 4, 2010)</title>
2009-12-09 21:02:24 +00:00
<para>This release has the following improvements:</para>
<itemizedlist>
<listitem>
<para>The garbage collector now starts deleting garbage much
faster than before. It no longer determines liveness of all paths
in the store, but does so on demand.</para>
</listitem>
<listitem>
<para>Added a new operation, <command>nix-store --query
--roots</command>, that shows the garbage collector roots that
directly or indirectly point to the given store paths.</para>
</listitem>
<listitem>
<para>Removed support for converting Berkeley DB-based Nix
databases to the new schema.</para>
</listitem>
<listitem>
<para>Removed the <option>--use-atime</option> and
<option>--max-atime</option> garbage collector options. They were
not very useful in practice.</para>
</listitem>
2010-02-03 11:00:35 +00:00
<listitem>
<para>On Windows, Nix now requires Cygwin 1.7.x.</para>
</listitem>
2009-12-09 21:02:24 +00:00
<listitem>
<para>A few bug fixes.</para>
</listitem>
</itemizedlist>
</section>
2009-04-14 12:02:22 +00:00
<!--==================================================================-->
2009-11-05 09:07:43 +00:00
<section xml:id="ssec-relnotes-0.13"><title>Release 0.13 (November 5,
2009-04-14 12:02:22 +00:00
2009)</title>
<para>This is primarily a bug fix release. It has some new
features:</para>
<itemizedlist>
2009-05-26 16:32:02 +00:00
<listitem>
<para>Syntactic sugar for writing nested attribute sets. Instead of
<programlisting>
{
foo = {
bar = 123;
xyzzy = true;
};
a = { b = { c = "d"; }; };
}
</programlisting>
you can write
<programlisting>
{
foo.bar = 123;
foo.xyzzy = true;
a.b.c = "d";
}
</programlisting>
This is useful, for instance, in NixOS configuration files.</para>
2014-03-12 12:58:06 +00:00
2009-05-26 16:32:02 +00:00
</listitem>
2009-04-14 12:02:22 +00:00
<listitem>
<para>Support for Nix channels generated by Hydra, the Nix-based
continuous build system. (Hydra generates NAR archives on the
fly, so the size and hash of these archives isnt known in
advance.)</para>
</listitem>
<listitem>
<para>Support <literal>i686-linux</literal> builds directly on
<literal>x86_64-linux</literal> Nix installations. This is
implemented using the <function>personality()</function> syscall,
which causes <command>uname</command> to return
<literal>i686</literal> in child processes.</para>
</listitem>
2014-03-12 12:58:06 +00:00
2009-04-14 12:02:22 +00:00
<listitem>
<para>Various improvements to the <literal>chroot</literal>
support. Building in a <literal>chroot</literal> works quite well
now.</para>
</listitem>
<listitem>
<para>Nix no longer blocks if it tries to build a path and another
process is already building the same path. Instead it tries to
build another buildable path first. This improves
parallelism.</para>
</listitem>
<listitem>
<para>Support for large (> 4 GiB) files in NAR archives.</para>
</listitem>
2014-03-12 12:58:06 +00:00
2009-04-14 12:02:22 +00:00
<listitem>
<para>Various (performance) improvements to the remote build
mechanism.</para>
</listitem>
2014-03-12 12:58:06 +00:00
2009-04-14 12:02:22 +00:00
<listitem>
<para>New primops: <varname>builtins.addErrorContext</varname> (to
add a string to stack traces — useful for debugging),
<varname>builtins.isBool</varname>,
<varname>builtins.isString</varname>,
2009-11-04 16:52:35 +00:00
<varname>builtins.isInt</varname>,
<varname>builtins.intersectAttrs</varname>.</para>
</listitem>
<listitem>
<para>OpenSolaris support (Sander van der Burg).</para>
</listitem>
<listitem>
<para>Stack traces are no longer displayed unless the
<option>--show-trace</option> option is used.</para>
</listitem>
<listitem>
<para>The scoping rules for <literal>inherit
(<replaceable>e</replaceable>) ...</literal> in recursive
attribute sets have changed. The expression
<replaceable>e</replaceable> can now refer to the attributes
defined in the containing set.</para>
2009-04-14 12:02:22 +00:00
</listitem>
</itemizedlist>
</section>
<!--==================================================================-->
2008-11-20 12:01:05 +00:00
<section xml:id="ssec-relnotes-0.12"><title>Release 0.12 (November 20,
2008)</title>
<itemizedlist>
2008-11-19 10:59:36 +00:00
<listitem>
<para>Nix no longer uses Berkeley DB to store Nix store metadata.
The principal advantages of the new storage scheme are: it works
properly over decent implementations of NFS (allowing Nix stores
to be shared between multiple machines); no recovery is needed
when a Nix process crashes; no write access is needed for
read-only operations; no more running out of Berkeley DB locks on
certain operations.</para>
<para>You still need to compile Nix with Berkeley DB support if
you want Nix to automatically convert your old Nix store to the
new schema. If you dont need this, you can build Nix with the
<filename>configure</filename> option
<option>--disable-old-db-compat</option>.</para>
<para>After the automatic conversion to the new schema, you can
delete the old Berkeley DB files:
<screen>
$ cd /nix/var/nix/db
$ rm __db* log.* derivers references referrers reserved validpaths DB_CONFIG</screen>
The new metadata is stored in the directories
<filename>/nix/var/nix/db/info</filename> and
<filename>/nix/var/nix/db/referrer</filename>. Though the
metadata is stored in human-readable plain-text files, they are
not intended to be human-editable, as Nix is rather strict about
the format.</para>
<para>The new storage schema may or may not require less disk
space than the Berkeley DB environment, mostly depending on the
cluster size of your file system. With 1 KiB clusters (which
seems to be the <literal>ext3</literal> default nowadays) it
usually takes up much less space.</para>
</listitem>
<listitem><para>There is a new substituter that copies paths
directly from other (remote) Nix stores mounted somewhere in the
filesystem. For instance, you can speed up an installation by
mounting some remote Nix store that already has the packages in
question via NFS or <literal>sshfs</literal>. The environment
variable <envar>NIX_OTHER_STORES</envar> specifies the locations of
the remote Nix directories,
e.g. <literal>/mnt/remote-fs/nix</literal>.</para></listitem>
<listitem><para>New <command>nix-store</command> operations
<option>--dump-db</option> and <option>--load-db</option> to dump
and reload the Nix database.</para></listitem>
<listitem><para>The garbage collector has a number of new options to
allow only some of the garbage to be deleted. The option
<option>--max-freed <replaceable>N</replaceable></option> tells the
collector to stop after at least <replaceable>N</replaceable> bytes
have been deleted. The option <option>--max-links
<replaceable>N</replaceable></option> tells it to stop after the
link count on <filename>/nix/store</filename> has dropped below
2008-11-19 17:00:32 +00:00
<replaceable>N</replaceable>. This is useful for very large Nix
2008-11-19 10:59:36 +00:00
stores on filesystems with a 32000 subdirectories limit (like
<literal>ext3</literal>). The option <option>--use-atime</option>
causes store paths to be deleted in order of ascending last access
time. This allows non-recently used stuff to be deleted. The
option <option>--max-atime <replaceable>time</replaceable></option>
specifies an upper limit to the last accessed time of paths that may
be deleted. For instance,
<screen>
$ nix-store --gc -v --max-atime $(date +%s -d "2 months ago")</screen>
deletes everything that hasnt been accessed in two months.</para></listitem>
<listitem><para><command>nix-env</command> now uses optimistic
profile locking when performing an operation like installing or
upgrading, instead of setting an exclusive lock on the profile.
This allows multiple <command>nix-env -i / -u / -e</command>
operations on the same profile in parallel. If a
<command>nix-env</command> operation sees at the end that the profile
2008-11-19 10:59:36 +00:00
was changed in the meantime by another process, it will just
restart. This is generally cheap because the build results are
still in the Nix store.</para></listitem>
<listitem><para>The option <option>--dry-run</option> is now
supported by <command>nix-store -r</command> and
<command>nix-build</command>.</para></listitem>
<listitem><para>The information previously shown by
<option>--dry-run</option> (i.e., which derivations will be built
and which paths will be substituted) is now always shown by
<command>nix-env</command>, <command>nix-store -r</command> and
<command>nix-build</command>. The total download size of
2008-11-19 10:59:36 +00:00
substitutable paths is now also shown. For instance, a build will
show something like
<screen>
the following derivations will be built:
/nix/store/129sbxnk5n466zg6r1qmq1xjv9zymyy7-activate-configuration.sh.drv
/nix/store/7mzy971rdm8l566ch8hgxaf89x7lr7ik-upstart-jobs.drv
...
the following paths will be downloaded/copied (30.02 MiB):
/nix/store/4m8pvgy2dcjgppf5b4cj5l6wyshjhalj-samba-3.2.4
/nix/store/7h1kwcj29ip8vk26rhmx6bfjraxp0g4l-libunwind-0.98.6
2014-03-12 12:58:06 +00:00
...</screen>
2008-11-19 10:59:36 +00:00
</para></listitem>
<listitem><para>Language features:
<itemizedlist>
<listitem><para>@-patterns as in Haskell. For instance, in a
function definition
<programlisting>f = args @ {x, y, z}: <replaceable>...</replaceable>;</programlisting>
<varname>args</varname> refers to the argument as a whole, which
is further pattern-matched against the attribute set pattern
<literal>{x, y, z}</literal>.</para></listitem>
<listitem><para><literal>...</literal>” (ellipsis) patterns.
An attribute set pattern can now say <literal>...</literal> at
the end of the attribute name list to specify that the function
takes <emphasis>at least</emphasis> the listed attributes, while
ignoring additional attributes. For instance,
<programlisting>{stdenv, fetchurl, fuse, ...}: <replaceable>...</replaceable></programlisting>
defines a function that accepts any attribute set that includes
at least the three listed attributes.</para></listitem>
<listitem><para>New primops:
<varname>builtins.parseDrvName</varname> (split a package name
string like <literal>"nix-0.12pre12876"</literal> into its name
and version components, e.g. <literal>"nix"</literal> and
<literal>"0.12pre12876"</literal>),
<varname>builtins.compareVersions</varname> (compare two version
strings using the same algorithm that <command>nix-env</command>
uses), <varname>builtins.length</varname> (efficiently compute
the length of a list), <varname>builtins.mul</varname> (integer
multiplication), <varname>builtins.div</varname> (integer
division).
<!-- <varname>builtins.genericClosure</varname> -->
</para></listitem>
2014-03-12 12:58:06 +00:00
2008-11-19 10:59:36 +00:00
</itemizedlist>
</para></listitem>
<listitem><para><command>nix-prefetch-url</command> now supports
2008-11-19 10:59:36 +00:00
<literal>mirror://</literal> URLs, provided that the environment
variable <envar>NIXPKGS_ALL</envar> points at a Nixpkgs
tree.</para></listitem>
<listitem><para>Removed the commands
<command>nix-pack-closure</command> and
<command>nix-unpack-closure</command>. You can do almost the same
thing but much more efficiently by doing <literal>nix-store --export
$(nix-store -qR <replaceable>paths</replaceable>) > closure</literal> and
2008-11-19 10:59:36 +00:00
<literal>nix-store --import &lt;
closure</literal>.</para></listitem>
<listitem><para>Lots of bug fixes, including a big performance bug in
2008-11-19 10:59:36 +00:00
the handling of <literal>with</literal>-expressions.</para></listitem>
</itemizedlist>
</section>
<!--==================================================================-->
<section xml:id="ssec-relnotes-0.11"><title>Release 0.11 (December 31,
2007)</title>
2007-12-31 16:57:12 +00:00
<para>Nix 0.11 has many improvements over the previous stable release.
The most important improvement is secure multi-user support. It also
features many usability enhancements and language extensions, many of
them prompted by NixOS, the purely functional Linux distribution based
on Nix. Here is an (incomplete) list:</para>
<itemizedlist>
2006-12-09 23:14:55 +00:00
<listitem><para>Secure multi-user support. A single Nix store can
now be shared between multiple (possible untrusted) users. This is
an important feature for NixOS, where it allows non-root users to
install software. The old setuid method for sharing a store between
multiple users has been removed. Details for setting up a
multi-user store can be found in the manual.</para></listitem>
2006-12-09 23:14:55 +00:00
2007-09-19 14:01:41 +00:00
<listitem><para>The new command <command>nix-copy-closure</command>
gives you an easy and efficient way to exchange software between
machines. It copies the missing parts of the closure of a set of
store path to or from a remote machine via
<command>ssh</command>.</para></listitem>
2007-12-31 01:22:09 +00:00
<listitem><para>A new kind of string literal: strings between double
single-quotes (<literal>''</literal>) have indentation
“intelligently” removed. This allows large strings (such as shell
scripts or configuration file fragments in NixOS) to cleanly follow
the indentation of the surrounding expression. It also requires
much less escaping, since <literal>''</literal> is less common in
most languages than <literal>"</literal>.</para></listitem>
<listitem><para><command>nix-env</command> <option>--set</option>
modifies the current generation of a profile so that it contains
exactly the specified derivation, and nothing else. For example,
<literal>nix-env -p /nix/var/nix/profiles/browser --set
firefox</literal> lets the profile named
<filename>browser</filename> contain just Firefox.</para></listitem>
2014-03-12 12:58:06 +00:00
2006-10-30 16:29:05 +00:00
<listitem><para><command>nix-env</command> now maintains
meta-information about installed packages in profiles. The
meta-information is the contents of the <varname>meta</varname>
attribute of derivations, such as <varname>description</varname> or
<varname>homepage</varname>. The command <literal>nix-env -q --xml
--meta</literal> shows all meta-information.</para></listitem>
2014-03-12 12:58:06 +00:00
<listitem><para><command>nix-env</command> now uses the
<varname>meta.priority</varname> attribute of derivations to resolve
filename collisions between packages. Lower priority values denote
a higher priority. For instance, the GCC wrapper package and the
Binutils package in Nixpkgs both have a file
<filename>bin/ld</filename>, so previously if you tried to install
both you would get a collision. Now, on the other hand, the GCC
wrapper declares a higher priority than Binutils, so the formers
<filename>bin/ld</filename> is symlinked in the user
environment.</para></listitem>
2007-12-31 00:08:09 +00:00
<listitem><para><command>nix-env -i / -u</command>: instead of
breaking package ties by version, break them by priority and version
number. That is, if there are multiple packages with the same name,
then pick the package with the highest priority, and only use the
version if there are multiple packages with the same
priority.</para>
<para>This makes it possible to mark specific versions/variant in
Nixpkgs more or less desirable than others. A typical example would
be a beta version of some package (e.g.,
<literal>gcc-4.2.0rc1</literal>) which should not be installed even
though it is the highest version, except when it is explicitly
selected (e.g., <literal>nix-env -i
gcc-4.2.0rc1</literal>).</para></listitem>
2007-12-31 01:17:25 +00:00
<listitem><para><command>nix-env --set-flag</command> allows meta
attributes of installed packages to be modified. There are several
attributes that can be usefully modified, because they affect the
behaviour of <command>nix-env</command> or the user environment
build script:
<itemizedlist>
<listitem><para><varname>meta.priority</varname> can be changed
to resolve filename clashes (see above).</para></listitem>
<listitem><para><varname>meta.keep</varname> can be set to
<literal>true</literal> to prevent the package from being
upgraded or replaced. Useful if you want to hang on to an older
2007-12-31 01:17:25 +00:00
version of a package.</para></listitem>
<listitem><para><varname>meta.active</varname> can be set to
<literal>false</literal> to “disable” the package. That is, no
symlinks will be generated to the files of the package, but it
remains part of the profile (so it wont be garbage-collected).
Set it back to <literal>true</literal> to re-enable the
package.</para></listitem>
</itemizedlist>
</para></listitem>
2014-03-12 12:58:06 +00:00
<listitem><para><command>nix-env -q</command> now has a flag
<option>--prebuilt-only</option> (<option>-b</option>) that causes
<command>nix-env</command> to show only those derivations whose
output is already in the Nix store or that can be substituted (i.e.,
downloaded from somewhere). In other words, it shows the packages
that can be installed “quickly”, i.e., dont need to be built from
source. The <option>-b</option> flag is also available in
<command>nix-env -i</command> and <command>nix-env -u</command> to
filter out derivations for which no pre-built binary is
available.</para></listitem>
2014-03-12 12:58:06 +00:00
2007-12-31 01:22:09 +00:00
<listitem><para>The new option <option>--argstr</option> (in
<command>nix-env</command>, <command>nix-instantiate</command> and
<command>nix-build</command>) is like <option>--arg</option>, except
that the value is a string. For example, <literal>--argstr system
i686-linux</literal> is equivalent to <literal>--arg system
\"i686-linux\"</literal> (note that <option>--argstr</option>
prevents annoying quoting around shell arguments).</para></listitem>
<listitem><para><command>nix-store</command> has a new operation
<option>--read-log</option> (<option>-l</option>)
<parameter>paths</parameter> that shows the build log of the given
paths.</para></listitem>
2014-03-12 12:58:06 +00:00
2007-12-31 01:22:09 +00:00
<!--
<listitem><para>TODO: semantic cleanups of string concatenation
etc. (mostly in r6740).</para></listitem>
-->
<listitem><para>Nix now uses Berkeley DB 4.5. The database is
upgraded automatically, but you should be careful not to use old
versions of Nix that still use Berkeley DB 4.4.</para></listitem>
<!-- foo
<listitem><para>TODO: option <option>- -reregister</option> in
<command>nix-store - -register-validity</command>.</para></listitem>
-->
<listitem><para>The option <option>--max-silent-time</option>
(corresponding to the configuration setting
<literal>build-max-silent-time</literal>) allows you to set a
timeout on builds — if a build produces no output on
<literal>stdout</literal> or <literal>stderr</literal> for the given
number of seconds, it is terminated. This is useful for recovering
automatically from builds that are stuck in an infinite
loop.</para></listitem>
2007-09-19 14:01:41 +00:00
<listitem><para><command>nix-channel</command>: each subscribed
channel is its own attribute in the top-level expression generated
for the channel. This allows disambiguation (e.g. <literal>nix-env
-i -A nixpkgs_unstable.firefox</literal>).</para></listitem>
2007-09-19 14:01:41 +00:00
<listitem><para>The substitutes table has been removed from the
database. This makes operations such as <command>nix-pull</command>
and <command>nix-channel --update</command> much, much
faster.</para></listitem>
2007-09-19 14:01:41 +00:00
2007-12-31 01:22:09 +00:00
<listitem><para><command>nix-pull</command> now supports
bzip2-compressed manifests. This speeds up
channels.</para></listitem>
2007-09-19 14:01:41 +00:00
<listitem><para><command>nix-prefetch-url</command> now has a
limited form of caching. This is used by
<command>nix-channel</command> to prevent unnecessary downloads when
the channel hasnt changed.</para></listitem>
2007-12-31 01:22:09 +00:00
<listitem><para><command>nix-prefetch-url</command> now by default
computes the SHA-256 hash of the file instead of the MD5 hash. In
calls to <function>fetchurl</function> you should pass the
<literal>sha256</literal> attribute instead of
<literal>md5</literal>. You can pass either a hexadecimal or a
base-32 encoding of the hash.</para></listitem>
2014-03-12 12:58:06 +00:00
<listitem><para>Nix can now perform builds in an automatically
generated “chroot”. This prevents a builder from accessing stuff
outside of the Nix store, and thus helps ensure purity. This is an
experimental feature.</para></listitem>
2014-03-12 12:58:06 +00:00
2007-12-31 00:08:09 +00:00
<listitem><para>The new command <command>nix-store
--optimise</command> reduces Nix store disk space usage by finding
identical files in the store and hard-linking them to each other.
It typically reduces the size of the store by something like
25-35%.</para></listitem>
2014-03-12 12:58:06 +00:00
2007-12-31 01:22:09 +00:00
<listitem><para><filename>~/.nix-defexpr</filename> can now be a
2007-12-31 00:08:09 +00:00
directory, in which case the Nix expressions in that directory are
combined into an attribute set, with the file names used as the
names of the attributes. The command <command>nix-env
--import</command> (which set the
<filename>~/.nix-defexpr</filename> symlink) is
removed.</para></listitem>
2007-12-31 01:22:09 +00:00
<listitem><para>Derivations can specify the new special attribute
<varname>allowedReferences</varname> to enforce that the references
in the output of a derivation are a subset of a declared set of
paths. For example, if <varname>allowedReferences</varname> is an
empty list, then the output must not have any references. This is
used in NixOS to check that generated files such as initial ramdisks
for booting Linux dont have any dependencies.</para></listitem>
<listitem><para>The new attribute
<varname>exportReferencesGraph</varname> allows builders access to
the references graph of their inputs. This is used in NixOS for
tasks such as generating ISO-9660 images that contain a Nix store
populated with the closure of certain paths.</para></listitem>
2007-12-31 00:08:09 +00:00
<listitem><para>Fixed-output derivations (like
<function>fetchurl</function>) can define the attribute
<varname>impureEnvVars</varname> to allow external environment
variables to be passed to builders. This is used in Nixpkgs to
support proxy configuration, among other things.</para></listitem>
2007-12-31 01:22:09 +00:00
<listitem><para>Several new built-in functions:
<function>builtins.attrNames</function>,
<function>builtins.filterSource</function>,
<function>builtins.isAttrs</function>,
<function>builtins.isFunction</function>,
<function>builtins.listToAttrs</function>,
<function>builtins.stringLength</function>,
<function>builtins.sub</function>,
<function>builtins.substring</function>,
<function>throw</function>,
<function>builtins.trace</function>,
<function>builtins.readFile</function>.</para></listitem>
2007-12-31 00:08:09 +00:00
</itemizedlist>
</section>
2006-10-11 13:39:00 +00:00
<!--==================================================================-->
<section><title>Release 0.10.1 (October 11, 2006)</title>
<para>This release fixes two somewhat obscure bugs that occur when
evaluating Nix expressions that are stored inside the Nix store
(<literal>NIX-67</literal>). These do not affect most users.</para>
</section>
2006-09-27 12:43:00 +00:00
<!--==================================================================-->
2006-10-06 07:47:56 +00:00
<section><title>Release 0.10 (October 6, 2006)</title>
2005-12-15 21:11:55 +00:00
<note><para>This version of Nix uses Berkeley DB 4.4 instead of 4.3.
The database is upgraded automatically, but you should be careful not
to use old versions of Nix that still use Berkeley DB 4.3. In
particular, if you use a Nix installed through Nix, you should run
<screen>
$ nix-store --clear-substitutes</screen>
first.</para></note>
<warning><para>Also, the database schema has changed slighted to fix a
performance issue (see below). When you run any Nix 0.10 command for
the first time, the database will be upgraded automatically. This is
irreversible.</para></warning>
<itemizedlist>
2014-03-12 12:58:06 +00:00
2006-09-27 13:27:26 +00:00
<!-- Usability / features -->
2005-12-15 21:11:55 +00:00
2014-03-12 12:58:06 +00:00
2006-09-27 12:43:00 +00:00
<listitem><para><command>nix-env</command> usability improvements:
<itemizedlist>
<listitem><para>An option <option>--compare-versions</option>
(or <option>-c</option>) has been added to <command>nix-env
--query</command> to allow you to compare installed versions of
packages to available versions, or vice versa. An easy way to
2006-10-06 07:47:56 +00:00
see if you are up to date with whats in your subscribed
channels is <literal>nix-env -qc \*</literal>.</para></listitem>
2006-09-27 12:43:00 +00:00
<listitem><para><literal>nix-env --query</literal> now takes as
arguments a list of package names about which to show
information, just like <option>--install</option>, etc.: for
example, <literal>nix-env -q gcc</literal>. Note that to show
all derivations, you need to specify
<literal>\*</literal>.</para></listitem>
<listitem><para><literal>nix-env -i
<replaceable>pkgname</replaceable></literal> will now install
the highest available version of
<replaceable>pkgname</replaceable>, rather than installing all
available versions (which would probably give collisions)
(<literal>NIX-31</literal>).</para></listitem>
<listitem><para><literal>nix-env (-i|-u) --dry-run</literal> now
shows exactly which missing paths will be built or
substituted.</para></listitem>
<listitem><para><literal>nix-env -qa --description</literal>
shows human-readable descriptions of packages, provided that
they have a <literal>meta.description</literal> attribute (which
most packages in Nixpkgs dont have yet).</para></listitem>
</itemizedlist>
2014-03-12 12:58:06 +00:00
2006-09-27 12:43:00 +00:00
</para></listitem>
2014-03-12 12:58:06 +00:00
2006-08-22 13:19:06 +00:00
<listitem><para>New language features:
<itemizedlist>
<listitem><para>Reference scanning (which happens after each
2006-09-27 12:43:00 +00:00
build) is much faster and takes a constant amount of
memory.</para></listitem>
2006-08-22 13:19:06 +00:00
<listitem><para>String interpolation. Expressions like
<programlisting>
"--with-freetype2-library=" + freetype + "/lib"</programlisting>
can now be written as
<programlisting>
"--with-freetype2-library=${freetype}/lib"</programlisting>
You can write arbitrary expressions within
<literal>${<replaceable>...</replaceable>}</literal>, not just
identifiers.</para></listitem>
2014-03-12 12:58:06 +00:00
2006-08-22 13:19:06 +00:00
<listitem><para>Multi-line string literals.</para></listitem>
2006-05-08 14:00:39 +00:00
2006-09-27 12:43:00 +00:00
<listitem><para>String concatenations can now involve
2006-09-27 13:27:26 +00:00
derivations, as in the example <code>"--with-freetype2-library="
+ freetype + "/lib"</code>. This was not previously possible
because we need to register that a derivation that uses such a
string is dependent on <literal>freetype</literal>. The
evaluator now properly propagates this information.
Consequently, the subpath operator (<literal>~</literal>) has
been deprecated.</para></listitem>
2006-05-08 14:00:39 +00:00
2006-09-27 12:43:00 +00:00
<listitem><para>Default values of function arguments can now
refer to other function arguments; that is, all arguments are in
scope in the default values
(<literal>NIX-45</literal>).</para></listitem>
2006-08-22 13:19:06 +00:00
2006-09-27 12:43:00 +00:00
<!--
2006-08-22 13:19:06 +00:00
<listitem><para>TODO: domain checks (r5895).</para></listitem>
2006-09-27 12:43:00 +00:00
-->
2006-08-22 13:19:06 +00:00
2006-10-06 07:47:56 +00:00
<listitem><para>Lots of new built-in primitives, such as
2006-09-27 13:27:26 +00:00
functions for list manipulation and integer arithmetic. See the
manual for a complete list. All primops are now available in
the set <varname>builtins</varname>, allowing one to test for
the availability of primop in a backwards-compatible
way.</para></listitem>
2006-10-02 16:14:30 +00:00
<listitem><para>Real let-expressions: <literal>let x = ...;
... z = ...; in ...</literal>.</para></listitem>
2006-08-22 13:19:06 +00:00
</itemizedlist>
</para></listitem>
2006-09-27 13:27:26 +00:00
<listitem><para>New commands <command>nix-pack-closure</command> and
<command>nix-unpack-closure</command> than can be used to easily
transfer a store path with all its dependencies to another machine.
Very convenient whenever you have some package on your machine and
you want to copy it somewhere else.</para></listitem>
2014-03-12 12:58:06 +00:00
2006-09-27 13:27:26 +00:00
<listitem><para>XML support:
<itemizedlist>
<listitem><para><literal>nix-env -q --xml</literal> prints the
installed or available packages in an XML representation for
easy processing by other tools.</para></listitem>
<listitem><para><literal>nix-instantiate --eval-only
--xml</literal> prints an XML representation of the resulting
term. (The new flag <option>--strict</option> forces deep
evaluation of the result, i.e., list elements and attributes are
evaluated recursively.)</para></listitem>
<listitem><para>In Nix expressions, the primop
<function>builtins.toXML</function> converts a term to an XML
representation. This is primarily useful for passing structured
information to builders.</para></listitem>
</itemizedlist>
</para></listitem>
2014-03-12 12:58:06 +00:00
2006-09-27 13:27:26 +00:00
<listitem><para>You can now unambiguously specify which derivation to
2006-09-27 13:27:26 +00:00
build or install in <command>nix-env</command>,
<command>nix-instantiate</command> and <command>nix-build</command>
using the <option>--attr</option> / <option>-A</option> flags, which
takes an attribute name as argument. (Unlike symbolic package names
such as <literal>subversion-1.4.0</literal>, attribute names in an
attribute set are unique.) For instance, a quick way to perform a
test build of a package in Nixpkgs is <literal>nix-build
pkgs/top-level/all-packages.nix -A
<replaceable>foo</replaceable></literal>. <literal>nix-env -q
--attr</literal> shows the attribute names corresponding to each
derivation.</para></listitem>
2014-03-12 12:58:06 +00:00
2006-08-22 13:19:06 +00:00
<listitem><para>If the top-level Nix expression used by
<command>nix-env</command>, <command>nix-instantiate</command> or
<command>nix-build</command> evaluates to a function whose arguments
all have default values, the function will be called automatically.
Also, the new command-line switch <option>--arg
<replaceable>name</replaceable>
<replaceable>value</replaceable></option> can be used to specify
function arguments on the command line.</para></listitem>
2006-05-08 14:00:39 +00:00
2014-03-12 12:58:06 +00:00
2006-09-27 13:27:26 +00:00
<listitem><para><literal>nix-install-package --url
<replaceable>URL</replaceable></literal> allows a package to be
installed directly from the given URL.</para></listitem>
2006-08-22 13:19:06 +00:00
2006-09-27 13:27:26 +00:00
<listitem><para>Nix now works behind an HTTP proxy server; just set
the standard environment variables <envar>http_proxy</envar>,
<envar>https_proxy</envar>, <envar>ftp_proxy</envar> or
<envar>all_proxy</envar> appropriately. Functions such as
<function>fetchurl</function> in Nixpkgs also respect these
variables.</para></listitem>
2006-06-14 13:31:23 +00:00
2006-08-22 13:19:06 +00:00
<listitem><para><literal>nix-build -o
<replaceable>symlink</replaceable></literal> allows the symlink to
the build result to be named something other than
<literal>result</literal>.</para></listitem>
2006-09-27 13:27:26 +00:00
<!-- Stability / performance / etc. -->
<listitem><para>Platform support:
<itemizedlist>
<listitem><para>Support for 64-bit platforms, provided a <link
xlink:href="http://bugzilla.sen.cwi.nl:8080/show_bug.cgi?id=606">suitably
patched ATerm library</link> is used. Also, files larger than 2
GiB are now supported.</para></listitem>
<listitem><para>Added support for Cygwin (Windows,
<literal>i686-cygwin</literal>), Mac OS X on Intel
(<literal>i686-darwin</literal>) and Linux on PowerPC
(<literal>powerpc-linux</literal>).</para></listitem>
<listitem><para>Users of SMP and multicore machines will
appreciate that the number of builds to be performed in parallel
can now be specified in the configuration file in the
<literal>build-max-jobs</literal> setting.</para></listitem>
</itemizedlist>
</para></listitem>
2014-03-12 12:58:06 +00:00
2006-09-06 14:29:49 +00:00
<listitem><para>Garbage collector improvements:
<itemizedlist>
<listitem><para>Open files (such as running programs) are now
used as roots of the garbage collector. This prevents programs
that have been uninstalled from being garbage collected while
they are still running. The script that detects these
additional runtime roots
(<filename>find-runtime-roots.pl</filename>) is inherently
system-specific, but it should work on Linux and on all
platforms that have the <command>lsof</command>
utility.</para></listitem>
<listitem><para><literal>nix-store --gc</literal>
(a.k.a. <command>nix-collect-garbage</command>) prints out the
number of bytes freed on standard output. <literal>nix-store
--gc --print-dead</literal> shows how many bytes would be freed
by an actual garbage collection.</para></listitem>
<listitem><para><literal>nix-collect-garbage -d</literal>
removes all old generations of <emphasis>all</emphasis> profiles
before calling the actual garbage collector (<literal>nix-store
--gc</literal>). This is an easy way to get rid of all old
packages in the Nix store.</para></listitem>
2006-09-27 13:27:26 +00:00
<listitem><para><command>nix-store</command> now has an
operation <option>--delete</option> to delete specific paths
from the Nix store. It wont delete reachable (non-garbage)
paths unless <option>--ignore-liveness</option> is
specified.</para></listitem>
2014-03-12 12:58:06 +00:00
2006-09-06 14:29:49 +00:00
</itemizedlist>
</para></listitem>
2006-08-22 13:19:06 +00:00
2014-03-12 12:58:06 +00:00
2006-09-27 13:27:26 +00:00
<listitem><para>Berkeley DB 4.4s process registry feature is used
to recover from crashed Nix processes.</para></listitem>
<!-- <listitem><para>TODO: shared stores.</para></listitem> -->
<listitem><para>A performance issue has been fixed with the
<literal>referer</literal> table, which stores the inverse of the
<literal>references</literal> table (i.e., it tells you what store
paths refer to a given path). Maintaining this table could take a
quadratic amount of time, as well as a quadratic amount of Berkeley
DB log file space (in particular when running the garbage collector)
(<literal>NIX-23</literal>).</para></listitem>
<listitem><para>Nix now catches the <literal>TERM</literal> and
<literal>HUP</literal> signals in addition to the
<literal>INT</literal> signal. So you can now do a <literal>killall
nix-store</literal> without triggering a database
recovery.</para></listitem>
2006-10-06 07:47:56 +00:00
<listitem><para><command>bsdiff</command> updated to version
2006-09-27 13:27:26 +00:00
4.3.</para></listitem>
2006-08-22 13:19:06 +00:00
<listitem><para>Substantial performance improvements in expression
evaluation and <literal>nix-env -qa</literal>, all thanks to <link
xlink:href="http://valgrind.org/">Valgrind</link>. Memory use has
been reduced by a factor 8 or so. Big speedup by memoisation of
path hashing.</para></listitem>
<listitem><para>Lots of bug fixes, notably:
<itemizedlist>
<listitem><para>Make sure that the garbage collector can run
successfully when the disk is full
(<literal>NIX-18</literal>).</para></listitem>
<listitem><para><command>nix-env</command> now locks the profile
to prevent races between concurrent <command>nix-env</command>
operations on the same profile
(<literal>NIX-7</literal>).</para></listitem>
<listitem><para>Removed misleading messages from
<literal>nix-env -i</literal> (e.g., <literal>installing
`foo'</literal> followed by <literal>uninstalling
`foo'</literal>) (<literal>NIX-17</literal>).</para></listitem>
2006-08-22 13:19:06 +00:00
</itemizedlist>
</para></listitem>
<listitem><para>Nix source distributions are a lot smaller now since
we no longer include a full copy of the Berkeley DB source
distribution (but only the bits we need).</para></listitem>
2006-09-27 13:27:26 +00:00
<listitem><para>Header files are now installed so that external
programs can use the Nix libraries.</para></listitem>
2005-12-15 21:11:55 +00:00
</itemizedlist>
</section>
2006-09-27 12:43:00 +00:00
<!--==================================================================-->
2005-09-22 12:23:22 +00:00
<section><title>Release 0.9.2 (September 21, 2005)</title>
<para>This bug fix release fixes two problems on Mac OS X:
<itemizedlist>
<listitem><para>If Nix was linked against statically linked versions
of the ATerm or Berkeley DB library, there would be dynamic link
errors at runtime.</para></listitem>
<listitem><para><command>nix-pull</command> and
<command>nix-push</command> intermittently failed due to race
conditions involving pipes and child processes with error messages
such as <literal>open2: open(GLOB(0x180b2e4), >&amp;=9) failed: Bad
file descriptor at /nix/bin/nix-pull line 77</literal> (issue
<literal>NIX-14</literal>).</para></listitem>
</itemizedlist>
</para>
</section>
2006-09-27 12:43:00 +00:00
<!--==================================================================-->
2005-09-22 12:23:22 +00:00
<section><title>Release 0.9.1 (September 20, 2005)</title>
<para>This bug fix release addresses a problem with the ATerm library
when the <option>--with-aterm</option> flag in
<command>configure</command> was <emphasis>not</emphasis> used.</para>
</section>
2006-09-27 12:43:00 +00:00
<!--==================================================================-->
2005-09-16 11:28:29 +00:00
<section><title>Release 0.9 (September 16, 2005)</title>
<para>NOTE: this version of Nix uses Berkeley DB 4.3 instead of 4.2.
The database is upgraded automatically, but you should be careful not
to use old versions of Nix that still use Berkeley DB 4.2. In
particular, if you use a Nix installed through Nix, you should run
<screen>
$ nix-store --clear-substitutes</screen>
first.</para>
<itemizedlist>
<listitem><para>Unpacking of patch sequences is much faster now
since we no longer do redundant unpacking and repacking of
intermediate paths.</para></listitem>
<listitem><para>Nix now uses Berkeley DB 4.3.</para></listitem>
<listitem><para>The <function>derivation</function> primitive is
lazier. Attributes of dependent derivations can mutually refer to
each other (as long as there are no data dependencies on the
<varname>outPath</varname> and <varname>drvPath</varname> attributes
computed by <function>derivation</function>).</para>
<para>For example, the expression <literal>derivation
attrs</literal> now evaluates to (essentially)
<programlisting>
attrs // {
type = "derivation";
outPath = derivation! attrs;
drvPath = derivation! attrs;
}</programlisting>
where <function>derivation!</function> is a primop that does the
actual derivation instantiation (i.e., it does what
<function>derivation</function> used to do). The advantage is that
it allows commands such as <command>nix-env -qa</command> and
<command>nix-env -i</command> to be much faster since they no longer
need to instantiate all derivations, just the
<varname>name</varname> attribute.</para>
<para>Also, it allows derivations to cyclically reference each
other, for example,
<programlisting>
webServer = derivation {
...
hostName = "svn.cs.uu.nl";
services = [svnService];
};
&#x20;
svnService = derivation {
...
hostName = webServer.hostName;
};</programlisting>
Previously, this would yield a black hole (infinite recursion).</para>
2014-03-12 12:58:06 +00:00
</listitem>
<listitem><para><command>nix-build</command> now defaults to using
<filename>./default.nix</filename> if no Nix expression is
specified.</para></listitem>
<listitem><para><command>nix-instantiate</command>, when applied to
a Nix expression that evaluates to a function, will call the
function automatically if all its arguments have
defaults.</para></listitem>
<listitem><para>Nix now uses libtool to build dynamic libraries.
This reduces the size of executables.</para></listitem>
<listitem><para>A new list concatenation operator
<literal>++</literal>. For example, <literal>[1 2 3] ++ [4 5
6]</literal> evaluates to <literal>[1 2 3 4 5
6]</literal>.</para></listitem>
<listitem><para>Some currently undocumented primops to support
low-level build management using Nix (i.e., using Nix as a Make
replacement). See the commit messages for <literal>r3578</literal>
and <literal>r3580</literal>.</para></listitem>
<listitem><para>Various bug fixes and performance
improvements.</para></listitem>
</itemizedlist>
</section>
2006-09-27 12:43:00 +00:00
<!--==================================================================-->
2005-09-16 11:28:29 +00:00
<section><title>Release 0.8.1 (April 13, 2005)</title>
<para>This is a bug fix release.</para>
<itemizedlist>
<listitem><para>Patch downloading was broken.</para></listitem>
<listitem><para>The garbage collector would not delete paths that
had references from invalid (but substitutable)
paths.</para></listitem>
</itemizedlist>
</section>
2006-09-27 12:43:00 +00:00
<!--==================================================================-->
<section><title>Release 0.8 (April 11, 2005)</title>
<para>NOTE: the hashing scheme in Nix 0.8 changed (as detailed below).
As a result, <command>nix-pull</command> manifests and channels built
for Nix 0.7 and below will now work anymore. However, the Nix
expression language has not changed, so you can still build from
source. Also, existing user environments continue to work. Nix 0.8
will automatically upgrade the database schema of previous
installations when it is first run.</para>
<para>If you get the error message
<screen>
you have an old-style manifest `/nix/var/nix/manifests/[...]'; please
delete it</screen>
you should delete previously downloaded manifests:
<screen>
$ rm /nix/var/nix/manifests/*</screen>
If <command>nix-channel</command> gives the error message
<screen>
manifest `http://catamaran.labs.cs.uu.nl/dist/nix/channels/[channel]/MANIFEST'
is too old (i.e., for Nix &lt;= 0.7)</screen>
then you should unsubscribe from the offending channel
(<command>nix-channel --remove
<replaceable>URL</replaceable></command>; leave out
<literal>/MANIFEST</literal>), and subscribe to the same URL, with
<literal>channels</literal> replaced by <literal>channels-v3</literal>
(e.g., <link
xlink:href='http://catamaran.labs.cs.uu.nl/dist/nix/channels-v3/nixpkgs-unstable'
/>).</para>
<para>Nix 0.8 has the following improvements:
<itemizedlist>
<listitem><para>The cryptographic hashes used in store paths are now
160 bits long, but encoded in base-32 so that they are still only 32
characters long (e.g.,
<filename>/nix/store/csw87wag8bqlqk7ipllbwypb14xainap-atk-1.9.0</filename>).
(This is actually a 160 bit truncation of a SHA-256
hash.)</para></listitem>
<listitem><para>Big cleanups and simplifications of the basic store
semantics. The notion of “closure store expressions” is gone (and
so is the notion of “successors”); the file system references of a
store path are now just stored in the database.</para>
<para>For instance, given any store path, you can query its closure:
<screen>
$ nix-store -qR $(which firefox)
... lots of paths ...</screen>
Also, Nix now remembers for each store path the derivation that
built it (the “deriver”):
<screen>
$ nix-store -qR $(which firefox)
/nix/store/4b0jx7vq80l9aqcnkszxhymsf1ffa5jd-firefox-1.0.1.drv</screen>
So to see the build-time dependencies, you can do
<screen>
$ nix-store -qR $(nix-store -qd $(which firefox))</screen>
or, in a nicer format:
<screen>
$ nix-store -q --tree $(nix-store -qd $(which firefox))</screen>
</para>
<para>File system references are also stored in reverse. For
instance, you can query all paths that directly or indirectly use a
certain Glibc:
<screen>
$ nix-store -q --referrers-closure \
/nix/store/8lz9yc6zgmc0vlqmn2ipcpkjlmbi51vv-glibc-2.3.4</screen>
</para>
2014-03-12 12:58:06 +00:00
</listitem>
<listitem><para>The concept of fixed-output derivations has been
formalised. Previously, functions such as
<function>fetchurl</function> in Nixpkgs used a hack (namely,
explicitly specifying a store path hash) to prevent changes to, say,
the URL of the file from propagating upwards through the dependency
graph, causing rebuilds of everything. This can now be done cleanly
by specifying the <varname>outputHash</varname> and
<varname>outputHashAlgo</varname> attributes. Nix itself checks
that the content of the output has the specified hash. (This is
important for maintaining certain invariants necessary for future
work on secure shared stores.)</para></listitem>
<listitem><para>One-click installation :-) It is now possible to
install any top-level component in Nixpkgs directly, through the web
— see, e.g., <link
xlink:href='http://catamaran.labs.cs.uu.nl/dist/nixpkgs-0.8/' />.
All you have to do is associate
<filename>/nix/bin/nix-install-package</filename> with the MIME type
<literal>application/nix-package</literal> (or the extension
<filename>.nixpkg</filename>), and clicking on a package link will
cause it to be installed, with all appropriate dependencies. If you
just want to install some specific application, this is easier than
subscribing to a channel.</para></listitem>
<listitem><para><command>nix-store -r
<replaceable>PATHS</replaceable></command> now builds all the
derivations PATHS in parallel. Previously it did them sequentially
(though exploiting possible parallelism between subderivations).
This is nice for build farms.</para></listitem>
<listitem><para><command>nix-channel</command> has new operations
<option>--list</option> and
<option>--remove</option>.</para></listitem>
<listitem><para>New ways of installing components into user
environments:
<itemizedlist>
<listitem><para>Copy from another user environment:
<screen>
$ nix-env -i --from-profile .../other-profile firefox</screen>
</para></listitem>
<listitem><para>Install a store derivation directly (bypassing the
Nix expression language entirely):
<screen>
$ nix-env -i /nix/store/z58v41v21xd3...-aterm-2.3.1.drv</screen>
(This is used to implement <command>nix-install-package</command>,
which is therefore immune to evolution in the Nix expression
language.)</para></listitem>
<listitem><para>Install an already built store path directly:
<screen>
$ nix-env -i /nix/store/hsyj5pbn0d9i...-aterm-2.3.1</screen>
</para></listitem>
<listitem><para>Install the result of a Nix expression specified
as a command-line argument:
<screen>
$ nix-env -f .../i686-linux.nix -i -E 'x: x.firefoxWrapper'</screen>
The difference with the normal installation mode is that
<option>-E</option> does not use the <varname>name</varname>
attributes of derivations. Therefore, this can be used to
disambiguate multiple derivations with the same
name.</para></listitem>
</itemizedlist></para></listitem>
<listitem><para>A hash of the contents of a store path is now stored
in the database after a successful build. This allows you to check
whether store paths have been tampered with: <command>nix-store
--verify --check-contents</command>.</para></listitem>
<listitem>
<para>Implemented a concurrent garbage collector. It is now
always safe to run the garbage collector, even if other Nix
operations are happening simultaneously.</para>
<para>However, there can still be GC races if you use
<command>nix-instantiate</command> and <command>nix-store
--realise</command> directly to build things. To prevent races,
use the <option>--add-root</option> flag of those commands.</para>
</listitem>
<listitem><para>The garbage collector now finally deletes paths in
the right order (i.e., topologically sorted under the “references”
relation), thus making it safe to interrupt the collector without
risking a store that violates the closure
invariant.</para></listitem>
<listitem><para>Likewise, the substitute mechanism now downloads
files in the right order, thus preserving the closure invariant at
all times.</para></listitem>
<listitem><para>The result of <command>nix-build</command> is now
registered as a root of the garbage collector. If the
<filename>./result</filename> link is deleted, the GC root
disappears automatically.</para></listitem>
<listitem>
<para>The behaviour of the garbage collector can be changed
globally by setting options in
<filename>/nix/etc/nix/nix.conf</filename>.
<itemizedlist>
<listitem><para><literal>gc-keep-derivations</literal> specifies
whether deriver links should be followed when searching for live
paths.</para></listitem>
<listitem><para><literal>gc-keep-outputs</literal> specifies
whether outputs of derivations should be followed when searching
for live paths.</para></listitem>
<listitem><para><literal>env-keep-derivations</literal>
specifies whether user environments should store the paths of
derivations when they are added (thus keeping the derivations
alive).</para></listitem>
</itemizedlist>
</para></listitem>
<listitem><para>New <command>nix-env</command> query flags
<option>--drv-path</option> and
<option>--out-path</option>.</para></listitem>
<listitem><para><command>fetchurl</command> allows SHA-1 and SHA-256
in addition to MD5. Just specify the attribute
<varname>sha1</varname> or <varname>sha256</varname> instead of
<varname>md5</varname>.</para></listitem>
<listitem><para>Manual updates.</para></listitem>
</itemizedlist>
</para>
</section>
2006-09-27 12:43:00 +00:00
<!--==================================================================-->
<section><title>Release 0.7 (January 12, 2005)</title>
<itemizedlist>
<listitem><para>Binary patching. When upgrading components using
pre-built binaries (through nix-pull / nix-channel), Nix can
automatically download and apply binary patches to already installed
components instead of full downloads. Patching is “smart”: if there
is a <emphasis>sequence</emphasis> of patches to an installed
component, Nix will use it. Patches are currently generated
automatically between Nixpkgs (pre-)releases.</para></listitem>
<listitem><para>Simplifications to the substitute
mechanism.</para></listitem>
<listitem><para>Nix-pull now stores downloaded manifests in
<filename>/nix/var/nix/manifests</filename>.</para></listitem>
<listitem><para>Metadata on files in the Nix store is canonicalised
after builds: the last-modified timestamp is set to 0 (00:00:00
1/1/1970), the mode is set to 0444 or 0555 (readable and possibly
executable by all; setuid/setgid bits are dropped), and the group is
set to the default. This ensures that the result of a build and an
installation through a substitute is the same; and that timestamp
dependencies are revealed.</para></listitem>
</itemizedlist>
</section>
2006-09-27 12:43:00 +00:00
<!--==================================================================-->
<section><title>Release 0.6 (November 14, 2004)</title>
<itemizedlist>
<listitem>
<para>Rewrite of the normalisation engine.
<itemizedlist>
<listitem><para>Multiple builds can now be performed in parallel
(option <option>-j</option>).</para></listitem>
<listitem><para>Distributed builds. Nix can now call a shell
script to forward builds to Nix installations on remote
machines, which may or may not be of the same platform
type.</para></listitem>
<listitem><para>Option <option>--fallback</option> allows
recovery from broken substitutes.</para></listitem>
<listitem><para>Option <option>--keep-going</option> causes
building of other (unaffected) derivations to continue if one
failed.</para></listitem>
</itemizedlist>
</para>
</listitem>
<listitem><para>Improvements to the garbage collector (i.e., it
should actually work now).</para></listitem>
<listitem><para>Setuid Nix installations allow a Nix store to be
shared among multiple users.</para></listitem>
<listitem><para>Substitute registration is much faster
now.</para></listitem>
<listitem><para>A utility <command>nix-build</command> to build a
Nix expression and create a symlink to the result int the current
directory; useful for testing Nix derivations.</para></listitem>
<listitem><para>Manual updates.</para></listitem>
<listitem>
<para><command>nix-env</command> changes:
<itemizedlist>
<listitem><para>Derivations for other platforms are filtered out
(which can be overridden using
<option>--system-filter</option>).</para></listitem>
<listitem><para><option>--install</option> by default now
uninstall previous derivations with the same
name.</para></listitem>
<listitem><para><option>--upgrade</option> allows upgrading to a
specific version.</para></listitem>
<listitem><para>New operation
<option>--delete-generations</option> to remove profile
generations (necessary for effective garbage
collection).</para></listitem>
<listitem><para>Nicer output (sorted,
columnised).</para></listitem>
</itemizedlist>
2014-03-12 12:58:06 +00:00
</para>
</listitem>
<listitem><para>More sensible verbosity levels all around (builder
output is now shown always, unless <option>-Q</option> is
given).</para></listitem>
<listitem>
<para>Nix expression language changes:
<itemizedlist>
2014-03-12 12:58:06 +00:00
<listitem><para>New language construct: <literal>with
<replaceable>E1</replaceable>;
<replaceable>E2</replaceable></literal> brings all attributes
defined in the attribute set <replaceable>E1</replaceable> in
scope in <replaceable>E2</replaceable>.</para></listitem>
<listitem><para>Added a <function>map</function>
function.</para></listitem>
<listitem><para>Various new operators (e.g., string
concatenation).</para></listitem>
</itemizedlist>
</para>
</listitem>
<listitem><para>Expression evaluation is much
faster.</para></listitem>
<listitem><para>An Emacs mode for editing Nix expressions (with
syntax highlighting and indentation) has been
added.</para></listitem>
<listitem><para>Many bug fixes.</para></listitem>
</itemizedlist>
</section>
2006-09-27 12:43:00 +00:00
<!--==================================================================-->
<section><title>Release 0.5 and earlier</title>
<para>Please refer to the Subversion commit log messages.</para>
</section>
</article>