licenses: Add 'openldap2.8'.
[jackhill/guix/guix.git] / guix / licenses.scm
CommitLineData
233e7676
LC
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2012 Ludovic Courtès <ludo@gnu.org>
1ca98280 3;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
233e7676 4;;; Copyright © 2012 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
24 asl2.0
25 boost1.0
f15b31c5 26 bsd-2 bsd-3 bsd-4 bsd-style
838d78e3
NK
27 cddl1.0
28 cpl1.0
29 epl1.0
f15b31c5
NK
30 expat
31 gpl1 gpl1+ gpl2 gpl2+ gpl3 gpl3+
838d78e3
NK
32 ijg
33 ibmpl1.0
f15b31c5 34 lgpl2.0 lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3 lgpl3+
838d78e3 35 mpl2.0
1ca98280 36 openldap2.8 openssl
838d78e3
NK
37 public-domain
38 x11
39 zlib))
40
41(define-record-type <license>
42 (license name uri comment)
43 license?
44 (name license-name)
45 (uri license-uri)
46 (comment license-comment))
47
48;;; Commentary:
49;;;
50;;; Available licenses.
51;;;
52;;; This list is based on these links:
53;;; https://github.com/NixOS/nixpkgs/blob/master/pkgs/lib/licenses.nix
54;;; https://www.gnu.org/licenses/license-list
55;;;
56;;; Code:
57
58(define asl2.0
59 (license "ASL 2.0"
60 "http://directory.fsf.org/wiki/License:Apache2.0"
61 "https://www.gnu.org/licenses/license-list#apache2"))
62
63(define boost1.0
64 (license "Boost 1.0"
65 "http://directory.fsf.org/wiki/License:Boost1.0"
66 "https://www.gnu.org/licenses/license-list#boost"))
67
68(define bsd-2
69 (license "FreeBSD"
70 "http://directory.fsf.org/wiki/License:FreeBSD"
71 "https://www.gnu.org/licenses/license-list#FreeBSD"))
72
73(define bsd-3
74 (license "Modified BSD"
75 "http://directory.fsf.org/wiki/License:BSD_3Clause"
76 "https://www.gnu.org/licenses/license-list#ModifiedBSD"))
77
78(define bsd-4
79 (license "Original BSD"
80 "http://directory.fsf.org/wiki/License:BSD_4Clause"
81 "https://www.gnu.org/licenses/license-list#OriginalBSD"))
82
f15b31c5
NK
83(define* (bsd-style uri #:optional (comment ""))
84 "Return a BSD-style license, whose full text can be found at URI,
85which may be a file:// URI pointing the package's tree."
86 (license "BSD-style"
87 uri
88 (string-append
89 "This is a BSD-style, non-copyleft free software license. "
90 "Check the URI for details. "
91 comment)))
92
838d78e3
NK
93(define cddl1.0
94 (license "CDDL 1.0"
95 "http://directory.fsf.org/wiki/License:CDDLv1.0"
96 "https://www.gnu.org/licenses/license-list#CDDL"))
97
98(define cpl1.0
99 (license "CPL 1.0"
100 "http://directory.fsf.org/wiki/License:CPLv1.0"
101 "https://www.gnu.org/licenses/license-list#CommonPublicLicense10"))
102
103(define epl1.0
104 (license "EPL 1.0"
105 "http://directory.fsf.org/wiki/License:EPLv1.0"
106 "https://www.gnu.org/licenses/license-list#EPL"))
107
f15b31c5
NK
108(define expat
109 (license "Expat"
110 "http://directory.fsf.org/wiki/License:Expat"
111 "https://www.gnu.org/licenses/license-list.html#Expat"))
112
113(define gpl1
114 (license "GPL 1"
115 "https://www.gnu.org/licenses/old-licenses/gpl-1.0.html"
116 #f))
117
118(define gpl1+
119 (license "GPL 1+"
120 "https://www.gnu.org/licenses/old-licenses/gpl-1.0.html"
121 #f))
122
838d78e3
NK
123(define gpl2
124 (license "GPL 2"
125 "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
126 "https://www.gnu.org/licenses/license-list#GPLv2"))
127
128(define gpl2+
129 (license "GPL 2+"
130 "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
131 "https://www.gnu.org/licenses/license-list#GPLv2"))
132
133(define gpl3
134 (license "GPL 3"
135 "https://www.gnu.org/licenses/gpl.html"
136 "https://www.gnu.org/licenses/license-list#GNUGPLv3"))
137
138(define gpl3+
139 (license "GPL 3+"
140 "https://www.gnu.org/licenses/gpl.html"
141 "https://www.gnu.org/licenses/license-list#GNUGPLv3"))
142
143(define ijg
144 (license "IJG"
145 "http://directory.fsf.org/wiki/License:JPEG"
146 "https://www.gnu.org/licenses/license-list#ijg"))
147
148(define ibmpl1.0
149 (license "IBMPL 1.0"
150 "http://directory.fsf.org/wiki/License:IBMPLv1.0"
151 "https://www.gnu.org/licenses/license-list#IBMPL"))
152
f15b31c5
NK
153(define lgpl2.0
154 (license "LGPL 2.0"
155 "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html"
156 "https://www.gnu.org/licenses/why-not-lgpl.html"))
157
158(define lgpl2.0+
159 (license "LGPL 2.0+"
160 "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html"
161 "https://www.gnu.org/licenses/why-not-lgpl.html"))
162
838d78e3
NK
163(define lgpl2.1
164 (license "LGPL 2.1"
165 "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
166 "https://www.gnu.org/licenses/license-list#LGPLv2.1"))
167
168(define lgpl2.1+
169 (license "LGPL 2.1+"
170 "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
171 "https://www.gnu.org/licenses/license-list#LGPLv2.1"))
172
173(define lgpl3
174 (license "LGPL 3"
175 "https://www.gnu.org/licenses/lgpl.html"
176 "https://www.gnu.org/licenses/license-list#LGPLv3"))
177
178(define lgpl3+
179 (license "LGPL 3+"
180 "https://www.gnu.org/licenses/lgpl.html"
181 "https://www.gnu.org/licenses/license-list#LGPLv3"))
182
183(define mpl2.0
184 (license "MPL 2.0"
185 "http://directory.fsf.org/wiki/License:MPLv2.0"
186 "https://www.gnu.org/licenses/license-list#MPL-2.0"))
187
188(define openssl
189 (license "OpenSSL"
190 "http://directory.fsf.org/wiki/License:OpenSSL"
191 "https://www.gnu.org/licenses/license-list#OpenSSL"))
192
1ca98280
AE
193(define openldap2.8
194 (license "OpenLDAPv2.8"
195 "http://directory.fsf.org/wiki/License:OpenLDAPv2.8"
196 "https://www.gnu.org/licenses/license-list#newOpenLDAP"))
197 ;; lists OpenLDAPv2.7, which is virtually identical
198
838d78e3
NK
199(define public-domain
200 (license "Public Domain"
201 "http://directory.fsf.org/wiki/License:PublicDomain"
202 "https://www.gnu.org/licenses/license-list#PublicDomain"))
203
204(define x11
205 (license "X11"
206 "http://directory.fsf.org/wiki/License:X11"
207 "https://www.gnu.org/licenses/license-list#X11License"))
208
209(define zlib
210 (license "Zlib"
211 "http://www.gzip.org/zlib/zlib_license.html"
212 "https://www.gnu.org/licenses/license-list#ZLib"))
213
214;;; licenses.scm ends here