aboutsummaryrefslogtreecommitdiff
path: root/doc/manual/src/release-notes
diff options
context:
space:
mode:
authorRebecca Turner <rbt@sent.as>2024-03-27 10:16:16 -0700
committerRebecca Turner <rbt@sent.as>2024-03-29 22:57:40 -0700
commit2a98ba8b97c9ff52519633c32cf63716827d6e7c (patch)
tree7b64c40ad064183cc7bc7afc662890ea567f2136 /doc/manual/src/release-notes
parenta4f5bb951dbc6fa4ffa2bb56376b38f38b6e9154 (diff)
Add `pre-commit` checks
The big ones here are `trim-trailing-whitespace` and `end-of-file-fixer` (which makes sure that every file ends with exactly one newline character). Change-Id: Idca73b640883188f068f9903e013cf0d82aa1123
Diffstat (limited to 'doc/manual/src/release-notes')
-rw-r--r--doc/manual/src/release-notes/rl-0.10.md66
-rw-r--r--doc/manual/src/release-notes/rl-0.11.md8
-rw-r--r--doc/manual/src/release-notes/rl-0.12.md32
-rw-r--r--doc/manual/src/release-notes/rl-0.13.md8
-rw-r--r--doc/manual/src/release-notes/rl-0.6.md24
-rw-r--r--doc/manual/src/release-notes/rl-0.8.md48
-rw-r--r--doc/manual/src/release-notes/rl-0.9.md14
-rw-r--r--doc/manual/src/release-notes/rl-1.1.md10
-rw-r--r--doc/manual/src/release-notes/rl-1.11.md16
-rw-r--r--doc/manual/src/release-notes/rl-1.2.md20
-rw-r--r--doc/manual/src/release-notes/rl-1.6.md12
-rw-r--r--doc/manual/src/release-notes/rl-1.7.md24
-rw-r--r--doc/manual/src/release-notes/rl-1.8.md12
-rw-r--r--doc/manual/src/release-notes/rl-1.9.md54
-rw-r--r--doc/manual/src/release-notes/rl-2.0.md144
-rw-r--r--doc/manual/src/release-notes/rl-2.2.md18
16 files changed, 255 insertions, 255 deletions
diff --git a/doc/manual/src/release-notes/rl-0.10.md b/doc/manual/src/release-notes/rl-0.10.md
index 1301add26..05e6dcf76 100644
--- a/doc/manual/src/release-notes/rl-0.10.md
+++ b/doc/manual/src/release-notes/rl-0.10.md
@@ -1,67 +1,67 @@
# Release 0.10 (2006-10-06)
> **Note**
->
+>
> 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
->
+>
> $ nix-store --clear-substitutes
->
+>
> first.
> **Warning**
->
+>
> 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.
- `nix-env` usability improvements:
-
+
- An option `--compare-versions` (or `-c`) has been added to
`nix-env
--query` 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 what’s in your subscribed channels is
`nix-env -qc \*`.
-
+
- `nix-env --query` now takes as arguments a list of package names
about which to show information, just like `--install`, etc.:
for example, `nix-env -q gcc`. Note that to show all
derivations, you need to specify `\*`.
-
+
- `nix-env -i
pkgname` will now install the highest available version of
*pkgname*, rather than installing all available versions (which
would probably give collisions) (`NIX-31`).
-
+
- `nix-env (-i|-u) --dry-run` now shows exactly which missing
paths will be built or substituted.
-
+
- `nix-env -qa --description` shows human-readable descriptions of
packages, provided that they have a `meta.description` attribute
(which most packages in Nixpkgs don’t have yet).
- New language features:
-
+
- Reference scanning (which happens after each build) is much
faster and takes a constant amount of memory.
-
+
- String interpolation. Expressions like
-
+
"--with-freetype2-library=" + freetype + "/lib"
-
+
can now be written as
-
+
"--with-freetype2-library=${freetype}/lib"
-
+
You can write arbitrary expressions within `${...}`, not just
identifiers.
-
+
- Multi-line string literals.
-
+
- String concatenations can now involve derivations, as in the
example `"--with-freetype2-library="
+ freetype + "/lib"`. This was not previously possible because
@@ -69,17 +69,17 @@
dependent on `freetype`. The evaluator now properly propagates
this information. Consequently, the subpath operator (`~`) has
been deprecated.
-
+
- Default values of function arguments can now refer to other
function arguments; that is, all arguments are in scope in the
default values (`NIX-45`).
-
+
- Lots of new built-in primitives, such as functions for list
manipulation and integer arithmetic. See the manual for a
complete list. All primops are now available in the set
`builtins`, allowing one to test for the availability of primop
in a backwards-compatible way.
-
+
- Real let-expressions: `let x = ...;
... z = ...; in ...`.
@@ -89,15 +89,15 @@
your machine and you want to copy it somewhere else.
- XML support:
-
+
- `nix-env -q --xml` prints the installed or available packages in
an XML representation for easy processing by other tools.
-
+
- `nix-instantiate --eval-only
--xml` prints an XML representation of the resulting term. (The
new flag `--strict` forces ‘deep’ evaluation of the result,
i.e., list elements and attributes are evaluated recursively.)
-
+
- In Nix expressions, the primop `builtins.toXML` converts a term
to an XML representation. This is primarily useful for passing
structured information to builders.
@@ -133,21 +133,21 @@
something other than `result`.
- Platform support:
-
+
- Support for 64-bit platforms, provided a [suitably patched ATerm
library](http://bugzilla.sen.cwi.nl:8080/show_bug.cgi?id=606) is
used. Also, files larger than 2 GiB are now supported.
-
+
- Added support for Cygwin (Windows, `i686-cygwin`), Mac OS X on
Intel (`i686-darwin`) and Linux on PowerPC (`powerpc-linux`).
-
+
- 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 `build-max-jobs`
setting.
- Garbage collector improvements:
-
+
- 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
@@ -155,17 +155,17 @@
(`find-runtime-roots.pl`) is inherently system-specific, but it
should work on Linux and on all platforms that have the `lsof`
utility.
-
+
- `nix-store --gc` (a.k.a. `nix-collect-garbage`) prints out the
number of bytes freed on standard output. `nix-store
--gc --print-dead` shows how many bytes would be freed by an
actual garbage collection.
-
+
- `nix-collect-garbage -d` removes all old generations of *all*
profiles before calling the actual garbage collector (`nix-store
--gc`). This is an easy way to get rid of all old packages in
the Nix store.
-
+
- `nix-store` now has an operation `--delete` to delete specific
paths from the Nix store. It won’t delete reachable
(non-garbage) paths unless `--ignore-liveness` is specified.
@@ -192,13 +192,13 @@
memoisation of path hashing.
- Lots of bug fixes, notably:
-
+
- Make sure that the garbage collector can run successfully when
the disk is full (`NIX-18`).
-
+
- `nix-env` now locks the profile to prevent races between
concurrent `nix-env` operations on the same profile (`NIX-7`).
-
+
- Removed misleading messages from `nix-env -i` (e.g.,
``installing
`foo'`` followed by ``uninstalling
diff --git a/doc/manual/src/release-notes/rl-0.11.md b/doc/manual/src/release-notes/rl-0.11.md
index d2f4d73aa..4564db977 100644
--- a/doc/manual/src/release-notes/rl-0.11.md
+++ b/doc/manual/src/release-notes/rl-0.11.md
@@ -50,7 +50,7 @@ on Nix. Here is an (incomplete) list:
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.
-
+
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., `gcc-4.2.0rc1`) which should not
@@ -62,14 +62,14 @@ on Nix. Here is an (incomplete) list:
be modified. There are several attributes that can be usefully
modified, because they affect the behaviour of `nix-env` or the user
environment build script:
-
+
- `meta.priority` can be changed to resolve filename clashes (see
above).
-
+
- `meta.keep` can be set to `true` to prevent the package from
being upgraded or replaced. Useful if you want to hang on to an
older version of a package.
-
+
- `meta.active` can be set to `false` 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 won’t be
diff --git a/doc/manual/src/release-notes/rl-0.12.md b/doc/manual/src/release-notes/rl-0.12.md
index 3a4aba07d..7042abb4c 100644
--- a/doc/manual/src/release-notes/rl-0.12.md
+++ b/doc/manual/src/release-notes/rl-0.12.md
@@ -7,23 +7,23 @@
Nix process crashes; no write access is needed for read-only
operations; no more running out of Berkeley DB locks on certain
operations.
-
+
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 don’t need this, you can build Nix with the `configure`
option `--disable-old-db-compat`.
-
+
After the automatic conversion to the new schema, you can delete the
old Berkeley DB files:
-
+
$ cd /nix/var/nix/db
$ rm __db* log.* derivers references referrers reserved validpaths DB_CONFIG
-
+
The new metadata is stored in the directories `/nix/var/nix/db/info`
and `/nix/var/nix/db/referrer`. 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.
-
+
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 `ext3`
@@ -50,11 +50,11 @@
last access time. This allows non-recently used stuff to be deleted.
The option `--max-atime time` specifies an upper limit to the last
accessed time of paths that may be deleted. For instance,
-
- ```
+
+ ```
$ nix-store --gc -v --max-atime $(date +%s -d "2 months ago")
```
-
+
deletes everything that hasn’t been accessed in two months.
- `nix-env` now uses optimistic profile locking when performing an
@@ -73,7 +73,7 @@
now always shown by `nix-env`, `nix-store -r` and `nix-build`. The
total download size of substitutable paths is now also shown. For
instance, a build will show something like
-
+
the following derivations will be built:
/nix/store/129sbxnk5n466zg6r1qmq1xjv9zymyy7-activate-configuration.sh.drv
/nix/store/7mzy971rdm8l566ch8hgxaf89x7lr7ik-upstart-jobs.drv
@@ -84,24 +84,24 @@
...
- Language features:
-
+
- @-patterns as in Haskell. For instance, in a function definition
-
+
f = args @ {x, y, z}: ...;
-
+
`args` refers to the argument as a whole, which is further
pattern-matched against the attribute set pattern `{x, y, z}`.
-
+
- “`...`” (ellipsis) patterns. An attribute set pattern can now
say `...` at the end of the attribute name list to specify that
the function takes *at least* the listed attributes, while
ignoring additional attributes. For instance,
-
+
{stdenv, fetchurl, fuse, ...}: ...
-
+
defines a function that accepts any attribute set that includes
at least the three listed attributes.
-
+
- New primops: `builtins.parseDrvName` (split a package name
string like `"nix-0.12pre12876"` into its name and version
components, e.g. `"nix"` and `"0.12pre12876"`),
diff --git a/doc/manual/src/release-notes/rl-0.13.md b/doc/manual/src/release-notes/rl-0.13.md
index 13a60e01c..bdb750051 100644
--- a/doc/manual/src/release-notes/rl-0.13.md
+++ b/doc/manual/src/release-notes/rl-0.13.md
@@ -3,7 +3,7 @@
This is primarily a bug fix release. It has some new features:
- Syntactic sugar for writing nested attribute sets. Instead of
-
+
{
foo = {
bar = 123;
@@ -11,15 +11,15 @@ This is primarily a bug fix release. It has some new features:
};
a = { b = { c = "d"; }; };
}
-
+
you can write
-
+
{
foo.bar = 123;
foo.xyzzy = true;
a.b.c = "d";
}
-
+
This is useful, for instance, in NixOS configuration files.
- Support for Nix channels generated by Hydra, the Nix-based
diff --git a/doc/manual/src/release-notes/rl-0.6.md b/doc/manual/src/release-notes/rl-0.6.md
index ed2d21583..7fa0324eb 100644
--- a/doc/manual/src/release-notes/rl-0.6.md
+++ b/doc/manual/src/release-notes/rl-0.6.md
@@ -1,15 +1,15 @@
# Release 0.6 (2004-11-14)
- Rewrite of the normalisation engine.
-
+
- Multiple builds can now be performed in parallel (option `-j`).
-
+
- 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.
-
+
- Option `--fallback` allows recovery from broken substitutes.
-
+
- Option `--keep-going` causes building of other (unaffected)
derivations to continue if one failed.
@@ -28,32 +28,32 @@
- Manual updates.
- `nix-env` changes:
-
+
- Derivations for other platforms are filtered out (which can be
overridden using `--system-filter`).
-
+
- `--install` by default now uninstall previous derivations with
the same name.
-
+
- `--upgrade` allows upgrading to a specific version.
-
+
- New operation `--delete-generations` to remove profile
generations (necessary for effective garbage collection).
-
+
- Nicer output (sorted, columnised).
- More sensible verbosity levels all around (builder output is now
shown always, unless `-Q` is given).
- Nix expression language changes:
-
+
- New language construct: `with
E1;
E2` brings all attributes defined in the attribute set *E1* in
scope in *E2*.
-
+
- Added a `map` function.
-
+
- Various new operators (e.g., string concatenation).
- Expression evaluation is much faster.
diff --git a/doc/manual/src/release-notes/rl-0.8.md b/doc/manual/src/release-notes/rl-0.8.md
index 626c0c92b..5ba6e0e72 100644
--- a/doc/manual/src/release-notes/rl-0.8.md
+++ b/doc/manual/src/release-notes/rl-0.8.md
@@ -39,29 +39,29 @@ Nix 0.8 has the following improvements:
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.
-
+
For instance, given any store path, you can query its closure:
-
+
$ nix-store -qR $(which firefox)
... lots of paths ...
-
+
Also, Nix now remembers for each store path the derivation that
built it (the “deriver”):
-
+
$ nix-store -qR $(which firefox)
/nix/store/4b0jx7vq80l9aqcnkszxhymsf1ffa5jd-firefox-1.0.1.drv
-
+
So to see the build-time dependencies, you can do
-
+
$ nix-store -qR $(nix-store -qd $(which firefox))
-
+
or, in a nicer format:
-
+
$ nix-store -q --tree $(nix-store -qd $(which firefox))
-
+
File system references are also stored in reverse. For instance, you
can query all paths that directly or indirectly use a certain Glibc:
-
+
$ nix-store -q --referrers-closure \
/nix/store/8lz9yc6zgmc0vlqmn2ipcpkjlmbi51vv-glibc-2.3.4
@@ -92,28 +92,28 @@ Nix 0.8 has the following improvements:
- `nix-channel` has new operations `--list` and `--remove`.
- New ways of installing components into user environments:
-
+
- Copy from another user environment:
-
+
$ nix-env -i --from-profile .../other-profile firefox
-
+
- Install a store derivation directly (bypassing the Nix
expression language entirely):
-
+
$ nix-env -i /nix/store/z58v41v21xd3...-aterm-2.3.1.drv
-
+
(This is used to implement `nix-install-package`, which is
therefore immune to evolution in the Nix expression language.)
-
+
- Install an already built store path directly:
-
+
$ nix-env -i /nix/store/hsyj5pbn0d9i...-aterm-2.3.1
-
+
- Install the result of a Nix expression specified as a
command-line argument:
-
+
$ nix-env -f .../i686-linux.nix -i -E 'x: x.firefoxWrapper'
-
+
The difference with the normal installation mode is that `-E`
does not use the `name` attributes of derivations. Therefore,
this can be used to disambiguate multiple derivations with the
@@ -127,7 +127,7 @@ Nix 0.8 has the following improvements:
- Implemented a concurrent garbage collector. It is now always safe to
run the garbage collector, even if other Nix operations are
happening simultaneously.
-
+
However, there can still be GC races if you use `nix-instantiate`
and `nix-store
--realise` directly to build things. To prevent races, use the
@@ -147,13 +147,13 @@ Nix 0.8 has the following improvements:
- The behaviour of the garbage collector can be changed globally by
setting options in `/nix/etc/nix/nix.conf`.
-
+
- `gc-keep-derivations` specifies whether deriver links should be
followed when searching for live paths.
-
+
- `gc-keep-outputs` specifies whether outputs of derivations
should be followed when searching for live paths.
-
+
- `env-keep-derivations` specifies whether user environments
should store the paths of derivations when they are added (thus
keeping the derivations alive).
diff --git a/doc/manual/src/release-notes/rl-0.9.md b/doc/manual/src/release-notes/rl-0.9.md
index 8c3e1b28e..a08aa38c4 100644
--- a/doc/manual/src/release-notes/rl-0.9.md
+++ b/doc/manual/src/release-notes/rl-0.9.md
@@ -18,36 +18,36 @@ first.
derivations can mutually refer to each other (as long as there are
no data dependencies on the `outPath` and `drvPath` attributes
computed by `derivation`).
-
+
For example, the expression `derivation
attrs` now evaluates to (essentially)
-
+
attrs // {
type = "derivation";
outPath = derivation! attrs;
drvPath = derivation! attrs;
}
-
+
where `derivation!` is a primop that does the actual derivation
instantiation (i.e., it does what `derivation` used to do). The
advantage is that it allows commands such as `nix-env -qa` and
`nix-env -i` to be much faster since they no longer need to
instantiate all derivations, just the `name` attribute.
-
+
Also, it allows derivations to cyclically reference each other, for
example,
-
+
webServer = derivation {
...
hostName = "svn.cs.uu.nl";
services = [svnService];
};
-
+
svnService = derivation {
...
hostName = webServer.hostName;
};
-
+
Previously, this would yield a black hole (infinite recursion).
- `nix-build` now defaults to using `./default.nix` if no Nix
diff --git a/doc/manual/src/release-notes/rl-1.1.md b/doc/manual/src/release-notes/rl-1.1.md
index 1e658fe15..665dd92a2 100644
--- a/doc/manual/src/release-notes/rl-1.1.md
+++ b/doc/manual/src/release-notes/rl-1.1.md
@@ -5,26 +5,26 @@ This release has the following improvements:
- On Linux, when doing a chroot build, Nix now uses various namespace
features provided by the Linux kernel to improve build isolation.
Namely:
-
+
- 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.
-
+
- 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 *are* visible from
the outside (though with different PIDs).
-
+
- 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.
-
+
- The UTS namespace ensures that builders see a hostname of
`localhost` rather than the actual hostname.
-
+
- 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.
diff --git a/doc/manual/src/release-notes/rl-1.11.md b/doc/manual/src/release-notes/rl-1.11.md
index fbabdaa2f..8108114b8 100644
--- a/doc/manual/src/release-notes/rl-1.11.md
+++ b/doc/manual/src/release-notes/rl-1.11.md
@@ -5,23 +5,23 @@ features:
- `nix-prefetch-url` can now download URLs specified in a Nix
expression. For example,
-
+
$ nix-prefetch-url -A hello.src
-
+
will prefetch the file specified by the `fetchurl` call in the
attribute `hello.src` from the Nix expression in the current
directory, and print the cryptographic hash of the resulting file on
stdout. This differs from `nix-build -A
hello.src` in that it doesn't verify the hash, and is thus useful
when you’re updating a Nix expression.
-
+
You can also prefetch the result of functions that unpack a tarball,
such as `fetchFromGitHub`. For example:
-
+
$ nix-prefetch-url --unpack https://github.com/NixOS/patchelf/archive/0.8.tar.gz
-
+
or from a Nix expression:
-
+
$ nix-prefetch-url -A nix-repl.src
- The builtin function `<nix/fetchurl.nix>` now supports downloading
@@ -49,12 +49,12 @@ features:
same derivation and `-K` is given, will make the output of the other
run available under `store-path-check`. This makes it easier to
investigate the non-determinism using tools like `diffoscope`, e.g.,
-
+
$ nix-build pkgs/stdenv/linux -A stage1.pkgs.zlib --check -K
error: derivation ‘/nix/store/l54i8wlw2265…-zlib-1.2.8.drv’ may not
be deterministic: output ‘/nix/store/11a27shh6n2i…-zlib-1.2.8’
differs from ‘/nix/store/11a27shh6n2i…-zlib-1.2.8-check’
-
+
$ diffoscope /nix/store/11a27shh6n2i…-zlib-1.2.8 /nix/store/11a27shh6n2i…-zlib-1.2.8-check
├── lib/libz.a
diff --git a/doc/manual/src/release-notes/rl-1.2.md b/doc/manual/src/release-notes/rl-1.2.md
index 25b830955..0a30e8909 100644
--- a/doc/manual/src/release-notes/rl-1.2.md
+++ b/doc/manual/src/release-notes/rl-1.2.md
@@ -8,9 +8,9 @@ This release has the following improvements and changes:
binary caches to see if any of them has a pre-built binary of that
path. The configuration setting `binary-caches` contains a list of
URLs of binary caches. For instance, doing
-
+
$ nix-env -i thunderbird --option binary-caches http://cache.nixos.org
-
+
will install Thunderbird and its dependencies, using the available
pre-built binaries in <http://cache.nixos.org>. The main advantage
over the old “manifest”-based method of getting pre-built binaries
@@ -19,12 +19,12 @@ This release has the following improvements and changes:
need to run `nix-pull` to update your manifest. It’s also more
scalable because you don’t need to redownload a giant manifest file
every time.
-
+
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 (<http://nixos.org/channels>) you
automatically get the cache <http://cache.nixos.org>.
-
+
Binary caches are created using `nix-push`. For details on the
operation and format of binary caches, see the `nix-push` manpage.
More details are provided in [this nix-dev
@@ -33,16 +33,16 @@ This release has the following improvements and changes:
- Multiple output support should now be usable. A derivation can
declare that it wants to produce multiple store paths by saying
something like
-
+
outputs = [ "lib" "headers" "doc" ];
-
+
This will cause Nix to pass the intended store path of each output
to the builder through the environment variables `lib`, `headers`
and `doc`. Other packages can refer to a specific output by
referring to `pkg.output`, e.g.
-
+
buildInputs = [ pkg.lib pkg.headers ];
-
+
If you install a package with multiple outputs using `nix-env`, each
output path will be symlinked into the user environment.
@@ -60,10 +60,10 @@ This release has the following improvements and changes:
Instead, the recommended way to guard the Nix store against
accidental modification on Linux is to make it a read-only bind
mount, like this:
-
+
$ mount --bind /nix/store /nix/store
$ mount -o remount,ro,bind /nix/store
-
+
Nix will automatically make `/nix/store` writable as needed (using a
private mount namespace) to allow modifications.
diff --git a/doc/manual/src/release-notes/rl-1.6.md b/doc/manual/src/release-notes/rl-1.6.md
index 9b83d9274..1d517ce1a 100644
--- a/doc/manual/src/release-notes/rl-1.6.md
+++ b/doc/manual/src/release-notes/rl-1.6.md
@@ -25,28 +25,28 @@ features:
declarative package management similar to NixOS’s
`environment.systemPackages`. For instance, if you have a
specification `my-packages.nix` like this:
-
+
with import <nixpkgs> {};
[ thunderbird
geeqie
...
]
-
+
then after any change to this file, you can run:
-
+
$ nix-env -f my-packages.nix -ir
-
+
to update your profile to match the specification.
- The ‘`with`’ 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:
-
+
let
pkgs = with pkgs; { foo = "old"; bar = foo; } // overrides;
overrides = { foo = "new"; };
in pkgs.bar
-
+
This evaluates to `"new"`, while previously it gave an “infinite
recursion” error.
diff --git a/doc/manual/src/release-notes/rl-1.7.md b/doc/manual/src/release-notes/rl-1.7.md
index fb18e797d..8c3a9f357 100644
--- a/doc/manual/src/release-notes/rl-1.7.md
+++ b/doc/manual/src/release-notes/rl-1.7.md
@@ -25,7 +25,7 @@ features:
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:
-
+
$ nix-build '<nixpkgs>' -A patchelf
$ nix-build '<nixpkgs>' -A patchelf --check
@@ -43,31 +43,31 @@ features:
'1 + 2'` will print `3`.
- `nix-shell` improvements:
-
+
- It has a new flag, `--packages` (or `-p`), that sets up a build
environment containing the specified packages from Nixpkgs. For
example, the command
-
+
$ nix-shell -p sqlite xorg.libX11 hello
-
+
will start a shell in which the given packages are present.
-
+
- It now uses `shell.nix` as the default expression, falling back
to `default.nix` if the former doesn’t exist. This makes it
convenient to have a `shell.nix` in your project to set up a
nice development environment.
-
+
- It evaluates the derivation attribute `shellHook`, if set. Since
`stdenv` does not normally execute this hook, it allows you to
do `nix-shell`-specific setup.
-
+
- It preserves the user’s timezone setting.
- In chroots, Nix now sets up a `/dev` containing only a minimal set
of devices (such as `/dev/null`). Note that it only does this if you
*don’t* have `/dev` listed in your `build-chroot-dirs` setting;
otherwise, it will bind-mount the `/dev` from outside the chroot.
-
+
Similarly, if you don’t have `/dev/pts` listed in
`build-chroot-dirs`, Nix will mount a private `devpts` filesystem on
the chroot’s `/dev/pts`.
@@ -82,7 +82,7 @@ features:
such as attribute sets.
- The `-A` flag now allows attribute names with dots in them, e.g.
-
+
$ nix-instantiate --eval '<nixos>' -A 'config.systemd.units."nscd.service".text'
- The `--max-freed` option to `nix-store --gc` now accepts a unit
@@ -106,7 +106,7 @@ features:
`unsafeGetAttrPos`, that returns the position of an attribute. This
is used by Nixpkgs to provide location information in error
messages, e.g.
-
+
$ nix-build '<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’
@@ -116,12 +116,12 @@ features:
- The binary tarball installer has been improved. You can now install
Nix by running:
-
+
$ bash <(curl -L https://nixos.org/nix/install)
- More evaluation errors include position information. For instance,
selecting a missing attribute will print something like
-
+
error: attribute `nixUnstabl' missing, at /etc/nixos/configurations/misc/eelco/mandark.nix:216:15
- The command `nix-setuid-helper` is gone.
diff --git a/doc/manual/src/release-notes/rl-1.8.md b/doc/manual/src/release-notes/rl-1.8.md
index 59af363e8..242ab380b 100644
--- a/doc/manual/src/release-notes/rl-1.8.md
+++ b/doc/manual/src/release-notes/rl-1.8.md
@@ -10,24 +10,24 @@
- `nix-env` selectors are now regular expressions. For instance, you
can do
-
+
$ nix-env -qa '.*zip.*'
-
+
to query all packages with a name containing `zip`.
- `nix-store --read-log` can now fetch remote build logs. If a build
log is not available locally, then ‘nix-store -l’ will now try to
download it from the servers listed in the ‘log-servers’ option in
nix.conf. For instance, if you have the configuration option
-
+
log-servers = http://hydra.nixos.org/log
-
+
then it will try to get logs from `http://hydra.nixos.org/log/base
name of the
store path`. This allows you to do things like:
-
+
$ nix-store -l $(which xterm)
-
+
and get a log even if `xterm` wasn't built locally.
- New builtin functions: `attrValues`, `deepSeq`, `fromJSON`,
diff --git a/doc/manual/src/release-notes/rl-1.9.md b/doc/manual/src/release-notes/rl-1.9.md
index 92c6af90b..b56e3a9fc 100644
--- a/doc/manual/src/release-notes/rl-1.9.md
+++ b/doc/manual/src/release-notes/rl-1.9.md
@@ -5,17 +5,17 @@ features:
- Signed binary cache support. You can enable signature checking by
adding the following to `nix.conf`:
-
+
signed-binary-caches = *
binary-cache-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
-
+
This will prevent Nix from downloading any binary from the cache
that is not signed by one of the keys listed in
`binary-cache-public-keys`.
-
+
Signature checking is only supported if you built Nix with the
`libsodium` package.
-
+
Note that while Nix has had experimental support for signed binary
caches since version 1.7, this release changes the signature format
in a backwards-incompatible way.
@@ -24,79 +24,79 @@ features:
you can now specify the URL of a tarball containing Nix expressions
(such as Nixpkgs), which will be downloaded and unpacked
automatically. For example:
-
+
- In `nix-env`:
-
+
$ nix-env -f https://github.com/NixOS/nixpkgs-channels/archive/nixos-14.12.tar.gz -iA firefox
-
+
This installs Firefox from the latest tested and built revision
of the NixOS 14.12 channel.
-
+
- In `nix-build` and `nix-shell`:
-
+
$ nix-build https://github.com/NixOS/nixpkgs/archive/master.tar.gz -A hello
-
+
This builds GNU Hello from the latest revision of the Nixpkgs
master branch.
-
+
- In the Nix search path (as specified via `NIX_PATH` or `-I`).
For example, to start a shell containing the Pan package from a
specific version of Nixpkgs:
-
+
$ nix-shell -p pan -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/8a3eea054838b55aca962c3fbde9c83c102b8bf2.tar.gz
-
+
- In `nixos-rebuild` (on NixOS):
-
+
$ nixos-rebuild test -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz
-
+
- In Nix expressions, via the new builtin function `fetchTarball`:
-
+
with import (fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-14.12.tar.gz) {}; …
-
+
(This is not allowed in restricted mode.)
- `nix-shell` improvements:
-
+
- `nix-shell` now has a flag `--run` to execute a command in the
`nix-shell` environment, e.g. `nix-shell --run make`. This is
like the existing `--command` flag, except that it uses a
non-interactive shell (ensuring that hitting Ctrl-C won’t drop
you into the child shell).
-
+
- `nix-shell` can now be used as a `#!`-interpreter. This allows
you to write scripts that dynamically fetch their own
dependencies. For example, here is a Haskell script that, when
invoked, first downloads GHC and the Haskell packages on which
it depends:
-
+
#! /usr/bin/env nix-shell
#! nix-shell -i runghc -p haskellPackages.ghc haskellPackages.HTTP
-
+
import Network.HTTP
-
+
main = do
resp <- Network.HTTP.simpleHTTP (getRequest "http://nixos.org/")
body <- getResponseBody resp
print (take 100 body)
-
+
Of course, the dependencies are cached in the Nix store, so the
second invocation of this script will be much faster.
- Chroot improvements:
-
+
- Chroot builds are now supported on Mac OS X (using its sandbox
mechanism).
-
+
- If chroots are enabled, they are now used for all derivations,
including fixed-output derivations (such as `fetchurl`). The
latter do have network access, but can no longer access the host
filesystem. If you need the old behaviour, you can set the
option `build-use-chroot` to `relaxed`.
-
+
- On Linux, if chroots are enabled, builds are performed in a
private PID namespace once again. (This functionality was lost
in Nix 1.8.)
-
+
- Store paths listed in `build-chroot-dirs` are now automatically
expanded to their closure. For instance, if you want
`/nix/store/…-bash/bin/sh` mounted in your chroot as `/bin/sh`,
diff --git a/doc/manual/src/release-notes/rl-2.0.md b/doc/manual/src/release-notes/rl-2.0.md
index 9f6d4aa83..aad0de211 100644
--- a/doc/manual/src/release-notes/rl-2.0.md
+++ b/doc/manual/src/release-notes/rl-2.0.md
@@ -8,13 +8,13 @@ The following incompatible changes have been made:
It has been superseded by the binary cache substituter mechanism
since several years. As a result, the following programs have been
removed:
-
+
- `nix-pull`
-
+
- `nix-generate-patches`
-
+
- `bsdiff`
-
+
- `bspatch`
- The “copy from other stores” substituter mechanism
@@ -58,26 +58,26 @@ This release has the following new features:
`nix-build`, `nix-shell -p`, `nix-env -qa`, `nix-instantiate
--eval`, `nix-push` and `nix-copy-closure`. It has the following
major features:
-
+
- Unlike the legacy commands, it has a consistent way to refer to
packages and package-like arguments (like store paths). For
example, the following commands all copy the GNU Hello package
to a remote machine:
-
+
nix copy --to ssh://machine nixpkgs.hello
-
+
nix copy --to ssh://machine /nix/store/0i2jd68mp5g6h2sa5k9c85rb80sn8hi9-hello-2.10
-
+
nix copy --to ssh://machine '(with import <nixpkgs> {}; hello)'
-
+
By contrast, `nix-copy-closure` only accepted store paths as
arguments.
-
+
- It is self-documenting: `--help` shows all available
command-line arguments. If `--help` is given after a subcommand,
it shows examples for that subcommand. `nix
--help-config` shows all configuration options.
-
+
- It is much less verbose. By default, it displays a single-line
progress indicator that shows how many packages are left to be
built or downloaded, and (if there are running builds) the most
@@ -85,7 +85,7 @@ This release has the following new features:
last few lines of builder output. The full build log can be
retrieved using `nix
log`.
-
+
- It
[provides](https://github.com/NixOS/nix/commit/b8283773bd64d7da6859ed520ee19867742a03ba)
all `nix.conf` configuration options as command line flags. For
@@ -93,122 +93,122 @@ This release has the following new features:
http-connections 100` you can write `--http-connections 100`.
Boolean options can be written as `--foo` or `--no-foo` (e.g.
`--no-auto-optimise-store`).
-
+
- Many subcommands have a `--json` flag to write results to stdout
in JSON format.
-
+
> **Warning**
- >
+ >
> Please note that the `nix` command is a work in progress and the
> interface is subject to change.
-
+
It provides the following high-level (“porcelain”) subcommands:
-
+
- `nix build` is a replacement for `nix-build`.
-
+
- `nix run` executes a command in an environment in which the
specified packages are available. It is (roughly) a replacement
for `nix-shell
-p`. Unlike that command, it does not execute the command in a
shell, and has a flag (`-c`) that specifies the unquoted command
line to be executed.
-
+
It is particularly useful in conjunction with chroot stores,
allowing Linux users who do not have permission to install Nix
in `/nix/store` to still use binary substitutes that assume
`/nix/store`. For example,
-
+
nix run --store ~/my-nix nixpkgs.hello -c hello --greeting 'Hi everybody!'
-
+
downloads (or if not substitutes are available, builds) the GNU
Hello package into `~/my-nix/nix/store`, then runs `hello` in a
mount namespace where `~/my-nix/nix/store` is mounted onto
`/nix/store`.
-
+
- `nix search` replaces `nix-env
-qa`. It searches the available packages for occurrences of a
search string in the attribute name, package name or
description. Unlike `nix-env -qa`, it has a cache to speed up
subsequent searches.
-
+
- `nix copy` copies paths between arbitrary Nix stores,
generalising `nix-copy-closure` and `nix-push`.
-
+
- `nix repl` replaces the external program `nix-repl`. It provides
an interactive environment for evaluating and building Nix
expressions. Note that it uses `linenoise-ng` instead of GNU
Readline.
-
+
- `nix upgrade-nix` upgrades Nix to the latest stable version.
This requires that Nix is installed in a profile. (Thus it won’t
work on NixOS, or if it’s installed outside of the Nix store.)
-
+
- `nix verify` checks whether store paths are unmodified and/or
“trusted” (see below). It replaces `nix-store --verify` and
`nix-store
--verify-path`.
-
+
- `nix log` shows the build log of a package or path. If the
build log is not available locally, it will try to obtain it
from the configured substituters (such as
[cache.nixos.org](https://cache.nixos.org/), which now
provides build logs).
-
+
- `nix edit` opens the source code of a package in your editor.
-
+
- `nix eval` replaces `nix-instantiate --eval`.
-
+
- `nix
why-depends` shows why one store path has another in its
closure. This is primarily useful to finding the causes of
closure bloat. For example,
-
+
nix why-depends nixpkgs.vlc nixpkgs.libdrm.dev
-
+
shows a chain of files and fragments of file contents that cause
the VLC package to have the “dev” output of `libdrm` in its
closure — an undesirable situation.
-
+
- `nix path-info` shows information about store paths, replacing
`nix-store -q`. A useful feature is the option `--closure-size`
(`-S`). For example, the following command show the closure
sizes of every path in the current NixOS system closure, sorted
by size:
-
+
nix path-info -rS /run/current-system | sort -nk2
-
+
- `nix optimise-store` replaces `nix-store --optimise`. The main
difference is that it has a progress indicator.
-
+
A number of low-level (“plumbing”) commands are also available:
-
+
- `nix ls-store` and `nix
ls-nar` list the contents of a store path or NAR file. The
former is primarily useful in conjunction with remote stores,
e.g.
-
+
nix ls-store --store https://cache.nixos.org/ -lR /nix/store/0i2jd68mp5g6h2sa5k9c85rb80sn8hi9-hello-2.10
-
+
lists the contents of path in a binary cache.
-
+
- `nix cat-store` and `nix
cat-nar` allow extracting a file from a store path or NAR file.
-
+
- `nix dump-path` writes the contents of a store path to stdout in
NAR format. This replaces `nix-store --dump`.
-
+
- `nix
show-derivation` displays a store derivation in JSON format.
This is an alternative to `pp-aterm`.
-
+
- `nix
add-to-store` replaces `nix-store
--add`.
-
+
- `nix sign-paths` signs store paths.
-
+
- `nix copy-sigs` copies signatures from one store to another.
-
+
- `nix show-config` shows all configuration options and their
current values.
@@ -224,11 +224,11 @@ This release has the following new features:
`nix-copy-closure`, `nix-push` and substitution are all instances
of the general notion of copying paths between different kinds of
Nix stores.
-
+
Stores are specified using an URI-like syntax, e.g.
<https://cache.nixos.org/> or <ssh://machine>. The following store
types are supported:
-
+
- `LocalStore` (stori URI `local` or an absolute path) and the
misnamed `RemoteStore` (`daemon`) provide access to a local Nix
store, the latter via the Nix daemon. You can use `auto` or the
@@ -236,63 +236,63 @@ This release has the following new features:
whether you have write permission to the Nix store. It is no
longer necessary to set the `NIX_REMOTE` environment variable to
use the Nix daemon.
-
+
As noted above, `LocalStore` now supports chroot builds,
allowing the “physical” location of the Nix store (e.g.
`/home/alice/nix/store`) to differ from its “logical” location
(typically `/nix/store`). This allows non-root users to use Nix
while still getting the benefits from prebuilt binaries from
[cache.nixos.org](https://cache.nixos.org/).
-
+
- `BinaryCacheStore` is the abstract superclass of all binary
cache stores. It supports writing build logs and NAR content
listings in JSON format.
-
+
- `HttpBinaryCacheStore` (`http://`, `https://`) supports binary
caches via HTTP or HTTPS. If the server supports `PUT` requests,
it supports uploading store paths via commands such as `nix
copy`.
-
+
- `LocalBinaryCacheStore` (`file://`) supports binary caches in
the local filesystem.
-
+
- `S3BinaryCacheStore` (`s3://`) supports binary caches stored in
Amazon S3, if enabled at compile time.
-
+
- `LegacySSHStore` (`ssh://`) is used to implement remote builds
and `nix-copy-closure`.
-
+
- `SSHStore` (`ssh-ng://`) supports arbitrary Nix operations on a
remote machine via the same protocol used by `nix-daemon`.
- Security has been improved in various ways:
-
+
- Nix now stores signatures for local store paths. When paths are
copied between stores (e.g., copied from a binary cache to a
local store), signatures are propagated.
-
+
Locally-built paths are signed automatically using the secret
keys specified by the `secret-key-files` store option.
Secret/public key pairs can be generated using `nix-store
--generate-binary-cache-key`.
-
+
In addition, locally-built store paths are marked as “ultimately
trusted”, but this bit is not propagated when paths are copied
between stores.
-
+
- Content-addressable store paths no longer require signatures —
they can be imported into a store by unprivileged users even if
they lack signatures.
-
+
- The command `nix verify` checks whether the specified paths are
trusted, i.e., have a certain number of trusted signatures, are
ultimately trusted, or are content-addressed.
-
+
- Substitutions from binary caches
[now](https://github.com/NixOS/nix/commit/ecbc3fedd3d5bdc5a0e1a0a51b29062f2874ac8b)
require signatures by default. This was already the case on
NixOS.
-
+
- In Linux sandbox builds, we
[now](https://github.com/NixOS/nix/commit/eba840c8a13b465ace90172ff76a0db2899ab11b)
use `/build` instead of `/tmp` as the temporary build directory.
@@ -309,7 +309,7 @@ This release has the following new features:
hash or commit hash is specified. For example, calls to
`builtins.fetchGit` are only allowed if a `rev` attribute is
specified.
-
+
The goal of this feature is to enable true reproducibility and
traceability of builds (including NixOS system configurations) at
the evaluation level. For example, in the future, `nixos-rebuild`
@@ -367,21 +367,21 @@ This release has the following new features:
log will be shown if a build fails.
- Networking has been improved:
-
+
- HTTP/2 is now supported. This makes binary cache lookups [much
more
efficient](https://github.com/NixOS/nix/commit/90ad02bf626b885a5dd8967894e2eafc953bdf92).
-
+
- We now retry downloads on many HTTP errors, making binary caches
substituters more resilient to temporary failures.
-
+
- HTTP credentials can now be configured via the standard `netrc`
mechanism.
-
+
- If S3 support is enabled at compile time, <s3://> URIs are
[supported](https://github.com/NixOS/nix/commit/9ff9c3f2f80ba4108e9c945bbfda2c64735f987b)
in all places where Nix allows URIs.
-
+
- Brotli compression is now supported. In particular,
[cache.nixos.org](https://cache.nixos.org/) build logs are now compressed
using Brotli.
@@ -431,9 +431,9 @@ The Nix language has the following new features:
- Derivation attributes can now reference the outputs of the
derivation using the `placeholder` builtin function. For example,
the attribute
-
+
configureFlags = "--prefix=${placeholder "out"} --includedir=${placeholder "dev"}";
-
+
will cause the `configureFlags` environment variable to contain the
actual store paths corresponding to the `out` and `dev` outputs.
@@ -444,7 +444,7 @@ The following builtin functions are new or extended:
Nixpkgs, which fetches at build time and cannot be used to fetch Nix
expressions during evaluation. A typical use case is to import
external NixOS modules from your configuration, e.g.
-
+
imports = [ (builtins.fetchGit https://github.com/edolstra/dwarffs + "/module.nix") ];
- Similarly, `builtins.fetchMercurial` allows you to fetch Mercurial
@@ -485,7 +485,7 @@ The Nix build environment has the following changes:
builder via the file `.attrs.json` in the builder’s temporary
directory. This obviates the need for `passAsFile` since JSON files
have no size restrictions, unlike process environments.
-
+
[As a convenience to Bash
builders](https://github.com/NixOS/nix/commit/2d5b1b24bf70a498e4c0b378704cfdb6471cc699),
Nix writes a script named `.attrs.sh` to the builder’s directory
diff --git a/doc/manual/src/release-notes/rl-2.2.md b/doc/manual/src/release-notes/rl-2.2.md
index b67d65db7..fa9af920d 100644
--- a/doc/manual/src/release-notes/rl-2.2.md
+++ b/doc/manual/src/release-notes/rl-2.2.md
@@ -6,15 +6,15 @@ This is primarily a bug fix release. It also has the following changes:
the `__structuredAttrs` attribute to `true` to cause all attributes
to be passed to the builder in JSON format), you can now specify
closure checks per output, e.g.:
-
+
outputChecks."out" = {
# The closure of 'out' must not be larger than 256 MiB.
maxClosureSize = 256 * 1024 * 1024;
-
+
# It must not refer to C compiler or to the 'dev' output.
disallowedRequisites = [ stdenv.cc "dev" ];
};
-
+
outputChecks."dev" = {
# The 'dev' output must not be larger than 128 KiB.
maxSize = 128 * 1024;
@@ -24,7 +24,7 @@ This is primarily a bug fix release. It also has the following changes:
for local builds, and not just to route builds to remote builders.
The supported features of a machine can be specified through the
configuration setting `system-features`.
-
+
By default, `system-features` includes `kvm` if `/dev/kvm` exists.
For compatibility, it also includes the pseudo-features
`nixos-test`, `benchmark` and `big-parallel` which are used by
@@ -45,22 +45,22 @@ This is primarily a bug fix release. It also has the following changes:
- Nix now supports [SRI hashes](https://www.w3.org/TR/SRI/), allowing
the hash algorithm and hash to be specified in a single string. For
example, you can write:
-
+
import <nix/fetchurl.nix> {
url = https://nixos.org/releases/nix/nix-2.1.3/nix-2.1.3.tar.xz;
hash = "sha256-XSLa0FjVyADWWhFfkZ2iKTjFDda6mMXjoYMXLRSYQKQ=";
};
-
+
instead of
-
+
import <nix/fetchurl.nix> {
url = https://nixos.org/releases/nix/nix-2.1.3/nix-2.1.3.tar.xz;
sha256 = "5d22dad058d5c800d65a115f919da22938c50dd6ba98c5e3a183172d149840a4";
};
-
+
In fixed-output derivations, the `outputHashAlgo` attribute is no
longer mandatory if `outputHash` specifies the hash.
-
+
`nix hash-file` and `nix
hash-path` now print hashes in SRI format by default. They also use
SHA-256 by default instead of SHA-512 because that's what we use