* guix/build/gnu-build-system.scm (patch-source-shebangs): Add a newline
after the "SHELL =" line in po/Makefile.in.in.
(%standard-phases): Move `patch-source-shebangs' after `patch'.
This allows many packages to build in a chroot that lacks /bin and
thus /bin/sh.
* guix/build/gnu-build-system.scm (patch-source-shebangs): New
procedure.
(%standard-phases): Add it.
* guix/build/utils.scm (executable-file?): New procedure.
* distro/packages/perl.scm (perl): Don't use /bin/sh to run `Configure'.
* guix/build/gnu-build-system.scm (configure): Add `inputs' keyword
parameter. Take Bash from there, falling back to /bin/sh. Set
`CONFIG_SHELL' and `SHELL' to that Bash. Run "bash ./configure"
instead of just "./configure".
* distro/packages/bootstrap.scm (%bootstrap-inputs): Add "bash".
* distro/packages/base.scm (gcc-boot0-wrapped): Use "bash" from
%BOOT1-INPUTS instead of /bin/sh.
* guix/download.scm (%mirrors): New variable. Mirror lists taken from
Nixpkgs.
(url-fetch): New `mirrors' keyword parameter.
[builder]: Pass it.
* guix/build/download.scm (url-fetch): New `mirrors' keyword parameter.
[maybe-expand-mirrors]: New procedure.
[uri]: Use it.
* guix/build/utils.scm (substitute*): Remove special syntax for
list-of-files; instead, check whether FILE is `list?' at run time.
* distro/packages/base.scm (gcc-4.7, %binutils-static): Adjust
accordingly.
* guix/build/http.scm (open-connection-for-uri): New procedure.
(http-fetch): Use it. Pass the result as a #:port argument to
`http-get'.
Add hack to modify the `set-port-encoding!' binding in (web response).
* guix/ftp-client.scm (ftp-open): Add optional `port' parameter,
defaulting to 21. When calling `getaddrinfo', convert PORT to a
string and pass AI_NUMERICSERV when PORT is a number.
* 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/utils.scm (substitute): Do not pass the OUT to PROC; use
`list-matches' instead of `regexp-exec' and pass a list of matches to
PROC. Expect PROC to return a string, and output that. Fold over
RX+PROC in order. Use `(read-line p 'concat)' to include the trailing
delimiter in LINE.
(substitute*): Produce code to iterate over the matches, and return a
string, which includes anything from the original line that's in
between matches.
* distro/base.scm (gcc-4.7, glibc): Adjust accordingly: remove use
of (ice-9 regex) and `regexp-substitute/global'; return a string.
* guix/build/gnu-build-system.scm (set-paths): Add new `path-exclusions'
parameter; honor it.
* guix/build-system/gnu.scm (gnu-build): New `path-exclusions' keyword
parameter; pass it to BUILDER.
* distro/base.scm (gcc-4.7): Exclude "libc" from $LIBRARY_PATH.
* guix/build/gnu-build-system.scm (strip): New procedure.
(%standard-phases): Add it.
* guix/build-system/gnu.scm (gnu-build): New `strip-binaries?',
`strip-flags', and `strip-directories' keyword parameters. Pass them
to BUILDER.
* guix/build/utils.scm (patch-shebang): Add an optional `path'
parameter. Change SHEBANG-RX to match the whole interpreter file
name. Don't patch when BIN and CMD are the same. Add docstring.
* guix/build/gnu-build-system.scm (patch-shebangs): New procedure.
(%standard-phases): Add it.
* guix/build-system/gnu.scm (gnu-build): New `patch-shebangs?' keyword
parameter. Pass it to the builder's `gnu-build'.
* guix/build/utils.scm (substitute): Change to accept a `pattern+procs'
parameter. Iterate over it.
(substitute*): Adjust accordingly.
* distro/base.scm (guile-1.8): Adjust accordingly.
* guix/build/utils.scm (let-matches, substitute*): New macros.
* distro/base.scm (guile-1.8): Use `substitute*' instead of
`substitute'. Remove the #:modules argument.
* guix/build/gnu-build-system.scm (set-paths): Dump the value of
environment variables in the `environment-variables' files, similar to
what Nixpkgs does.
* guix/build/gnu-build-system.scm (patch): New procedure.
(%standard-phases): Add `patch'.
* guix/build-system/gnu.scm (gnu-build): Add `patches' and `patch-flags'
parameters. Pass them on.