[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: branch master updated: licenses: Export license record.
From: |
zimoun |
Subject: |
Re: branch master updated: licenses: Export license record. |
Date: |
Thu, 23 Apr 2020 22:52:32 +0200 |
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?
> 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?
> 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].
--8<---------------cut here---------------start------------->8---
(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"))
(define-public my-pkg
(package
(name "foo")
(license mine))
--8<---------------cut here---------------end--------------->8---
My point is: license should not be different from the API point of
view than origin or package records; for extension purpose.
Well, the package included in Guix should only be licensed by one of
the licenses in licenses.scm; obviously.
But why does Guix impose this point of view to custom packages living
in custom channels?
I understand the encapsulation point but I miss how to extend the
licenses list without exporting the constructor.
[1] https://lists.gnu.org/archive/html/help-guix/2020-04/msg00119.html
Cheers,
simon
- branch master updated: licenses: Export license record., guix-commits, 2020/04/23
- Re: branch master updated: licenses: Export license record., Ludovic Courtès, 2020/04/23
- Re: branch master updated: licenses: Export license record.,
zimoun <=
- Re: branch master updated: licenses: Export license record., Ludovic Courtès, 2020/04/23
- Re: branch master updated: licenses: Export license record., zimoun, 2020/04/23
- Re: branch master updated: licenses: Export license record., Ludovic Courtès, 2020/04/26
- Re: branch master updated: licenses: Export license record., zimoun, 2020/04/26
- Re: branch master updated: licenses: Export license record., Ludovic Courtès, 2020/04/26
- Re: branch master updated: licenses: Export license record., zimoun, 2020/04/27
Re: branch master updated: licenses: Export license record., Mathieu Othacehe, 2020/04/24