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