download: Make (guix base16) a soft dependency.

Fixes <https://bugs.gnu.org/33542>.
Reported by Mark H Weaver <mhw@netris.org>.

* guix/download.scm (%content-addressed-mirrors): Autoload (guix base16).
This commit is contained in:
Ludovic Courtès 2018-11-28 22:17:39 +01:00
parent 7565d40e1e
commit a52ae1b662
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -373,7 +373,13 @@ (define %content-addressed-mirrors
;; procedure that takes a file name, an algorithm (symbol) and a hash
;; (bytevector), and returns a URL or #f.
'(begin
(use-modules (guix base32) (guix base16))
(use-modules (guix base32))
;; XXX: (guix base16) appeared in March 2017 (and thus 0.13.0) so old
;; installations of the daemon might lack it. Thus, load it lazily to
;; avoid gratuitous errors. See <https://bugs.gnu.org/33542>.
(module-autoload! (current-module)
'(guix base16) '(bytevector->base16-string))
(list (lambda (file algo hash)
;; Files served by 'guix publish' are accessible under a single