mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
list-packages: Handle 'origin' patches.
* build-aux/list-packages.scm (package->sxml)[patches]: Handle the case where PATCH is an 'origin'.
This commit is contained in:
parent
14e84b2d97
commit
572bcdf0bc
1 changed files with 20 additions and 5 deletions
|
@ -100,10 +100,25 @@ (define ->sxml
|
|||
(->sxml (package-license package)))
|
||||
|
||||
(define (patches package)
|
||||
(define (patch-url patch)
|
||||
(string-append
|
||||
"http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/patches/"
|
||||
(basename patch)))
|
||||
(define patch-url
|
||||
(match-lambda
|
||||
((? string? patch)
|
||||
(string-append
|
||||
"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)))))
|
||||
|
||||
(define patch-name
|
||||
(match-lambda
|
||||
((? string? patch)
|
||||
(basename patch))
|
||||
((? origin? patch)
|
||||
(match (origin-uri patch)
|
||||
((? string? uri) (basename uri))
|
||||
((head . tail) (basename head))))))
|
||||
|
||||
(define (snippet-link snippet)
|
||||
(let ((loc (or (package-field-location package 'source)
|
||||
|
@ -134,7 +149,7 @@ (define (snippet-link snippet)
|
|||
(cons `(a (@ (href ,(patch-url patch))
|
||||
(title ,(string-append
|
||||
"Link to "
|
||||
(basename patch))))
|
||||
(patch-name patch))))
|
||||
,(number->string number))
|
||||
links))))))))))
|
||||
|
||||
|
|
Loading…
Reference in a new issue