* guix-build.in (%store): Turn into a SRFI-39 parameter. Update users.
(guix-build): Set %STORE and call `open-connection' only after
`parse-options' has been called.
* guix-build.in (derivations-from-package-expressions): Leave with an
error message when SOURCE? is #t and P has no source.
* tests/guix-build.sh: Add test.
* guix/ui.scm: New file.
* Makefile.am (MODULES): Add it.
* po/POTFILES.in: Add it.
* guix-build.in: Use it.
(_, N_, leave): Remove.
(guix-build): Use `with-error-handling' instead of the `guard' form.
* guix-download.in: Use it.
(_, N_, leave): Remove.
* guix/store.scm (add-indirect-root): New operation.
* guix-build.in (show-help): Document `--root'.
(%options): Add `--root'.
(guix-build)[register-root]: New procedure. Call it when `--root' is
passed.
* guix-build.in (derivations-from-package-expressions): New `system'
parameter. Pass it to `package-derivation'.
(%default-options): Add `system' pair.
(show-help): Describe `--system'.
(%options): Add it.
(guix-build): Check the `system' pair in OPTS; pass it to
`derivations-from-package-expressions' and `package-derivation'.
* guix/build/gnu-build-system.scm (%parallel-job-count): New variable.
(build, check): Use it instead of $NIX_BUILD_CORES.
* guix-build.in (guix-build): Default to 0 for the #:build-cores option.
* guix-build.in (leave): New macro, formerly in `guix-build'.
(show-help): Document `--cores'.
(%options): Add `--cores'.
(guix-build): Remove `leave' macro from here. Pass the `cores' option
value to `set-build-options'.