import: texlive: Handle multi-license packages.

This fixes "guix import texlive translator".

* guix/import/texlive.scm (sxml->package): Add clause for when 'license'
is a list of licences, as is the case with the "translator" package.
This commit is contained in:
Ludovic Courtès 2019-11-22 14:21:13 +01:00
parent 732c96f182
commit c0e9d470e1
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -140,7 +140,9 @@ (define (sxml-value path)
(synopsis (sxml-value '(entry caption *text*)))
(version (or (sxml-value '(entry version @ number *text*))
(sxml-value '(entry version @ date *text*))))
(license (string->license (sxml-value '(entry license @ type *text*))))
(license (match ((sxpath '(entry license @ type *text*)) sxml)
((license) (string->license license))
((lst ...) (map string->license lst))))
(home-page (string-append "http://www.ctan.org/pkg/" id))
(ref (texlive-ref component id))
(checkout (download-svn-to-store store ref)))
@ -169,7 +171,9 @@ (define (sxml-value path)
(sxml->string (or (sxml-value '(entry description))
'())))
#\newline)))))
(license ,license)))))
(license ,(match license
((lst ...) `(list ,@lst))
(license license)))))))
(define texlive->guix-package
(memoize