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