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