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