* guix/build/download.scm: Autoload (gnutls).
(tls-wrap): New procedure.
(open-connection-for-uri): Add support for `https'. Wrap the socket
with `tls-wrap' in that case.
(url-fetch): Add `https'.
* guix/download.scm (gnutls-derivation): New procedure.
(url-fetch)[need-gnutls?]: New variable.
Call `gnutls-derivation' when NEED-GNUTLS? is true, and add its output
to the `GUILE_LOAD_PATH' env. var. in that case.
* guix/build/download.scm (uri-abbreviation): New procedure.
(ftp-fetch, http-fetch): Use it instead of `uri->string' when calling
`progress-proc'. Reported by Andreas Enge.
* guix/build/gnu-build-system.scm (configure)[package-name]: New
procedure.
When LIBDIR is true and INCLUDEDIR is false, add
--includedir=LIBDIR/include.
Add support for --docdir when a "doc" output exists.
* guix/build/union.scm (delete-duplicate-leaves): New procedure.
(union-build)[leaf=?, resolve-collision]: New procedures.
Use `delete-duplicate-leaves' on the result of `tree-union'.
* tests/union.scm ("delete-duplicate-leaves, default",
"delete-duplicate-leaves, file names"): New tests.
* guix/build/download.scm (http-fetch): Rename `bv' to `bv-or-port'.
Use `http-get*' followed by `dump-port' when the former is available,
and pass a progress procedure to `dump-port'.
* guix/build/download.scm (progress-proc): New procedure.
(ftp-fetch): Call `ftp-size' on URI. Use `progress-proc', and pass
the result to `dump-port', along with #:buffer-size.
* 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'.
* guix/build/download.scm (open-connection-for-uri): Delete addrinfos
with the same address. Always open SOCK_STREAM/IPPROTO_IP sockets.
Fix the error handler's condition to determine what to do.
Reported by Nikita Karetnikov <nikita.karetnikov@gmail.com> at
<http://lists.gnu.org/archive/html/bug-guix/2012-12/msg00150.html>.
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.
* guix/build/gnu-build-system.scm (set-paths, build, check, install):
New procedures.
(unpack): Make `source' a keyword arg; add `#:allow-other-keys'.
(configure): Likewise.
(%standard-phases): New variable.
(gnu-build): Make `source', `outputs', and `inputs' keyword arguments;
add `phases' keyword argument; #:allow-other-keys; add rest arguments
`args'. Invoke each of PHASES in order within `every'.
* guix/gnu-build-system.scm (gnu-build): Add `make-flags' and `phases'
keyword arguments. Update builder's `gnu-build' call to match the new
convention.
* guix/derivations.scm (build-expression->derivation): Add all of INPUTS
as inputs to the final derivation.
* guix/build/gnu-build-system.scm, guix/build/utils.scm,
guix/gnu-build-system.scm: New files.
* tests/builders.scm ("gnu-build"): New test.
* guix/derivations.scm (imported-modules): New procedure.
(build-expression->derivation): New keyword argument `modules'.
Use `imported-modules' when MODULES is non-empty, and pass it with
`-L' to GUILE.
* guix/build/http.scm, guix/http.scm, tests/builders.scm: New files.