lix/doc/manual/release-notes.xml

756 lines
25 KiB
XML
Raw Normal View History

2006-08-22 13:19:06 +00:00
<article xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Nix Release Notes</title>
2005-12-15 21:11:55 +00:00
<section><title>Release 0.10 (TBA)</title>
<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>
<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 see
if you are up to date with whats in the channel is <literal>nix-env
-qc \*</literal>.</para></listitem>
2005-12-15 21:11:55 +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>
2006-08-22 13:19:06 +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> -->
2005-12-15 21:11:55 +00:00
<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>
2005-12-15 21:11:55 +00:00
<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-08-22 13:19:06 +00:00
<listitem><para>New language features:
<itemizedlist>
<listitem><para>Reference scanning (which happens after each
build) is much faster.</para></listitem>
<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>
<listitem><para>Multi-line string literals.</para></listitem>
2006-05-08 14:00:39 +00:00
2006-08-22 13:19:06 +00:00
<listitem><para>TODO: string concatenations involving
derivations. Consequently, the subpath operator
(<literal>~</literal>) has been deprecated.</para></listitem>
2006-05-08 14:00:39 +00:00
2006-08-22 13:19:06 +00:00
<listitem><para>TODO: function argument default values can refer
to other function arguments
(<literal>NIX-45</literal>)</para></listitem>
2006-08-22 13:19:06 +00:00
<listitem><para>TODO: domain checks (r5895).</para></listitem>
</itemizedlist>
</para></listitem>
<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
<listitem><para>TODO: proxy support.</para></listitem>
2006-08-22 13:19:06 +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 stire 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>
<listitem><para><command>bsdiff</command> updated
4.3.</para></listitem>
2006-06-14 13:31:23 +00:00
<listitem><para>TODO: open files etc. are now used as roots of the
2006-08-22 13:19:06 +00:00
garbage collector (r5796).</para></listitem>
<listitem><para>TODO: --attr / -A flags in
nix-env/nix-instantiate/nix-build. Also nix-env -qa
--attr.</para></listitem>
<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>
<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>New command <literal>nix-store --delete</literal> to
delete specific paths from the Nix store. It wont delete reachable
(non-garbage) paths unless <option>--ignore-liveness</option> is
specified.</para></listitem>
<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
succesfully 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>TODO: XML support in <literal>nix-env -q
--xml</literal> and <literal>nix-instantiate --eval-only
--xml</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>
2006-08-22 13:19:06 +00:00
<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>
<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>
<listitem><para>Support for 64-bit platforms, provided <link
xlink:href="http://bugzilla.sen.cwi.nl:8080/show_bug.cgi?id=606">suitably
patched ATerm library</link> is used.</para></listitem>
<listitem><para>Added support for Cygwin (Windows,
<literal>i686-cygwin</literal>) and Mac OS X on Intel
(<literal>i686-darwin</literal>).</para></listitem>
<listitem><para>TODO: <literal>nix-push
--target</literal>.</para></listitem>
2005-12-15 21:11:55 +00:00
</itemizedlist>
</section>
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>
<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>
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>
</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>
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>
<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.,
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.,
/nix/store/csw87wag8bqlqk7ipllbwypb14xainap-atk-1.9.0). (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>
</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., 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 succesful 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
<quote>references</quote> 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>
<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 *sequence* 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
/nix/var/nix/manifests.</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>
<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 overriden 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>
</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>
<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>
<section><title>Release 0.5 and earlier</title>
<para>Please refer to the Subversion commit log messages.</para>
</section>
</article>