summaryrefslogtreecommitdiff
path: root/guix/scripts/perform-download.scm
diff options
context:
space:
mode:
authorTimothy Sample <samplet@ngyro.com>2021-03-19 23:03:25 -0400
committerTimothy Sample <samplet@ngyro.com>2021-04-27 21:27:02 -0400
commit66b14dccdd0d83c875ce3a8d50ceab8b6f0a3ce2 (patch)
tree460b2a00b44adc6742f2d1bf2c5f7565d18f3fb7 /guix/scripts/perform-download.scm
parent4f59ef3edb9ad72ea6f0b2856b4a3336a9654c90 (diff)
downloadguix-patches-66b14dccdd0d83c875ce3a8d50ceab8b6f0a3ce2.tar
guix-patches-66b14dccdd0d83c875ce3a8d50ceab8b6f0a3ce2.tar.gz
download: Use Disarchive as a last resort.
* guix/download.scm (%disarchive-mirrors): New variable. (%disarchive-mirror-file): New variable. (built-in-download): Add 'disarchive-mirrors' keyword argument and pass its value along to the 'builtin:download' derivation. (url-fetch): Pass '%disarchive-mirror-file' to 'built-in-download'. * guix/scripts/perform-download.scm (perform-download): Read Disarchive mirrors from the environment and pass them to 'url-fetch'. * guix/build/download.scm (disarchive-fetch/any): New procedure. (url-fetch): Add 'disarchive-mirrors' keyword argument, use it to make a list of URIs, and use the new procedure to fetch the file if all other methods fail.
Diffstat (limited to 'guix/scripts/perform-download.scm')
-rw-r--r--guix/scripts/perform-download.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/guix/scripts/perform-download.scm b/guix/scripts/perform-download.scm
index 8d409092ba..6889bcef79 100644
--- a/guix/scripts/perform-download.scm
+++ b/guix/scripts/perform-download.scm
@@ -54,7 +54,8 @@ actual output is different from that when we're doing a 'bmCheck' or
(output* "out")
(executable "executable")
(mirrors "mirrors")
- (content-addressed-mirrors "content-addressed-mirrors"))
+ (content-addressed-mirrors "content-addressed-mirrors")
+ (disarchive-mirrors "disarchive-mirrors"))
(unless url
(leave (G_ "~a: missing URL~%") (derivation-file-name drv)))
@@ -79,6 +80,10 @@ actual output is different from that when we're doing a 'bmCheck' or
(lambda (port)
(eval (read port) %user-module)))
'())
+ #:disarchive-mirrors
+ (if disarchive-mirrors
+ (call-with-input-file disarchive-mirrors read)
+ '())
#:hashes `((,algo . ,hash))
;; Since DRV's output hash is known, X.509 certificate