[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
122/182: ui: Emit hyperlinks for 'license' in package search results.
From: |
guix-commits |
Subject: |
122/182: ui: Emit hyperlinks for 'license' in package search results. |
Date: |
Fri, 15 Nov 2019 00:01:52 -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~%"
- 146/182: gnu: Add artyfx, (continued)
- 146/182: gnu: Add artyfx, guix-commits, 2019/11/15
- 152/182: gnu: gegl: Add source URIs., guix-commits, 2019/11/15
- 151/182: gnu: babl: Update to 0.1.72., guix-commits, 2019/11/15
- 159/182: gnu: cgal: Use HTTPS home page., guix-commits, 2019/11/15
- 157/182: gnu: faad2: Update to 2.8.6., guix-commits, 2019/11/15
- 163/182: gnu: monero-gui: Update to 0.15.0.0., guix-commits, 2019/11/15
- 126/182: gnu: neovim: Update to 0.4.3., guix-commits, 2019/11/15
- 124/182: build: Warn about etc/indent-code.el when Emacs is absent., guix-commits, 2019/11/15
- 147/182: gnu: youtube-dl: Update to 2019.11.05., guix-commits, 2019/11/15
- 148/182: gnu: qtractor: Update to 0.9.11., guix-commits, 2019/11/15
- 122/182: ui: Emit hyperlinks for 'license' in package search results.,
guix-commits <=
- 127/182: gnu: signify: Update to 27., guix-commits, 2019/11/15
- 131/182: gnu: python-reportlab: Update to 3.5.32., guix-commits, 2019/11/15
- 132/182: gnu: rdesktop: Update to 1.9.0., guix-commits, 2019/11/15
- 135/182: gnu: parcimonie: Update to 0.11.0., guix-commits, 2019/11/15
- 134/182: gnu: Add perl-moox-strictconstructor., guix-commits, 2019/11/15
- 138/182: services: hpcguix-web: Explicitly import (guix build utils)., guix-commits, 2019/11/15
- 140/182: tests: Update references to the now-deprecated 'guile-json' variable., guix-commits, 2019/11/15
- 155/182: gnu: xfce4-whiskermenu-plugin: Don't use NAME in source URI., guix-commits, 2019/11/15
- 156/182: gnu: xfce4-whiskermenu-plugin: Update to 2.3.4., guix-commits, 2019/11/15
- 150/182: gnu: fvwm: Update to 2.6.9., guix-commits, 2019/11/15