licenses: Add CeCILL and CeCILL-B.
[guix.git] / guix / licenses.scm
blobc6945288fe56bae4bba4277a5969cd967ce9a536
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2014, 2015, 2017 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2012, 2013 Nikita Karetnikov <nikita@karetnikov.org>
5 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
8 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
9 ;;; Copyright © 2016 Fabian Harfert <fhmgufs@web.de>
10 ;;; Copyright © 2016 Rene Saavedra <rennes@openmailbox.org>
11 ;;; Copyright © 2016, 2017 ng0 <ng0@libertad.pw>
12 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
13 ;;;
14 ;;; This file is part of GNU Guix.
15 ;;;
16 ;;; GNU Guix is free software; you can redistribute it and/or modify it
17 ;;; under the terms of the GNU General Public License as published by
18 ;;; the Free Software Foundation; either version 3 of the License, or (at
19 ;;; your option) any later version.
20 ;;;
21 ;;; GNU Guix is distributed in the hope that it will be useful, but
22 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24 ;;; GNU General Public License for more details.
25 ;;;
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
29 (define-module (guix licenses)
30   #:use-module (srfi srfi-9)
31   #:export (license? license-name license-uri license-comment
32             agpl1 agpl3 agpl3+
33             asl1.1 asl2.0
34             boost1.0
35             bsd-2 bsd-3 bsd-4
36             non-copyleft
37             bsd-style                             ;deprecated!
38             cc0
39             cc-by2.0 cc-by3.0 cc-by-sa2.0 cc-by-sa3.0 cc-by-sa4.0
40             cddl1.0
41             cecill cecill-b cecill-c
42             artistic2.0 clarified-artistic
43             copyleft-next
44             cpl1.0
45             epl1.0
46             expat
47             freetype
48             freebsd-doc
49             giftware
50             gpl1 gpl1+ gpl2 gpl2+ gpl3 gpl3+
51             gfl1.0
52             fdl1.1+ fdl1.2+ fdl1.3+
53             opl1.0+
54             isc
55             ijg
56             ibmpl1.0
57             imlib2
58             ipa
59             lgpl2.0 lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3 lgpl3+
60             mpl1.0 mpl1.1 mpl2.0
61             ms-pl
62             ncsa
63             nmap
64             openldap2.8 openssl
65             psfl public-domain
66             qpl
67             repoze
68             ruby
69             sgifreeb2.0
70             silofl1.1
71             sleepycat
72             tcl/tk
73             unlicense
74             vim
75             x11 x11-style
76             zpl2.1
77             zlib
78             fsf-free
79             wtfpl2
80             fsdg-compatible))
82 (define-record-type <license>
83   (license name uri comment)
84   license?
85   (name    license-name)
86   (uri     license-uri)
87   (comment license-comment))
89 ;;; Commentary:
90 ;;;
91 ;;; Available licenses.
92 ;;;
93 ;;; This list is based on these links:
94 ;;; https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix
95 ;;; https://www.gnu.org/licenses/license-list
96 ;;;
97 ;;; Code:
99 (define agpl1
100   (license "AGPL 1"
101            "https://gnu.org/licenses/agpl.html"
102            "https://gnu.org/licenses/why-affero-gpl.html"))
104 (define agpl3
105   (license "AGPL 3"
106            "https://gnu.org/licenses/agpl.html"
107            "https://gnu.org/licenses/why-affero-gpl.html"))
109 (define agpl3+
110   (license "AGPL 3+"
111            "https://gnu.org/licenses/agpl.html"
112            "https://gnu.org/licenses/why-affero-gpl.html"))
114 (define asl1.1
115   (license "ASL 1.1"
116            "http://directory.fsf.org/wiki/License:Apache1.1"
117            "https://www.gnu.org/licenses/license-list#apache1"))
119 (define asl2.0
120   (license "ASL 2.0"
121            "http://directory.fsf.org/wiki/License:Apache2.0"
122            "https://www.gnu.org/licenses/license-list#apache2"))
124 (define boost1.0
125   (license "Boost 1.0"
126            "http://directory.fsf.org/wiki/License:Boost1.0"
127            "https://www.gnu.org/licenses/license-list#boost"))
129 (define bsd-2
130   (license "FreeBSD"
131            "http://directory.fsf.org/wiki/License:FreeBSD"
132            "https://www.gnu.org/licenses/license-list#FreeBSD"))
134 (define bsd-3
135   (license "Modified BSD"
136            "http://directory.fsf.org/wiki/License:BSD_3Clause"
137            "https://www.gnu.org/licenses/license-list#ModifiedBSD"))
139 (define bsd-4
140   (license "Original BSD"
141            "http://directory.fsf.org/wiki/License:BSD_4Clause"
142            "https://www.gnu.org/licenses/license-list#OriginalBSD"))
144 (define* (non-copyleft uri #:optional (comment ""))
145   "Return a lax, permissive, non-copyleft license (for example a variant of
146 the 3-clause BSD license or the Expat license), whose full text can be found
147 at URI, which may be a file:// URI pointing the package's tree."
148   (license "non-copyleft"
149            uri
150            (string-append
151             "This is a lax, non-copyleft free software license.  "
152             "Check the URI for details.  "
153             comment)))
155 (define bsd-style
156   ;; This alias is kept for backward-compatibility.  Do not use it for new
157   ;; packages: it is ambiguous, as rightfully explained at
158   ;; <http://www.gnu.org/philosophy/words-to-avoid.html#BSD-style>.
159   non-copyleft)
161 (define cc0
162   (license "CC0"
163            "http://directory.fsf.org/wiki/License:CC0"
164            "http://www.gnu.org/licenses/license-list.html#CC0"))
166 (define cc-by-sa4.0
167   (license "CC-BY-SA 4.0"
168            "http://creativecommons.org/licenses/by-sa/4.0/"
169            "Creative Commons Attribution-ShareAlike 4.0 International"))
171 (define cc-by-sa3.0
172   (license "CC-BY-SA 3.0"
173            "http://creativecommons.org/licenses/by-sa/3.0/"
174            "Creative Commons Attribution-ShareAlike 3.0 Unported"))
176 (define cc-by-sa2.0
177   (license "CC-BY-SA 2.0"
178            "http://creativecommons.org/licenses/by-sa/2.0/"
179            "Creative Commons Attribution-ShareAlike 2.0 Generic"))
181 (define cc-by3.0
182   (license "CC-BY 3.0"
183            "http://creativecommons.org/licenses/by/3.0/"
184            "Creative Commons Attribution 3.0 Unported"))
186 (define cc-by2.0
187   (license "CC-BY 2.0"
188            "http://creativecommons.org/licenses/by/2.0/"
189            "Creative Commons Attribution 2.0 Generic"))
191 (define cddl1.0
192   (license "CDDL 1.0"
193            "http://directory.fsf.org/wiki/License:CDDLv1.0"
194            "https://www.gnu.org/licenses/license-list#CDDL"))
196 (define cecill                                    ;copyleft
197   (license "CeCILL"
198            "http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.html"
199            "https://www.gnu.org/licenses/license-list.html#CeCILL"))
201 (define cecill-b                                  ;non-copyleft
202   (license "CeCILL-B"
203            "http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html"
204            "https://www.gnu.org/licenses/license-list.html#CeCILL"))
206 (define cecill-c                                  ;weak copyleft
207   (license "CeCILL-C"
208            "http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html"
209            "https://www.gnu.org/licenses/license-list.html#CeCILL"))
211 (define artistic2.0
212   (license "Artistic License 2.0"
213            "http://www.perlfoundation.org/artistic_license_2_0"
214            "http://www.gnu.org/licenses/license-list.html#ArtisticLicense2"))
216 (define clarified-artistic
217   (license "Clarified Artistic"
218            ;; http://directory.fsf.org/wiki/User:Jgay/license-categorization#Clarified_Artistic_License
219            "http://gianluca.dellavedova.org/2011/01/03/clarified-artistic-license/"
220            "https://www.gnu.org/licenses/license-list.html#ArtisticLicense2"))
222 (define copyleft-next
223   (license "copyleft-next"
224            "https://raw.github.com/richardfontana/copyleft-next/master/Releases/copyleft-next-0.3.0"
225            "GPL-compatible copyleft license"))
227 (define cpl1.0
228   (license "CPL 1.0"
229            "http://directory.fsf.org/wiki/License:CPLv1.0"
230            "https://www.gnu.org/licenses/license-list#CommonPublicLicense10"))
232 (define epl1.0
233   (license "EPL 1.0"
234            "http://directory.fsf.org/wiki/License:EPLv1.0"
235            "https://www.gnu.org/licenses/license-list#EPL"))
237 (define expat
238   (license "Expat"
239            "http://directory.fsf.org/wiki/License:Expat"
240            "https://www.gnu.org/licenses/license-list.html#Expat"))
242 (define freetype
243   (license "Freetype"
244            "http://directory.fsf.org/wiki/License:Freetype"
245            "https://www.gnu.org/licenses/license-list.html#freetype"))
247 (define giftware
248   (license "Giftware"
249            "http://liballeg.org/license.html"
250            "The Allegro 4 license"))
252 (define gpl1
253   (license "GPL 1"
254            "https://www.gnu.org/licenses/old-licenses/gpl-1.0.html"
255            #f))
257 (define gpl1+
258   (license "GPL 1+"
259            "https://www.gnu.org/licenses/old-licenses/gpl-1.0.html"
260            #f))
262 (define gpl2
263   (license "GPL 2"
264            "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
265            "https://www.gnu.org/licenses/license-list#GPLv2"))
267 (define gpl2+
268   (license "GPL 2+"
269            "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
270            "https://www.gnu.org/licenses/license-list#GPLv2"))
272 (define gpl3
273   (license "GPL 3"
274            "https://www.gnu.org/licenses/gpl.html"
275            "https://www.gnu.org/licenses/license-list#GNUGPLv3"))
277 (define gpl3+
278   (license "GPL 3+"
279            "https://www.gnu.org/licenses/gpl.html"
280            "https://www.gnu.org/licenses/license-list#GNUGPLv3"))
282 ;; The “GUST font license” is legally equivalent to LPPL v1.3c as it only
283 ;; extends the LPPL with an optional request.
284 (define gfl1.0
285   (license "GUST font license 1.0"
286            "http://www.gust.org.pl/projects/e-foundry/licenses/GUST-FONT-LICENSE.txt"
287            "https://www.gnu.org/licenses/license-list#LPPL-1.3a"))
289 (define fdl1.1+
290   (license "FDL 1.1+"
291            "https://www.gnu.org/licenses/fdl-1.1"
292            "https://www.gnu.org/licenses/license-list#FDL"))
294 (define fdl1.2+
295   (license "FDL 1.2+"
296            "https://www.gnu.org/licenses/fdl-1.2"
297            "https://www.gnu.org/licenses/license-list#FDL"))
299 (define fdl1.3+
300   (license "FDL 1.3+"
301            "https://www.gnu.org/licenses/fdl.html"
302            "https://www.gnu.org/licenses/license-list#FDL"))
304 (define freebsd-doc
305   (license "FreeBSD Documentation License"
306            "https://www.freebsd.org/copyright/freebsd-doc-license.html"
307            "https://www.gnu.org/licenses/license-list.html#FreeBSDDL"))
309 (define opl1.0+
310   (license "Open Publication License 1.0 or later"
311            "http://opencontent.org/openpub/"
312            "https://www.gnu.org/licenses/license-list#OpenPublicationL"))
314 (define isc
315   (license "ISC"
316            "http://directory.fsf.org/wiki/License:ISC"
317            "https://www.gnu.org/licenses/license-list.html#ISC"))
319 (define ijg
320   (license "IJG"
321            "http://directory.fsf.org/wiki/License:JPEG"
322            "https://www.gnu.org/licenses/license-list#ijg"))
324 (define ibmpl1.0
325   (license "IBMPL 1.0"
326            "http://directory.fsf.org/wiki/License:IBMPLv1.0"
327            "https://www.gnu.org/licenses/license-list#IBMPL"))
329 (define imlib2
330   (license "Imlib2"
331            "http://directory.fsf.org/wiki/License:Imlib2"
332            "https://www.gnu.org/licenses/license-list#imlib"))
334 (define ipa
335   (license "IPA Font License"
336            "http://directory.fsf.org/wiki/License:IPA_Font_License"
337            "https://www.gnu.org/licenses/license-list#IPAFONT"))
339 (define lgpl2.0
340   (license "LGPL 2.0"
341            "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html"
342            "https://www.gnu.org/licenses/why-not-lgpl.html"))
344 (define lgpl2.0+
345   (license "LGPL 2.0+"
346            "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html"
347            "https://www.gnu.org/licenses/why-not-lgpl.html"))
349 (define lgpl2.1
350   (license "LGPL 2.1"
351            "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
352            "https://www.gnu.org/licenses/license-list#LGPLv2.1"))
354 (define lgpl2.1+
355   (license "LGPL 2.1+"
356            "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
357            "https://www.gnu.org/licenses/license-list#LGPLv2.1"))
359 (define lgpl3
360   (license "LGPL 3"
361            "https://www.gnu.org/licenses/lgpl.html"
362            "https://www.gnu.org/licenses/license-list#LGPLv3"))
364 (define lgpl3+
365   (license "LGPL 3+"
366            "https://www.gnu.org/licenses/lgpl.html"
367            "https://www.gnu.org/licenses/license-list#LGPLv3"))
369 (define mpl1.0
370   (license "MPL 1.0"
371            "http://www.mozilla.org/MPL/1.0/"
372            "https://www.gnu.org/licenses/license-list.html#MPL"))
374 (define mpl1.1
375   (license "MPL 1.1"
376            "http://directory.fsf.org/wiki/License:MPLv1.1"
377            "https://www.gnu.org/licenses/license-list#MPL"))
379 (define mpl2.0
380   (license "MPL 2.0"
381            "http://directory.fsf.org/wiki/License:MPLv2.0"
382            "https://www.gnu.org/licenses/license-list#MPL-2.0"))
384 (define ms-pl
385   (license "Ms-PL"                                ;Microsoft Public License
386            "http://directory.fsf.org/wiki/License:MsPL"
387            "http://www.gnu.org/licenses/license-list.html#ms-pl"))
389 (define ncsa
390   (license "NCSA/University of Illinois Open Source License"
391            "http://directory.fsf.org/wiki/License:IllinoisNCSA"
392            "https://www.gnu.org/licenses/license-list#NCSA"))
394 (define nmap
395   (license "Nmap license"
396            "https://svn.nmap.org/nmap/COPYING"
397            "https://fedoraproject.org/wiki/Licensing/Nmap"))
399 (define openssl
400   (license "OpenSSL"
401            "http://directory.fsf.org/wiki/License:OpenSSL"
402            "https://www.gnu.org/licenses/license-list#OpenSSL"))
404 (define openldap2.8
405   (license "OpenLDAPv2.8"
406            "http://directory.fsf.org/wiki/License:OpenLDAPv2.8"
407            "https://www.gnu.org/licenses/license-list#newOpenLDAP"))
408               ;; lists OpenLDAPv2.7, which is virtually identical
410 (define psfl
411   (license "Python Software Foundation License"
412            "http://docs.python.org/license.html"
413            #f))
415 (define public-domain
416   (license "Public Domain"
417            "http://directory.fsf.org/wiki/License:PublicDomain"
418            "https://www.gnu.org/licenses/license-list#PublicDomain"))
420 (define qpl
421   (license "QPL"
422            "http://directory.fsf.org/wiki/License:QPLv1.0"
423            "http://www.gnu.org/licenses/license-list.html#QPL"))
425 (define repoze
426   (license "Repoze"
427            "http://repoze.org/LICENSE.txt"
428            "A BSD-like license with a clause requiring all changes to be
429            attributed by author and date."))
431 (define ruby
432   (license "Ruby License"
433            "http://directory.fsf.org/wiki/License:Ruby"
434            "https://www.ruby-lang.org/en/about/license.txt"))
436 (define sgifreeb2.0
437   (license "SGI Free Software License B, version 2.0"
438            "http://directory.fsf.org/wiki/License:SGIFreeBv2"
439            "https://www.gnu.org/licenses/license-list.html#SGIFreeB"))
441 (define silofl1.1
442   (license "SIL OFL 1.1"
443            "http://scripts.sil.org/OFL_web"
444            "https://www.gnu.org/licenses/license-list#SILOFL"))
446 (define sleepycat
447   (license "Sleepycat"
448            "http://directory.fsf.org/wiki/License:Sleepycat"
449            "https://www.gnu.org/licenses/license-list#BerkeleyDB"))
451 (define tcl/tk
452   (license "Tcl/Tk"
453            "http://www.tcl.tk/software/tcltk/license.html"
454            "A non-copyleft free software license from the Tcl/Tk project"))
456 (define vim
457   (license "Vim"
458            "http://directory.fsf.org/wiki/License:Vim7.2"
459            "http://www.gnu.org/licenses/license-list.html#Vim"))
461 (define unlicense
462   (license "Unlicense"
463            "https://unlicense.org/"
464            "https://www.gnu.org/licenses/license-list.html#Unlicense"))
466 (define wtfpl2
467   (license "WTFPL 2"
468            "http://www.wtfpl.net"
469            "http://www.wtfpl.net/about/"))
471 (define x11
472   (license "X11"
473            "http://directory.fsf.org/wiki/License:X11"
474            "https://www.gnu.org/licenses/license-list#X11License"))
476 (define* (x11-style uri #:optional (comment ""))
477   "Return an X11-style license, whose full text can be found at URI,
478 which may be a file:// URI pointing the package's tree."
479   (license "X11-style"
480            uri
481            (string-append
482             "This is an X11-style, non-copyleft free software license.  "
483             "Check the URI for details.  "
484             comment)))
486 (define zpl2.1
487   (license "Zope Public License 2.1"
488            "http://directory.fsf.org/wiki?title=License:ZopePLv2.1"
489            "https://www.gnu.org/licenses/license-list.html#Zope2.0"))
491 (define zlib
492   (license "Zlib"
493            "http://www.gzip.org/zlib/zlib_license.html"
494            "https://www.gnu.org/licenses/license-list#ZLib"))
496 (define* (fsf-free uri #:optional (comment ""))
497   "Return a license that does not fit any of the ones above or a collection
498 of licenses, approved as free by the FSF.  More details can be found at URI."
499   (license "FSF-free"
500            uri
501            comment))
503 (define* (fsdg-compatible uri #:optional (comment ""))
504   "Return a license that does not fit any of the ones above or a collection
505 of licenses, not necessarily free, but in accordance with FSDG as Non-functional
506 Data.  More details can be found at URI.  See also
507 https://www.gnu.org/distros/free-system-distribution-guidelines.en.html#non-functional-data."
508   (license "FSDG-compatible"
509            uri
510            comment))
512 ;;; licenses.scm ends here