1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (guix licenses)
21 #:use-module (srfi srfi-9)
22 #:export (license? license-name license-uri license-comment
25 bsd-2 bsd-3 bsd-4 bsd-style
30 gpl1 gpl1+ gpl2 gpl2+ gpl3 gpl3+
33 lgpl2.0 lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3 lgpl3+
40 (define-record-type <license>
41 (license name uri comment)
45 (comment license-comment))
49 ;;; Available licenses.
51 ;;; This list is based on these links:
52 ;;; https://github.com/NixOS/nixpkgs/blob/master/pkgs/lib/licenses.nix
53 ;;; https://www.gnu.org/licenses/license-list
59 "http://directory.fsf.org/wiki/License:Apache2.0"
60 "https://www.gnu.org/licenses/license-list#apache2"))
64 "http://directory.fsf.org/wiki/License:Boost1.0"
65 "https://www.gnu.org/licenses/license-list#boost"))
69 "http://directory.fsf.org/wiki/License:FreeBSD"
70 "https://www.gnu.org/licenses/license-list#FreeBSD"))
73 (license "Modified BSD"
74 "http://directory.fsf.org/wiki/License:BSD_3Clause"
75 "https://www.gnu.org/licenses/license-list#ModifiedBSD"))
78 (license "Original BSD"
79 "http://directory.fsf.org/wiki/License:BSD_4Clause"
80 "https://www.gnu.org/licenses/license-list#OriginalBSD"))
82 (define* (bsd-style uri #:optional (comment ""))
83 "Return a BSD-style license, whose full text can be found at URI,
84 which may be a file:// URI pointing the package's tree."
88 "This is a BSD-style, non-copyleft free software license. "
89 "Check the URI for details. "
94 "http://directory.fsf.org/wiki/License:CDDLv1.0"
95 "https://www.gnu.org/licenses/license-list#CDDL"))
99 "http://directory.fsf.org/wiki/License:CPLv1.0"
100 "https://www.gnu.org/licenses/license-list#CommonPublicLicense10"))
104 "http://directory.fsf.org/wiki/License:EPLv1.0"
105 "https://www.gnu.org/licenses/license-list#EPL"))
109 "http://directory.fsf.org/wiki/License:Expat"
110 "https://www.gnu.org/licenses/license-list.html#Expat"))
114 "https://www.gnu.org/licenses/old-licenses/gpl-1.0.html"
119 "https://www.gnu.org/licenses/old-licenses/gpl-1.0.html"
124 "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
125 "https://www.gnu.org/licenses/license-list#GPLv2"))
129 "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
130 "https://www.gnu.org/licenses/license-list#GPLv2"))
134 "https://www.gnu.org/licenses/gpl.html"
135 "https://www.gnu.org/licenses/license-list#GNUGPLv3"))
139 "https://www.gnu.org/licenses/gpl.html"
140 "https://www.gnu.org/licenses/license-list#GNUGPLv3"))
144 "http://directory.fsf.org/wiki/License:JPEG"
145 "https://www.gnu.org/licenses/license-list#ijg"))
149 "http://directory.fsf.org/wiki/License:IBMPLv1.0"
150 "https://www.gnu.org/licenses/license-list#IBMPL"))
154 "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html"
155 "https://www.gnu.org/licenses/why-not-lgpl.html"))
159 "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html"
160 "https://www.gnu.org/licenses/why-not-lgpl.html"))
164 "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
165 "https://www.gnu.org/licenses/license-list#LGPLv2.1"))
169 "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
170 "https://www.gnu.org/licenses/license-list#LGPLv2.1"))
174 "https://www.gnu.org/licenses/lgpl.html"
175 "https://www.gnu.org/licenses/license-list#LGPLv3"))
179 "https://www.gnu.org/licenses/lgpl.html"
180 "https://www.gnu.org/licenses/license-list#LGPLv3"))
184 "http://directory.fsf.org/wiki/License:MPLv2.0"
185 "https://www.gnu.org/licenses/license-list#MPL-2.0"))
189 "http://directory.fsf.org/wiki/License:OpenSSL"
190 "https://www.gnu.org/licenses/license-list#OpenSSL"))
192 (define public-domain
193 (license "Public Domain"
194 "http://directory.fsf.org/wiki/License:PublicDomain"
195 "https://www.gnu.org/licenses/license-list#PublicDomain"))
199 "http://directory.fsf.org/wiki/License:X11"
200 "https://www.gnu.org/licenses/license-list#X11License"))
204 "http://www.gzip.org/zlib/zlib_license.html"
205 "https://www.gnu.org/licenses/license-list#ZLib"))
207 ;;; licenses.scm ends here