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