mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
ui: Emit hyperlinks for 'license' in package search results.
* guix/ui.scm (package->recutils): When HYPERLINKS is true, call 'hyperlink' for the 'license' field.
This commit is contained in:
parent
7f0f38b54c
commit
edd25a8cac
1 changed files with 7 additions and 2 deletions
|
@ -44,7 +44,8 @@ (define-module (guix ui)
|
|||
#:use-module (guix derivations)
|
||||
#:use-module (guix build-system)
|
||||
#:use-module (guix serialization)
|
||||
#:use-module ((guix licenses) #:select (license? license-name))
|
||||
#:use-module ((guix licenses)
|
||||
#:select (license? license-name license-uri))
|
||||
#:use-module ((guix build syscalls)
|
||||
#:select (free-disk-space terminal-columns
|
||||
terminal-rows))
|
||||
|
@ -1315,7 +1316,11 @@ (define (package<? p1 p2)
|
|||
(string-join (map license-name licenses)
|
||||
", "))
|
||||
((? license? license)
|
||||
(license-name license))
|
||||
(let ((text (license-name license))
|
||||
(uri (license-uri license)))
|
||||
(if (and hyperlinks? uri (string-prefix? "http" uri))
|
||||
(hyperlink uri text)
|
||||
text)))
|
||||
(x
|
||||
(G_ "unknown"))))
|
||||
(format port "synopsis: ~a~%"
|
||||
|
|
Loading…
Reference in a new issue