Update release notes
Use a shorter Nixpkgs channel URL
Remove unnecessary call to closeMostFDs()

We have close-on-exec on all FDs now, and there is no security risk in
passing open FDs to substituters anyway.
Don't start copy-from-other-stores if $NIX_OTHER_STORES is unset

Slight optimisation.
Fix a segfault when auto-calling a "a@{...}" function

Since the called function can return its argument attribute set
(e.g. "a"), the latter should not be allocated on the stack.

Reported by Shea.
Manual: Don't use a store path in our closure

http://hydra.nixos.org/build/3313227
Remove a Darwin hack that should no longer be needed
Remove the quickExit function
Remove some redundant close() calls

They are unnecessary because we set the close-on-exec flag.
Remove definition of non-existant function
Use vfork() instead of fork() if available

Hopefully this reduces the chance of hitting ‘unable to fork: Cannot
allocate memory’ errors.  vfork() is used for everything except
starting builders.
Add some debug code
Don't use std::cerr in a few places

Slightly scared of using std::cerr in a vforked process...
Disable use of vfork()

vfork() is just too weird.  For instance, in this build:

  http://hydra.nixos.org/build/3330487

the value fromHook.writeSide becomes corrupted in the parent, even
though the child only reads from it.  At -O0 the problem goes away.
Probably the child is overriding some spilled temporary variable.

If I get bored I may implement using posix_spawn() instead.
Revert "prim_toPath: Actually make the string a path"

This reverts commit 2980d1fba97069805c3649c5d99d0356bce6c303.  It
causes a regression in NixOS evaluation:

string `/nix/store/ya3s5gmj3b28170fpbjhgsk8wzymkpa1-pommed-1.39/etc/pommed.conf' cannot refer to other paths
nix-store -r: Don't quietly ignore missing paths
nix-store -r: Add ‘--ignore-unknown’ flag

This flag causes paths that do not have a known substitute to be
quietly ignored.  This is mostly useful for Charon, allowing it to
speed up deployment by letting a machine use substitutes for all
substitutable paths, instead of uploading them.  The latter is
frequently faster, e.g. if the target machine has a fast Internet
connection while the source machine is on a slow ADSL line.
nix-copy-closure: Add flag ‘--use-substitutes’
Make "nix-build -A <derivation>.<output>" do the right thing

For example, given a derivation with outputs "out", "man" and "bin":

  $ nix-build -A pkg

produces ./result pointing to the "out" output;

  $ nix-build -A pkg.man

produces ./result-man pointing to the "man" output;

  $ nix-build -A pkg.all

produces ./result, ./result-man and ./result-bin;

  $ nix-build -A pkg.all -A pkg2

produces ./result, ./result-man, ./result-bin and ./result-2.
Only substitute wanted outputs of a derivation

If a derivation has multiple outputs, then we only want to download
those outputs that are actuallty needed.  So if we do "nix-build -A
openssl.man", then only the "man" output should be downloaded.
Likewise if another package depends on ${openssl.man}.

The tricky part is that different derivations can depend on different
outputs of a given derivation, so we may need to restart the
corresponding derivation goal if that happens.