We were already relying on the new version in `set-build-options', so
this patch fixes that.
* guix/store.scm (%protocol-version): Increase.
(open-connection)[reserve-space?]: New argument. Pass it to the
server when it's recent enough.
* guix/store.scm (valid-path?): New procedure.
* tests/builders.scm ("http-fetch", "gnu-build"): Use it.
* tests/derivations.scm ("add-to-store, flat", "add-to-store,
recursive", "derivation with no inputs", "build derivation with 1
source", "build derivation with coreutils",
"build-expression->derivation with expression returning #f"):
Likewise.
* guix/store.scm (set-build-options)[build-cores, use-substitutes?]: New
keyword parameters.
[send]: Change to expect a type, and use `write-arg'.
Send settings for BUILD-CORES and USE-SUBSTITUTES? when the server
supports it.
* guix/store.scm (current-build-output-port): New variable.
(process-stderr): Add docstring. Always return #f, except upon
%STDERR-LAST. Upon %STDERR-NEXT, write to
`current-build-output-port', not `current-error-port'.
(set-build-options): Loop until `process-stderr' returns true.
(define-operation): Likewise.
(build-derivations): Update docstring to mention that it's
synchronous.
* guix/store.scm (%store-prefix): New parameter.
(store-path?, derivation-path?): New procedures.
* guix/derivations.scm (write-derivation): Pass SOURCES through
`object->string'.
(compressed-hash, store-path, output-path, derivation): New
procedures.
* tests/derivations.scm (%store): New global variable.
("derivation with no inputs"): New test.
* guix/store.scm (&nix-error, &nix-protocol-error): New SRFI-35
condition types.
(process-stderr): Raise an error condition upon protocol errors
instead of returning to the caller. This allows the connection to be
reused for further interactions.