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.
This commit is contained in:
parent
acec3beb05
commit
55d1f529e1
|
@ -192,15 +192,22 @@ network to check in GNU's database."
|
||||||
;; Definitely non-GNU.
|
;; Definitely non-GNU.
|
||||||
'non-gnu)))))
|
'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")))))))
|
||||||
|
|
||||||
|
(or (gnu-home-page? package)
|
||||||
(let ((url (and=> (package-source package) origin-uri))
|
(let ((url (and=> (package-source package) origin-uri))
|
||||||
(name (package-name package)))
|
(name (package-name package)))
|
||||||
(case (and (string? url) (mirror-type url))
|
(case (and (string? url) (mirror-type url))
|
||||||
((gnu) #t)
|
((gnu) #t)
|
||||||
((non-gnu) #f)
|
((non-gnu) #f)
|
||||||
(else
|
(else
|
||||||
;; Last resort: resort to the network.
|
|
||||||
(and (member name (map gnu-package-name (official-gnu-packages)))
|
(and (member name (map gnu-package-name (official-gnu-packages)))
|
||||||
#t))))))))
|
#t)))))))))
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
|
|
Loading…
Reference in New Issue