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