1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012 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+
37 lgpl2.0 lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3 lgpl3+
47 (define-record-type <license>
48 (license name uri comment)
52 (comment license-comment))
56 ;;; Available licenses.
58 ;;; This list is based on these links:
59 ;;; https://github.com/NixOS/nixpkgs/blob/master/pkgs/lib/licenses.nix
60 ;;; https://www.gnu.org/licenses/license-list
66 "https://gnu.org/licenses/agpl.html"
67 "https://gnu.org/licenses/why-affero-gpl.html"))
71 "https://gnu.org/licenses/agpl.html"
72 "https://gnu.org/licenses/why-affero-gpl.html"))
76 "http://directory.fsf.org/wiki/License:Apache2.0"
77 "https://www.gnu.org/licenses/license-list#apache2"))
81 "http://directory.fsf.org/wiki/License:Boost1.0"
82 "https://www.gnu.org/licenses/license-list#boost"))
86 "http://directory.fsf.org/wiki/License:FreeBSD"
87 "https://www.gnu.org/licenses/license-list#FreeBSD"))
90 (license "Modified BSD"
91 "http://directory.fsf.org/wiki/License:BSD_3Clause"
92 "https://www.gnu.org/licenses/license-list#ModifiedBSD"))
95 (license "Original BSD"
96 "http://directory.fsf.org/wiki/License:BSD_4Clause"
97 "https://www.gnu.org/licenses/license-list#OriginalBSD"))
99 (define* (bsd-style uri #:optional (comment ""))
100 "Return a BSD-style license, whose full text can be found at URI,
101 which may be a file:// URI pointing the package's tree."
105 "This is a BSD-style, non-copyleft free software license. "
106 "Check the URI for details. "
111 "http://directory.fsf.org/wiki/License:CDDLv1.0"
112 "https://www.gnu.org/licenses/license-list#CDDL"))
116 "http://directory.fsf.org/wiki/License:CPLv1.0"
117 "https://www.gnu.org/licenses/license-list#CommonPublicLicense10"))
121 "http://directory.fsf.org/wiki/License:EPLv1.0"
122 "https://www.gnu.org/licenses/license-list#EPL"))
126 "http://directory.fsf.org/wiki/License:Expat"
127 "https://www.gnu.org/licenses/license-list.html#Expat"))
131 "http://directory.fsf.org/wiki/License:Freetype"
132 "https://www.gnu.org/licenses/license-list.html#freetype"))
136 "https://www.gnu.org/licenses/old-licenses/gpl-1.0.html"
141 "https://www.gnu.org/licenses/old-licenses/gpl-1.0.html"
146 "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
147 "https://www.gnu.org/licenses/license-list#GPLv2"))
151 "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
152 "https://www.gnu.org/licenses/license-list#GPLv2"))
156 "https://www.gnu.org/licenses/gpl.html"
157 "https://www.gnu.org/licenses/license-list#GNUGPLv3"))
161 "https://www.gnu.org/licenses/gpl.html"
162 "https://www.gnu.org/licenses/license-list#GNUGPLv3"))
166 "http://directory.fsf.org/wiki/License:ISC"
167 "https://www.gnu.org/licenses/license-list.html#ISC"))
171 "http://directory.fsf.org/wiki/License:JPEG"
172 "https://www.gnu.org/licenses/license-list#ijg"))
176 "http://directory.fsf.org/wiki/License:IBMPLv1.0"
177 "https://www.gnu.org/licenses/license-list#IBMPL"))
181 "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html"
182 "https://www.gnu.org/licenses/why-not-lgpl.html"))
186 "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html"
187 "https://www.gnu.org/licenses/why-not-lgpl.html"))
191 "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
192 "https://www.gnu.org/licenses/license-list#LGPLv2.1"))
196 "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
197 "https://www.gnu.org/licenses/license-list#LGPLv2.1"))
201 "https://www.gnu.org/licenses/lgpl.html"
202 "https://www.gnu.org/licenses/license-list#LGPLv3"))
206 "https://www.gnu.org/licenses/lgpl.html"
207 "https://www.gnu.org/licenses/license-list#LGPLv3"))
211 "http://directory.fsf.org/wiki/License:MPLv2.0"
212 "https://www.gnu.org/licenses/license-list#MPL-2.0"))
216 "http://directory.fsf.org/wiki/License:OpenSSL"
217 "https://www.gnu.org/licenses/license-list#OpenSSL"))
220 (license "OpenLDAPv2.8"
221 "http://directory.fsf.org/wiki/License:OpenLDAPv2.8"
222 "https://www.gnu.org/licenses/license-list#newOpenLDAP"))
223 ;; lists OpenLDAPv2.7, which is virtually identical
226 (license "Python Software Foundation License"
227 "http://docs.python.org/license.html"
230 (define public-domain
231 (license "Public Domain"
232 "http://directory.fsf.org/wiki/License:PublicDomain"
233 "https://www.gnu.org/licenses/license-list#PublicDomain"))
237 "http://directory.fsf.org/wiki/License:QPLv1.0"
238 "http://www.gnu.org/licenses/license-list.html#QPL"))
242 "http://directory.fsf.org/wiki/License:Vim7.2"
243 "http://www.gnu.org/licenses/license-list.html#Vim"))
247 "http://directory.fsf.org/wiki/License:X11"
248 "https://www.gnu.org/licenses/license-list#X11License"))
250 (define* (x11-style uri #:optional (comment ""))
251 "Return an X11-style license, whose full text can be found at URI,
252 which may be a file:// URI pointing the package's tree."
256 "This is an X11-style, non-copyleft free software license. "
257 "Check the URI for details. "
262 "http://www.gzip.org/zlib/zlib_license.html"
263 "https://www.gnu.org/licenses/license-list#ZLib"))
265 (define* (fsf-free uri #:optional (comment ""))
266 "Return a license that does not fit any of the ones above or a collection
267 of licenses, approved as free by the FSF. More details can be found at URI."
272 ;;; licenses.scm ends here