summaryrefslogtreecommitdiff
path: root/guix/build/download.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2021-09-17 01:25:52 +0200
committerMarius Bakke <marius@gnu.org>2021-09-17 01:25:52 +0200
commit5c3cb22c9b2810669999e044b2de5e9331011a83 (patch)
tree3276e19cc1a0af3cece6ce4f2bfa930901888bb4 /guix/build/download.scm
parentc896287ce5eff968a0b323f3a069653a64b96b4c (diff)
parent2a054d29dcfd4b68ed3914886b637f93ac7a0a72 (diff)
downloadguix-patches-5c3cb22c9b2810669999e044b2de5e9331011a83.tar
guix-patches-5c3cb22c9b2810669999e044b2de5e9331011a83.tar.gz
Merge branch 'master' into core-updates-frozen
Conflicts: gnu/packages/bioinformatics.scm gnu/packages/chez.scm gnu/packages/docbook.scm gnu/packages/ebook.scm gnu/packages/gnome.scm gnu/packages/linux.scm gnu/packages/networking.scm gnu/packages/python-web.scm gnu/packages/python-xyz.scm gnu/packages/tex.scm gnu/packages/version-control.scm gnu/packages/xml.scm guix/build-system/dune.scm guix/build-system/go.scm guix/build-system/linux-module.scm guix/packages.scm
Diffstat (limited to 'guix/build/download.scm')
-rw-r--r--guix/build/download.scm23
1 files changed, 14 insertions, 9 deletions
diff --git a/guix/build/download.scm b/guix/build/download.scm
index 54627eefa2..c8ddadfdd4 100644
--- a/guix/build/download.scm
+++ b/guix/build/download.scm
@@ -747,15 +747,20 @@ otherwise simply ignore them."
content-addressed-mirrors))
(define disarchive-uris
- (append-map (match-lambda
- ((? string? mirror)
- (map (match-lambda
- ((hash-algo . hash)
- (string->uri
- (string-append mirror
- (symbol->string hash-algo) "/"
- (bytevector->base16-string hash)))))
- hashes)))
+ (append-map (lambda (mirror)
+ (let ((make-url (match mirror
+ ((? string?)
+ (lambda (hash-algo hash)
+ (string-append
+ mirror
+ (symbol->string hash-algo) "/"
+ (bytevector->base16-string hash))))
+ ((? procedure?)
+ mirror))))
+ (map (match-lambda
+ ((hash-algo . hash)
+ (string->uri (make-url hash-algo hash))))
+ hashes)))
disarchive-mirrors))
;; Make this unbuffered so 'progress-report/file' works as expected. 'line