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
1 changed files with 6 additions and 2 deletions

View File

@ -140,7 +140,9 @@ expression describing it."
(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 @@ expression describing it."
(sxml->string (or (sxml-value '(entry description))
'())))
#\newline)))))
(license ,license)))))
(license ,(match license
((lst ...) `(list ,@lst))
(license license)))))))
(define texlive->guix-package
(memoize