aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-06-16 10:28:19 +0200
committerLudovic Courtès <ludo@gnu.org>2015-06-16 10:31:12 +0200
commit55d1f529e1a50387d6bf7d474a3cbe3839a1f885 (patch)
treed4924d996727a9f8c2cb07b03cacf23835f1b1bb
parentacec3beb0552ecb597d59904552a453d67896e9b (diff)
downloadguix-55d1f529e1a50387d6bf7d474a3cbe3839a1f885.tar
guix-55d1f529e1a50387d6bf7d474a3cbe3839a1f885.tar.gz
gnu-maintenance: Use 'home-page' as an additional hint of "GNUness".
Reported by Rastus_Vernon on IRC. Fixes 'gnu-package?' for GNUcash. * guix/gnu-maintenance.scm (gnu-package?)[gnu-home-page?]: New procedure. Use it to determine whether PACKAGE is GNU.
-rw-r--r--guix/gnu-maintenance.scm25
1 files changed, 16 insertions, 9 deletions
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index 8d47cee487..ac83df40a3 100644
--- a/guix/gnu-maintenance.scm
+++ b/guix/gnu-maintenance.scm
@@ -192,15 +192,22 @@ network to check in GNU's database."
;; Definitely non-GNU.
'non-gnu)))))
- (let ((url (and=> (package-source package) origin-uri))
- (name (package-name package)))
- (case (and (string? url) (mirror-type url))
- ((gnu) #t)
- ((non-gnu) #f)
- (else
- ;; Last resort: resort to the network.
- (and (member name (map gnu-package-name (official-gnu-packages)))
- #t))))))))
+ (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")))))))
+
+ (or (gnu-home-page? package)
+ (let ((url (and=> (package-source package) origin-uri))
+ (name (package-name package)))
+ (case (and (string? url) (mirror-type url))
+ ((gnu) #t)
+ ((non-gnu) #f)
+ (else
+ (and (member name (map gnu-package-name (official-gnu-packages)))
+ #t)))))))))
;;;