me
/
guix
Archived
1
0
Fork 0

gnu: bootstrap: Use fall-back mechanism for bootstrap-executables.

* gnu/packages/bootstrap.scm (%bootstrap-executable-base-urls): New variable.
Add lilypond.org url as a fall-back.
(bootstrap-executable-file-name): New function.
(bootstrap-executable): Use them to implement fall-back for donwloads of
bootstrap executables.
master
Jan Nieuwenhuizen 2020-03-16 08:17:16 +01:00
parent 25bc0f34c6
commit fef7710937
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
1 changed files with 14 additions and 7 deletions
gnu/packages

View File

@ -114,12 +114,17 @@
("xz" ("xz"
,(base32 "09j1d69qr0hhhx4k4ih8wp00dfc9y4rp01hfg3vc15yxd0jxabh5"))))) ,(base32 "09j1d69qr0hhhx4k4ih8wp00dfc9y4rp01hfg3vc15yxd0jxabh5")))))
(define (bootstrap-executable-url program system) (define %bootstrap-executable-base-urls
"Return the URL where PROGRAM can be found for SYSTEM." ;; This is where the bootstrap executables come from.
(string-append '("https://git.savannah.gnu.org/cgit/guix.git/plain/gnu/packages/bootstrap/"
"https://git.savannah.gnu.org/cgit/guix.git/plain/gnu/packages/bootstrap/" "http://lilypond.org/janneke/guix/"))
system "/" program
"?id=44f07d1dc6806e97c4e9ee3e6be883cc59dc666e")) (define (bootstrap-executable-file-name system program)
"Return the FILE-NAME part of url where PROGRAM can be found for SYSTEM."
(match system
("i586-gnu" (string-append system "/20200315/" program))
(_ (string-append system "/" program
"?id=44f07d1dc6806e97c4e9ee3e6be883cc59dc666e"))))
(define bootstrap-executable (define bootstrap-executable
(mlambda (program system) (mlambda (program system)
@ -140,7 +145,9 @@ for system '~a'")
((sha256) ((sha256)
(origin (origin
(method url-fetch/executable) (method url-fetch/executable)
(uri (bootstrap-executable-url program system)) (uri (map (cute string-append <>
(bootstrap-executable-file-name system program))
%bootstrap-executable-base-urls))
(file-name program) (file-name program)
(sha256 sha256))))))) (sha256 sha256)))))))