Subject: Re: [bug#37928] [PATCH v2] import: crate: Better handle license expressions.
From: Ludovic Courtès <[email-masked]>
To: Brice Waegeneire <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Wed, 11 Dec 2019 12:24:04 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Brice,

Brice Waegeneire <[email-masked]> skribis:

> * guix/import/crate.scm (%dual-license-rx): Removed function.
> (crate->guix-package): Handle most of the multi-licensing cases.
> * tests/crate.scm (licenses): Add tests for some licenses.

Thanks for the updated patch!

> +(define (string->license string)
> +    (map
> +     spdx-string->license
> +     (filter (lambda (license)
> +               (and (not (string-null? license))
> +                   (not (any (lambda (elem) (string=? elem license))
> +                             '("AND" "OR" "WITH")))))
> +            (string-split string (string->char-set " /")))))

I changed that to use ‘filter-map’ instead and pushed as
263a267b75e472cb84428571580dabd99d5dff0c.

Thanks!

Ludo’.