download: Add berlin.guixsd.org as a content-addressed mirror.
* guix/download.scm (%content-addressed-mirrors)[guix-publish]: New procedure. Use it for "mirror.hydra.gnu.org" and add "berlin.guixsd.org" too.
This commit is contained in:
parent
a52ae1b662
commit
13bcc6b45f
|
@ -375,18 +375,22 @@
|
||||||
'(begin
|
'(begin
|
||||||
(use-modules (guix base32))
|
(use-modules (guix base32))
|
||||||
|
|
||||||
|
(define (guix-publish host)
|
||||||
|
(lambda (file algo hash)
|
||||||
|
;; Files served by 'guix publish' are accessible under a single
|
||||||
|
;; hash algorithm.
|
||||||
|
(string-append "https://" host "/file/"
|
||||||
|
file "/" (symbol->string algo) "/"
|
||||||
|
(bytevector->nix-base32-string hash))))
|
||||||
|
|
||||||
;; XXX: (guix base16) appeared in March 2017 (and thus 0.13.0) so old
|
;; 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
|
;; installations of the daemon might lack it. Thus, load it lazily to
|
||||||
;; avoid gratuitous errors. See <https://bugs.gnu.org/33542>.
|
;; avoid gratuitous errors. See <https://bugs.gnu.org/33542>.
|
||||||
(module-autoload! (current-module)
|
(module-autoload! (current-module)
|
||||||
'(guix base16) '(bytevector->base16-string))
|
'(guix base16) '(bytevector->base16-string))
|
||||||
|
|
||||||
(list (lambda (file algo hash)
|
(list (guix-publish "mirror.hydra.gnu.org")
|
||||||
;; Files served by 'guix publish' are accessible under a single
|
(guix-publish "berlin.guixsd.org")
|
||||||
;; hash algorithm.
|
|
||||||
(string-append "https://mirror.hydra.gnu.org/file/"
|
|
||||||
file "/" (symbol->string algo) "/"
|
|
||||||
(bytevector->nix-base32-string hash)))
|
|
||||||
(lambda (file algo hash)
|
(lambda (file algo hash)
|
||||||
;; 'tarballs.nixos.org' supports several algorithms.
|
;; 'tarballs.nixos.org' supports several algorithms.
|
||||||
(string-append "https://tarballs.nixos.org/"
|
(string-append "https://tarballs.nixos.org/"
|
||||||
|
|
Loading…
Reference in New Issue