mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
list-packages: Expand 'mirror://' URIs for patches.
* build-aux/list-packages.scm (package->sxml)[patches](patch-url): Use 'maybe-expand-mirrors' to get the real URL.
This commit is contained in:
parent
dd8ea244f4
commit
1c69e4ce3f
1 changed files with 8 additions and 3 deletions
|
@ -27,6 +27,8 @@ (define-module (list-packages)
|
|||
#:use-module (guix packages)
|
||||
#:use-module (guix licenses)
|
||||
#:use-module (guix gnu-maintenance)
|
||||
#:use-module ((guix download) #:select (%mirrors))
|
||||
#:use-module ((guix build download) #:select (maybe-expand-mirrors))
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (sxml simple)
|
||||
#:use-module (sxml fold)
|
||||
|
@ -107,9 +109,12 @@ (define patch-url
|
|||
"http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/patches/"
|
||||
(basename patch)))
|
||||
((? origin? patch)
|
||||
(match (origin-uri patch)
|
||||
((? string? uri) uri)
|
||||
((head . tail) head)))))
|
||||
(uri->string
|
||||
(first (maybe-expand-mirrors (string->uri
|
||||
(match (origin-uri patch)
|
||||
((? string? uri) uri)
|
||||
((head . tail) head)))
|
||||
%mirrors))))))
|
||||
|
||||
(define patch-name
|
||||
(match-lambda
|
||||
|
|
Loading…
Reference in a new issue