summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-01-27 23:40:04 +0100
committerLudovic Courtès <ludo@gnu.org>2017-01-28 00:38:20 +0100
commit6715e1ff2e09af3208f8f2a108ca100798ca1058 (patch)
treede0fffdd49d3f040787c372f8a68ba3c5188705e /guix
parent38cb4766d84058eb7d3b704b4ac706fcd560b11a (diff)
gnu-maintenance: 'gnu-package?' ignores invalid URLs.
* guix/gnu-maintenance.scm (gnu-package?)[gnu-home-page?]: Add '>>' threading macro and use it.
Diffstat (limited to 'guix')
-rw-r--r--guix/gnu-maintenance.scm16
1 files changed, 11 insertions, 5 deletions
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index 8a37ce56e6..9c94992ab6 100644
--- a/guix/gnu-maintenance.scm
+++ b/guix/gnu-maintenance.scm
@@ -187,11 +187,17 @@ network to check in GNU's database."
'non-gnu)))))
(define (gnu-home-page? package)
- (and=> (package-home-page package)
- (lambda (url)
- (and=> (uri-host (string->uri url))
- (lambda (host)
- (member host '("www.gnu.org" "gnu.org")))))))
+ (letrec-syntax ((>> (syntax-rules ()
+ ((_ value proc)
+ (and=> value proc))
+ ((_ value proc rest ...)
+ (and=> value
+ (lambda (next)
+ (>> (proc next) rest ...)))))))
+ (>> package package-home-page
+ string->uri uri-host
+ (lambda (host)
+ (member host '("www.gnu.org" "gnu.org"))))))
(or (gnu-home-page? package)
(let ((url (and=> (package-source package) origin-uri))