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