download: Prepare to support the 'guix publish' /file URLs.
* guix/download.scm (%content-addressed-mirrors): Add 'file' parameter to the lambda. * guix/build/download.scm (url-fetch)[content-addressed-uris]: Adjust accordingly.
This commit is contained in:
parent
ff6638d112
commit
ab84b927ef
|
@ -737,7 +737,7 @@ or #f."
|
||||||
(append-map (lambda (make-url)
|
(append-map (lambda (make-url)
|
||||||
(filter-map (match-lambda
|
(filter-map (match-lambda
|
||||||
((hash-algo . hash)
|
((hash-algo . hash)
|
||||||
(string->uri (make-url hash-algo hash))))
|
(string->uri (make-url file hash-algo hash))))
|
||||||
hashes))
|
hashes))
|
||||||
content-addressed-mirrors))
|
content-addressed-mirrors))
|
||||||
|
|
||||||
|
|
|
@ -232,10 +232,10 @@
|
||||||
|
|
||||||
(define %content-addressed-mirrors
|
(define %content-addressed-mirrors
|
||||||
;; List of content-addressed mirrors. Each mirror is represented as a
|
;; List of content-addressed mirrors. Each mirror is represented as a
|
||||||
;; procedure that takes an algorithm (symbol) and a hash (bytevector), and
|
;; procedure that takes a file name, an algorithm (symbol) and a hash
|
||||||
;; returns a URL or #f.
|
;; (bytevector), and returns a URL or #f.
|
||||||
;; TODO: Add more.
|
;; TODO: Add more.
|
||||||
'(list (lambda (algo hash)
|
'(list (lambda (file algo hash)
|
||||||
;; 'tarballs.nixos.org' supports several algorithms.
|
;; 'tarballs.nixos.org' supports several algorithms.
|
||||||
(string-append "http://tarballs.nixos.org/"
|
(string-append "http://tarballs.nixos.org/"
|
||||||
(symbol->string algo) "/"
|
(symbol->string algo) "/"
|
||||||
|
|
Loading…
Reference in New Issue