mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
download: Use Disarchive as a last resort.
This is a fixed version of66b14dccdd
, which was reverted ine74250c3c5
. * 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. * build-aux/build-self.scm (build-program)[select?]: Exclude '(guix build download)'. * guix/self.scm (compiled-guix)[*core-modules*]: Add 'guile-json' to the list of extensions.
This commit is contained in:
parent
df0b723345
commit
fbc2a52a32
5 changed files with 98 additions and 15 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue