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