[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
122/184: ui: Emit hyperlinks for 'license' in package search results.
From: |
guix-commits |
Subject: |
122/184: ui: Emit hyperlinks for 'license' in package search results. |
Date: |
Wed, 27 Nov 2019 14:37:12 -0500 (EST) |
kkebreau pushed a commit to branch wip-gnome-updates
in repository guix.
commit 4cd4d44688a0628fad0823a1512fbfeed50916e4
Author: Ludovic Courtès <address@hidden>
Date: Fri Nov 8 23:23:01 2019 +0100
ui: Emit hyperlinks for 'license' in package search results.
* guix/ui.scm (package->recutils): When HYPERLINKS is true, call
'hyperlink' for the 'license' field.
---
guix/ui.scm | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/guix/ui.scm b/guix/ui.scm
index bce0df5..eb17d27 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -44,7 +44,8 @@
#: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 @@ HYPERLINKS? is true, emit hyperlink escape sequences
when appropriate."
(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~%"
- 83/184: services: Make it possible to include dynamic modules in nginx., (continued)
- 83/184: services: Make it possible to include dynamic modules in nginx., guix-commits, 2019/11/27
- 87/184: gnu: libdvdnav: Update to 6.0.1., guix-commits, 2019/11/27
- 92/184: gnu: Fix deprecation of monolithic Qt 5.x package., guix-commits, 2019/11/27
- 104/184: gnu: fcitx-configtool: Don't use NAME in source URI., guix-commits, 2019/11/27
- 108/184: guix: Add file-locking with no wait., guix-commits, 2019/11/27
- 126/184: gnu: neovim: Update to 0.4.3., guix-commits, 2019/11/27
- 158/184: gnu: faad2: Use HTTPS home page., guix-commits, 2019/11/27
- 160/184: gnu: cgal: Update to 4.14.2., guix-commits, 2019/11/27
- 180/184: gnu: zita-convolver: Update to 4.0.3., guix-commits, 2019/11/27
- 115/184: gnu: python-psutil: Update to 5.6.5., guix-commits, 2019/11/27
- 122/184: ui: Emit hyperlinks for 'license' in package search results.,
guix-commits <=
- 134/184: gnu: Add perl-moox-strictconstructor., guix-commits, 2019/11/27
- 151/184: gnu: babl: Update to 0.1.72., guix-commits, 2019/11/27
- 156/184: gnu: xfce4-whiskermenu-plugin: Update to 2.3.4., guix-commits, 2019/11/27
- 150/184: gnu: fvwm: Update to 2.6.9., guix-commits, 2019/11/27
- 167/184: gnu: haskell-apps.scm: Add missing import., guix-commits, 2019/11/27
- 169/184: gnu: raincat: Use 'mirror-url'., guix-commits, 2019/11/27
- 178/184: gnu: gnome: Add gnome-screenshot to default apps., guix-commits, 2019/11/27
- 131/184: gnu: python-reportlab: Update to 3.5.32., guix-commits, 2019/11/27
- 130/184: gnu: botan: Use getentropy()., guix-commits, 2019/11/27
- 116/184: gnu: perl-danga-socket: Update to 1.62., guix-commits, 2019/11/27