Don't use -warning=no-timestamp unless we have GNU tar

http://hydra.nixos.org/build/2998485
Include config.h before any other header

"config.h" must be included first, because otherwise the compiler
might not see the right value of _FILE_OFFSET_BITS.  We've had this
before; see 705868a8a96a10f70e629433cfffc2d5cd2703eb.  In this case,
GCC would compute a different address for ‘settings.useSubstitutes’ in
misc.cc because of the off_t in ‘settings’.

Reverts 3854fc9b42d16b810f62b64194b699033b03aaf1.

http://hydra.nixos.org/build/3016700
Support building a derivation if some outputs are already valid

This handles the chroot and build hook cases, which are easy.
Supporting the non-chroot-build case will require more work (hash
rewriting!).

Issue #21.
Remove debug line
Support building a derivation if some outputs are already valid (non-chroot case)

This uses scary hash rewriting.

Fixes #21.
Fix "non-zero padding" error

Probably it's not a good idea to pass a temporary object to
StringSource.
Test hash rewriting
Don't put results symlinks in the tests directory
Compatibility fix for WWW::Curl < 4.14

Older versions of WWW::Curl don't support scalar references for
CURLOPT_WRITEDATA directly.

http://hydra.nixos.org/build/3017188
Fix test failure on Darwin

Apparently our DBD::SQLite links against /usr/lib/libsqlite3.dylib,
which is an old version that doesn't respect foreign key constraints.
So manifests/cache.sqlite doesn't get updated properly when a manifest
disappears.  We should fix our DBD::SQLite, but in the meantime this
will fix the test.

http://hydra.nixos.org/build/3017959
Build hook: Pass the timeout to the remote builder

Note that this will only work if the client has a very recent Nix
version (post 15e1b2c223494ecb5efefc3ea0e3b926a6b1d7dc), otherwise the
--option flag will just be ignored.

Fixes #50.
Handle gc-keep-outputs and gc-keep-derivations both enabled

If the options gc-keep-outputs and gc-keep-derivations are both
enabled, you can get a cycle in the liveness graph.  There was a hack
to handle this, but it didn't work with multiple-output derivations,
causing the garbage collector to fail with errors like ‘error: cannot
delete path `...' because it is in use by `...'’.  The garbage
collector now handles strongly connected components in the liveness
graph as a unit and decides whether to delete all or none of the paths
in an SCC.
In startBuilder(), only print the new paths we're building
Disable auto store optimisation for now

I've seen operations like "nix-store --import" take much longer on one
system.  So default to off until I've investigated this a bit further.
Delete manifests in "nix-channel --remove" or when a binary cache is available
nix-channel: Add option to force fetching of manifests
Fix the store optimisation test

http://hydra.nixos.org/build/3026118
Delete paths in a component in topologically sorted order

The outputs of a derivation can refer to each other (even though they
cannot have cycles), so they have to be deleted in the right order.

http://hydra.nixos.org/build/3026118
Vacuum the SQLite DB after running the garbage collector
RemoteStore::connectToDaemon(): Set close-on-exec flag

This ensures that "nix-build --run-env" doesn't keep a connection to
the worker open, preventing it from exiting.