guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: branch master updated: licenses: Export license record.


From: Ludovic Courtès
Subject: Re: branch master updated: licenses: Export license record.
Date: Thu, 23 Apr 2020 23:47:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hi,

zimoun <address@hidden> skribis:

> On Thu, 23 Apr 2020 at 21:57, Ludovic Courtès <address@hidden> wrote:
>
>> address@hidden skribis:
>>
>> > commit f0779922ff260df2404c90504986aa59553154fb
>> > Author: zimoun <address@hidden>
>> > AuthorDate: Thu Apr 23 16:09:00 2020 +0200
>> >
>> >     licenses: Export license record.
>> >
>> >     * guix/licenses.scm (<license>): Export it.
>> >
>> >     Signed-off-by: Mathieu Othacehe <address@hidden>
>>
>> > -  #:export (license? license-name license-uri license-comment
>> > +  #:export (license license? license-name license-uri license-comment
>>
>> I see two issues:
>>
>>   1. The commit log doesn’t match the change.  :-)
>
> Which part?

‘<license>’ vs. ‘license’.

>>   2. It’s on purpose that the constructor is not exported.  It’s so that
>>      genuine license objects have to be defined here.  (Likewise, record
>>      type descriptors like <license> are generally kept private to
>>      maintain encapsulation.)
>
> How to extend the list by custom licenses without defining them there?

Like I wrote, it’s not possible, except via a procedure like ‘fsf-free’
or ‘fsdg-compatible’.

>> I’m in favor of reverting.
>>
>> What’s the use case, Simon?  (Apologies if I missed the discussion!)
>
> I want to be able to have custom licenses for custom packages living
> in custom channels.
>
> More or less for example such use case; for reference [1].
>
> (define-module (my-module)
>   #:use-module (guix packages)
>   #:use-module (guix licenses)
>   #:use-module (gnu packages))
>
> (define mine
>   (license "mine"
>        "https://my.domain.com";
>        "My weird license that no one uses"))

I see.  I guess one of the procedures above would work, right?

> My point is: license should not be different from the API point of
> view than origin or package records; for extension purpose.

Not exposing the ‘license’ constructor allows us to make sure that, for
instance, there’s only one <license> record for each license.

And we gladly accept additions to that file!  :-)

How does that sound?

Thanks,
Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]