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>
6 ;;; This file is part of GNU Guix.
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.
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.
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
27 bsd-2 bsd-3 bsd-4 bsd-style
33 gpl1 gpl1+ gpl2 gpl2+ gpl3 gpl3+
38 lgpl2.0 lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3 lgpl3+
48 (define-record-type <license>
49 (license name uri comment)
53 (comment license-comment))
57 ;;; Available licenses.
59 ;;; This list is based on these links:
60 ;;; https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix
61 ;;; https://www.gnu.org/licenses/license-list
67 "https://gnu.org/licenses/agpl.html"
68 "https://gnu.org/licenses/why-affero-gpl.html"))
72 "https://gnu.org/licenses/agpl.html"
73 "https://gnu.org/licenses/why-affero-gpl.html"))
77 "http://directory.fsf.org/wiki/License:Apache2.0"
78 "https://www.gnu.org/licenses/license-list#apache2"))
82 "http://directory.fsf.org/wiki/License:Boost1.0"
83 "https://www.gnu.org/licenses/license-list#boost"))
87 "http://directory.fsf.org/wiki/License:FreeBSD"
88 "https://www.gnu.org/licenses/license-list#FreeBSD"))
91 (license "Modified BSD"
92 "http://directory.fsf.org/wiki/License:BSD_3Clause"
93 "https://www.gnu.org/licenses/license-list#ModifiedBSD"))
96 (license "Original BSD"
97 "http://directory.fsf.org/wiki/License:BSD_4Clause"
98 "https://www.gnu.org/licenses/license-list#OriginalBSD"))
100 (define* (bsd-style uri #:optional (comment ""))
101 "Return a BSD-style license, whose full text can be found at URI,
102 which may be a file:// URI pointing the package's tree."
106 "This is a BSD-style, non-copyleft free software license. "
107 "Check the URI for details. "
112 "http://directory.fsf.org/wiki/License:CDDLv1.0"
113 "https://www.gnu.org/licenses/license-list#CDDL"))
117 "http://directory.fsf.org/wiki/License:CPLv1.0"
118 "https://www.gnu.org/licenses/license-list#CommonPublicLicense10"))
122 "http://directory.fsf.org/wiki/License:EPLv1.0"
123 "https://www.gnu.org/licenses/license-list#EPL"))
127 "http://directory.fsf.org/wiki/License:Expat"
128 "https://www.gnu.org/licenses/license-list.html#Expat"))
132 "http://directory.fsf.org/wiki/License:Freetype"
133 "https://www.gnu.org/licenses/license-list.html#freetype"))
137 "https://www.gnu.org/licenses/old-licenses/gpl-1.0.html"
142 "https://www.gnu.org/licenses/old-licenses/gpl-1.0.html"
147 "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
148 "https://www.gnu.org/licenses/license-list#GPLv2"))
152 "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
153 "https://www.gnu.org/licenses/license-list#GPLv2"))
157 "https://www.gnu.org/licenses/gpl.html"
158 "https://www.gnu.org/licenses/license-list#GNUGPLv3"))
162 "https://www.gnu.org/licenses/gpl.html"
163 "https://www.gnu.org/licenses/license-list#GNUGPLv3"))
167 "https://www.gnu.org/licenses/fdl.html"
168 "https://www.gnu.org/licenses/license-list#FDL"))
172 "http://directory.fsf.org/wiki/License:ISC"
173 "https://www.gnu.org/licenses/license-list.html#ISC"))
177 "http://directory.fsf.org/wiki/License:JPEG"
178 "https://www.gnu.org/licenses/license-list#ijg"))
182 "http://directory.fsf.org/wiki/License:IBMPLv1.0"
183 "https://www.gnu.org/licenses/license-list#IBMPL"))
187 "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html"
188 "https://www.gnu.org/licenses/why-not-lgpl.html"))
192 "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html"
193 "https://www.gnu.org/licenses/why-not-lgpl.html"))
197 "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
198 "https://www.gnu.org/licenses/license-list#LGPLv2.1"))
202 "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
203 "https://www.gnu.org/licenses/license-list#LGPLv2.1"))
207 "https://www.gnu.org/licenses/lgpl.html"
208 "https://www.gnu.org/licenses/license-list#LGPLv3"))
212 "https://www.gnu.org/licenses/lgpl.html"
213 "https://www.gnu.org/licenses/license-list#LGPLv3"))
217 "http://directory.fsf.org/wiki/License:MPLv2.0"
218 "https://www.gnu.org/licenses/license-list#MPL-2.0"))
222 "http://directory.fsf.org/wiki/License:OpenSSL"
223 "https://www.gnu.org/licenses/license-list#OpenSSL"))
226 (license "OpenLDAPv2.8"
227 "http://directory.fsf.org/wiki/License:OpenLDAPv2.8"
228 "https://www.gnu.org/licenses/license-list#newOpenLDAP"))
229 ;; lists OpenLDAPv2.7, which is virtually identical
232 (license "Python Software Foundation License"
233 "http://docs.python.org/license.html"
236 (define public-domain
237 (license "Public Domain"
238 "http://directory.fsf.org/wiki/License:PublicDomain"
239 "https://www.gnu.org/licenses/license-list#PublicDomain"))
243 "http://directory.fsf.org/wiki/License:QPLv1.0"
244 "http://www.gnu.org/licenses/license-list.html#QPL"))
248 "http://directory.fsf.org/wiki/License:Vim7.2"
249 "http://www.gnu.org/licenses/license-list.html#Vim"))
253 "http://directory.fsf.org/wiki/License:X11"
254 "https://www.gnu.org/licenses/license-list#X11License"))
256 (define* (x11-style uri #:optional (comment ""))
257 "Return an X11-style license, whose full text can be found at URI,
258 which may be a file:// URI pointing the package's tree."
262 "This is an X11-style, non-copyleft free software license. "
263 "Check the URI for details. "
268 "http://www.gzip.org/zlib/zlib_license.html"
269 "https://www.gnu.org/licenses/license-list#ZLib"))
271 (define* (fsf-free uri #:optional (comment ""))
272 "Return a license that does not fit any of the ones above or a collection
273 of licenses, approved as free by the FSF. More details can be found at URI."
278 ;;; licenses.scm ends here