* guix/ui.scm (install-locale): New procedure.
* guix-build.in, guix-download.in, guix-gc.in, guix-import.in,
guix-package.in: Use it instead of (setlocale LC_ALL "").
* guix-build.in (guix-build)[find-package]: New procedure.
Use it instead of using `find-packages-by-name' directly.
Suggested by Andreas Enge <andreas@enge.fr>.
* tests/guix-build.sh: Add tests.
* doc/guix.texi (Invoking guix-build): Add `coreutils-8.20' as an
example. Fix guile-1.8 example.
* guix-build.in (guix-build)[register-root]: Change first argument to
`paths', which should be a list of store paths. Update caller to call
`derivation-path->output-paths' on DRV. When `derivations-only?',
also register root for .drv files.
* 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'.