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