* 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-download.in (http-fetch, ftp-fetch): Remove.
(fetch-and-store): Replace `uri' parameter with `name', for the output
file name. Redirect the output of `fetch' to the error port.
(guix-download): Call `url-fetch' for all URI schemes except `file'.
Handle PATH equal to #f.
* guix/download.scm: Export `%mirrors'.
* tests/guix-download.sh: Change erroneous URL, because URLs at
example.com are all valid redirections.
* 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.