doc: Clarify installation from the binary tarball.
[guix.git] / guix / licenses.scm
blob1be35001ffc3ce046f7cc4d4cd9b02db8c4e490b
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 ;;;
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/>.
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
28             non-copyleft
29             bsd-style                             ;deprecated!
30             cc0
31             cddl1.0
32             cecill-c
33             artistic2.0 clarified-artistic
34             cpl1.0
35             epl1.0
36             expat
37             freetype
38             gpl1 gpl1+ gpl2 gpl2+ gpl3 gpl3+
39             fdl1.3+
40             isc
41             ijg
42             ibmpl1.0
43             imlib2
44             ipa
45             lgpl2.0 lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3 lgpl3+
46             mpl1.1 mpl2.0
47             ms-pl
48             ncsa
49             openldap2.8 openssl
50             psfl public-domain
51             qpl
52             ruby
53             silofl1.1
54             vim
55             x11 x11-style
56             zlib
57             fsf-free))
59 (define-record-type <license>
60   (license name uri comment)
61   license?
62   (name    license-name)
63   (uri     license-uri)
64   (comment license-comment))
66 ;;; Commentary:
67 ;;;
68 ;;; Available licenses.
69 ;;;
70 ;;; This list is based on these links:
71 ;;; https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix
72 ;;; https://www.gnu.org/licenses/license-list
73 ;;;
74 ;;; Code:
76 (define agpl3
77   (license "AGPL 3"
78            "https://gnu.org/licenses/agpl.html"
79            "https://gnu.org/licenses/why-affero-gpl.html"))
81 (define agpl3+
82   (license "AGPL 3+"
83            "https://gnu.org/licenses/agpl.html"
84            "https://gnu.org/licenses/why-affero-gpl.html"))
86 (define asl2.0
87   (license "ASL 2.0"
88            "http://directory.fsf.org/wiki/License:Apache2.0"
89            "https://www.gnu.org/licenses/license-list#apache2"))
91 (define boost1.0
92   (license "Boost 1.0"
93            "http://directory.fsf.org/wiki/License:Boost1.0"
94            "https://www.gnu.org/licenses/license-list#boost"))
96 (define bsd-2
97   (license "FreeBSD"
98            "http://directory.fsf.org/wiki/License:FreeBSD"
99            "https://www.gnu.org/licenses/license-list#FreeBSD"))
101 (define bsd-3
102   (license "Modified BSD"
103            "http://directory.fsf.org/wiki/License:BSD_3Clause"
104            "https://www.gnu.org/licenses/license-list#ModifiedBSD"))
106 (define bsd-4
107   (license "Original BSD"
108            "http://directory.fsf.org/wiki/License:BSD_4Clause"
109            "https://www.gnu.org/licenses/license-list#OriginalBSD"))
111 (define* (non-copyleft uri #:optional (comment ""))
112   "Return a lax, permissive, non-copyleft license (for example a variant of
113 the 3-clause BSD license or the Expat license), whose full text can be found
114 at URI, which may be a file:// URI pointing the package's tree."
115   (license "non-copyleft"
116            uri
117            (string-append
118             "This is a lax, non-copyleft free software license.  "
119             "Check the URI for details.  "
120             comment)))
122 (define bsd-style
123   ;; This alias is kept for backward-compatibility.  Do not use it for new
124   ;; packages: it is ambiguous, as rightfully explained at
125   ;; <http://www.gnu.org/philosophy/words-to-avoid.html#BSD-style>.
126   non-copyleft)
128 (define cc0
129   (license "CC0"
130            "http://directory.fsf.org/wiki/License:CC0"
131            "http://www.gnu.org/licenses/license-list.html#CC0"))
133 (define cddl1.0
134   (license "CDDL 1.0"
135            "http://directory.fsf.org/wiki/License:CDDLv1.0"
136            "https://www.gnu.org/licenses/license-list#CDDL"))
138 (define cecill-c
139   (license "CeCILL-C"
140            "http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html"
141            "https://www.gnu.org/licenses/license-list.html#CeCILL"))
143 (define artistic2.0
144   (license "Artistic License 2.0"
145            "http://www.perlfoundation.org/artistic_license_2_0"
146            "http://www.gnu.org/licenses/license-list.html#ArtisticLicense2"))
148 (define clarified-artistic
149   (license "Clarified Artistic"
150            ;; http://directory.fsf.org/wiki/User:Jgay/license-categorization#Clarified_Artistic_License
151            "http://gianluca.dellavedova.org/2011/01/03/clarified-artistic-license/"
152            "https://www.gnu.org/licenses/license-list.html#ArtisticLicense2"))
154 (define cpl1.0
155   (license "CPL 1.0"
156            "http://directory.fsf.org/wiki/License:CPLv1.0"
157            "https://www.gnu.org/licenses/license-list#CommonPublicLicense10"))
159 (define epl1.0
160   (license "EPL 1.0"
161            "http://directory.fsf.org/wiki/License:EPLv1.0"
162            "https://www.gnu.org/licenses/license-list#EPL"))
164 (define expat
165   (license "Expat"
166            "http://directory.fsf.org/wiki/License:Expat"
167            "https://www.gnu.org/licenses/license-list.html#Expat"))
169 (define freetype
170   (license "Freetype"
171            "http://directory.fsf.org/wiki/License:Freetype"
172            "https://www.gnu.org/licenses/license-list.html#freetype"))
174 (define gpl1
175   (license "GPL 1"
176            "https://www.gnu.org/licenses/old-licenses/gpl-1.0.html"
177            #f))
179 (define gpl1+
180   (license "GPL 1+"
181            "https://www.gnu.org/licenses/old-licenses/gpl-1.0.html"
182            #f))
184 (define gpl2
185   (license "GPL 2"
186            "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
187            "https://www.gnu.org/licenses/license-list#GPLv2"))
189 (define gpl2+
190   (license "GPL 2+"
191            "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
192            "https://www.gnu.org/licenses/license-list#GPLv2"))
194 (define gpl3
195   (license "GPL 3"
196            "https://www.gnu.org/licenses/gpl.html"
197            "https://www.gnu.org/licenses/license-list#GNUGPLv3"))
199 (define gpl3+
200   (license "GPL 3+"
201            "https://www.gnu.org/licenses/gpl.html"
202            "https://www.gnu.org/licenses/license-list#GNUGPLv3"))
204 (define fdl1.3+
205   (license "FDL 1.3+"
206            "https://www.gnu.org/licenses/fdl.html"
207            "https://www.gnu.org/licenses/license-list#FDL"))
209 (define isc
210   (license "ISC"
211            "http://directory.fsf.org/wiki/License:ISC"
212            "https://www.gnu.org/licenses/license-list.html#ISC"))
214 (define ijg
215   (license "IJG"
216            "http://directory.fsf.org/wiki/License:JPEG"
217            "https://www.gnu.org/licenses/license-list#ijg"))
219 (define ibmpl1.0
220   (license "IBMPL 1.0"
221            "http://directory.fsf.org/wiki/License:IBMPLv1.0"
222            "https://www.gnu.org/licenses/license-list#IBMPL"))
224 (define imlib2
225   (license "Imlib2"
226            "http://directory.fsf.org/wiki/License:Imlib2"
227            "https://www.gnu.org/licenses/license-list#imlib"))
229 (define ipa
230   (license "IPA Font License"
231            "http://directory.fsf.org/wiki/License:IPA_Font_License"
232            "https://www.gnu.org/licenses/license-list#IPAFONT"))
234 (define lgpl2.0
235   (license "LGPL 2.0"
236            "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html"
237            "https://www.gnu.org/licenses/why-not-lgpl.html"))
239 (define lgpl2.0+
240   (license "LGPL 2.0+"
241            "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html"
242            "https://www.gnu.org/licenses/why-not-lgpl.html"))
244 (define lgpl2.1
245   (license "LGPL 2.1"
246            "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
247            "https://www.gnu.org/licenses/license-list#LGPLv2.1"))
249 (define lgpl2.1+
250   (license "LGPL 2.1+"
251            "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
252            "https://www.gnu.org/licenses/license-list#LGPLv2.1"))
254 (define lgpl3
255   (license "LGPL 3"
256            "https://www.gnu.org/licenses/lgpl.html"
257            "https://www.gnu.org/licenses/license-list#LGPLv3"))
259 (define lgpl3+
260   (license "LGPL 3+"
261            "https://www.gnu.org/licenses/lgpl.html"
262            "https://www.gnu.org/licenses/license-list#LGPLv3"))
264 (define mpl1.1
265   (license "MPL 1.1"
266            "http://directory.fsf.org/wiki/License:MPLv1.1"
267            "https://www.gnu.org/licenses/license-list#MPL"))
269 (define mpl2.0
270   (license "MPL 2.0"
271            "http://directory.fsf.org/wiki/License:MPLv2.0"
272            "https://www.gnu.org/licenses/license-list#MPL-2.0"))
274 (define ms-pl
275   (license "Ms-PL"                                ;Microsoft Public License
276            "http://directory.fsf.org/wiki/License:MsPL"
277            "http://www.gnu.org/licenses/license-list.html#ms-pl"))
279 (define ncsa
280   (license "NCSA/University of Illinois Open Source License"
281            "http://directory.fsf.org/wiki/License:IllinoisNCSA"
282            "https://www.gnu.org/licenses/license-list#NCSA"))
284 (define openssl
285   (license "OpenSSL"
286            "http://directory.fsf.org/wiki/License:OpenSSL"
287            "https://www.gnu.org/licenses/license-list#OpenSSL"))
289 (define openldap2.8
290   (license "OpenLDAPv2.8"
291            "http://directory.fsf.org/wiki/License:OpenLDAPv2.8"
292            "https://www.gnu.org/licenses/license-list#newOpenLDAP"))
293               ;; lists OpenLDAPv2.7, which is virtually identical
295 (define psfl
296   (license "Python Software Foundation License"
297            "http://docs.python.org/license.html"
298            #f))
300 (define public-domain
301   (license "Public Domain"
302            "http://directory.fsf.org/wiki/License:PublicDomain"
303            "https://www.gnu.org/licenses/license-list#PublicDomain"))
305 (define qpl
306   (license "QPL"
307            "http://directory.fsf.org/wiki/License:QPLv1.0"
308            "http://www.gnu.org/licenses/license-list.html#QPL"))
310 (define ruby
311   (license "Ruby License"
312            "http://directory.fsf.org/wiki/License:Ruby"
313            "https://www.ruby-lang.org/en/about/license.txt"))
315 (define silofl1.1
316   (license "SIL OFL 1.1"
317            "http://scripts.sil.org/OFL_web"
318            "https://www.gnu.org/licenses/license-list#SILOFL"))
320 (define vim
321   (license "Vim"
322            "http://directory.fsf.org/wiki/License:Vim7.2"
323            "http://www.gnu.org/licenses/license-list.html#Vim"))
325 (define x11
326   (license "X11"
327            "http://directory.fsf.org/wiki/License:X11"
328            "https://www.gnu.org/licenses/license-list#X11License"))
330 (define* (x11-style uri #:optional (comment ""))
331   "Return an X11-style license, whose full text can be found at URI,
332 which may be a file:// URI pointing the package's tree."
333   (license "X11-style"
334            uri
335            (string-append
336             "This is an X11-style, non-copyleft free software license.  "
337             "Check the URI for details.  "
338             comment)))
340 (define zlib
341   (license "Zlib"
342            "http://www.gzip.org/zlib/zlib_license.html"
343            "https://www.gnu.org/licenses/license-list#ZLib"))
345 (define* (fsf-free uri #:optional (comment ""))
346   "Return a license that does not fit any of the ones above or a collection
347 of licenses, approved as free by the FSF.  More details can be found at URI."
348   (license "FSF-free"
349            uri
350            comment))
352 ;;; licenses.scm ends here