import: go: Fix parsing of pkg.go.dev licenses after site update.

* guix/import/go.scm (go-package-licenses): Find license names in
'h2 // div // *text*' elements rather than 'h2 // *text*' elements.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
This commit is contained in:
Sarah Morgensen via Guix-patches via 2021-07-15 18:41:49 -07:00 committed by Maxim Cournoyer
parent 2aa65869ba
commit 59d20bcfcc
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -146,7 +146,7 @@ (define (go-package-licenses name)
;; Extract the text contained in a h2 child node of any
;; element marked with a "License" class attribute.
(select (sxpath `(// (* (@ (equal? (class "License"))))
h2 // *text*))))
h2 // div // *text*))))
(select (html->sxml body #:strict? #t))))
(define (sxml->texi sxml-node)