GNU Make 3.81 compatibility

3.81 doesn't understand the ‘define foo =’ syntax, which was added in
3.82.  So use ‘define foo’ instead.
Create the target directory of libraries and programs
Remove dead code
Support DESTDIR
Merge commit 'a210c995cdd9279ed4137ec5d2e4cc928cb36097'
Install header files
Fix the RPM build
nix-instantiate: Add a --no-readonly-mode flag

This allows running nix-instantiate --eval-only without performing the
evaluation in readonly mode, letting features like import from
derivation and automatic substitution of builtins.storePath paths work.

Signed-off-by: Shea Levy <shea@shealevy.com>
Rename --no-readonly-mode --read-write-mode

Signed-off-by: Shea Levy <shea@shealevy.com>
nix-instantiate --eval-only --read-write-mode: Don't depend on ordering

Signed-off-by: Shea Levy <shea@shealevy.com>
Add the nix-store --serve command

This is essentially the substituter API operating on the local store,
which will be used by the ssh substituter. It runs in a loop rather than
just taking one command so that in the future nix will be able to keep
one connection open for multiple instances of the substituter.

Signed-off-by: Shea Levy <shea@shealevy.com>
nix-store --serve: Don't loop forever

nix-store --export takes a tmproot, which can only release by exiting.
Substituters don't currently work in a way that could take advantage of
the looping, anyway.

Signed-off-by: Shea Levy <shea@shealevy.com>
nix-store --serve: Don't fail if asked for info about non-valid path

Signed-off-by: Shea Levy <shea@shealevy.com>
nix-store --serve: Use dump instead of export

Also remove signing support

Signed-off-by: Shea Levy <shea@shealevy.com>
nix-store --serve: Flush out after every loop

Signed-off-by: Shea Levy <shea@shealevy.com>
Add download-via-ssh substituter

This substituter connects to a remote host, runs nix-store --serve
there, and then forwards substituter commands on to the remote host and
sends their results to the calling program. The ssh-substituter-hosts
option can be specified as a list of hosts to try.

This is an initial implementation and, while it works, it has some
limitations:

* Only the first host is used
* There is no caching of query results (all queries are sent to the
  remote machine)
* There is no informative output (such as progress bars)
* Some failure modes may cause unhelpful error messages
* There is no concept of trusted-ssh-substituter-hosts

Signed-off-by: Shea Levy <shea@shealevy.com>
nix-shell: Use shell.nix as the default expression if it exists
Binary tarball: Automatically fetch the Nixpkgs channel
Clarify comment

Signed-off-by: Shea Levy <shea@shealevy.com>
Pass in params by const ref

Signed-off-by: Shea Levy <shea@shealevy.com>