* guix/scripts/pack.scm (self-contained-tarball): Add #:target.
(docker-image): Add #:target.
[build]: Pass it to 'build-docker-image'.
(%options, show-help): Add '--target'.
(guix-pack): Pass TARGET to 'profile-derivation' and to 'build-image'.
* guix/docker.scm (build-docker-image): Add #:system parameter and honor it.
* doc/guix.texi (Invoking guix pack): Document '--target'.
(Additional Build Options): Refer to the Autoconf manual instead of the
obsolete 'configure.info' for cross-compilation.
* guix/scripts/pack.scm (<compressor>)[package]: Remove.
[command]: Document as being a gexp with an absolute file name.
(%compressors): Adjust accordingly.
(self-contained-tarball): Simplify PATH expression. Move 'string-join'
for the compressor command on the build side.
(docker-image): Simplify PATH expression.
* tests/pack.scm (%gzip-compressor): Adjust accordingly.
* guix/scripts/pack.scm (self-contained-tarball): Add #:tar option.
[build](tar-supports-sort?): New variable. Use it.
* tests/pack.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
* guix/scripts/pack.scm (<compressor>)[tar-option]: Remove.
[command]: New field.
(%compressors): Provide complete commands. Use '-9' or equivalent for
each compressor; use '-n' for gzip.
(self-contained-tarball)[build]: Adjust accordingly.
* guix/scripts/pack.scm (self-contained-tarball): Add #:localstatedir?
parameter and honor it.
(%options, show-help): Add '--localstatedir'.
(guix-pack): Honor it.
* gnu/build/install.scm (populate-single-profile-directory): Add
#:register? parameter and honor it.
* doc/guix.texi (Binary Installation): Use '--localstatedir' in
example.
(Invoking guix pack): Document it.