Commit | Line | Data |
---|---|---|
838d78e3 NK |
1 | ;;; Guix --- Nix package management from Guile. -*- coding: utf-8 -*- |
2 | ;;; Copyright (C) 2012 Ludovic Courtès <ludo@gnu.org> | |
3 | ;;; Copyright (C) 2012 Nikita Karetnikov <nikita@karetnikov.org> | |
4 | ;;; | |
5 | ;;; This file is part of Guix. | |
6 | ;;; | |
7 | ;;; 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. | |
11 | ;;; | |
12 | ;;; 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. | |
16 | ;;; | |
17 | ;;; You should have received a copy of the GNU General Public License | |
18 | ;;; along with Guix. If not, see <http://www.gnu.org/licenses/>. | |
19 | ||
20 | (define-module (guix licenses) | |
21 | #:use-module (srfi srfi-9) | |
22 | #:export (license? license-name license-uri license-comment | |
23 | asl2.0 | |
24 | boost1.0 | |
f15b31c5 | 25 | bsd-2 bsd-3 bsd-4 bsd-style |
838d78e3 NK |
26 | cddl1.0 |
27 | cpl1.0 | |
28 | epl1.0 | |
f15b31c5 NK |
29 | expat |
30 | gpl1 gpl1+ gpl2 gpl2+ gpl3 gpl3+ | |
838d78e3 NK |
31 | ijg |
32 | ibmpl1.0 | |
f15b31c5 | 33 | lgpl2.0 lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3 lgpl3+ |
838d78e3 NK |
34 | mpl2.0 |
35 | openssl | |
36 | public-domain | |
37 | x11 | |
38 | zlib)) | |
39 | ||
40 | (define-record-type <license> | |
41 | (license name uri comment) | |
42 | license? | |
43 | (name license-name) | |
44 | (uri license-uri) | |
45 | (comment license-comment)) | |
46 | ||
47 | ;;; Commentary: | |
48 | ;;; | |
49 | ;;; Available licenses. | |
50 | ;;; | |
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 | |
54 | ;;; | |
55 | ;;; Code: | |
56 | ||
57 | (define asl2.0 | |
58 | (license "ASL 2.0" | |
59 | "http://directory.fsf.org/wiki/License:Apache2.0" | |
60 | "https://www.gnu.org/licenses/license-list#apache2")) | |
61 | ||
62 | (define boost1.0 | |
63 | (license "Boost 1.0" | |
64 | "http://directory.fsf.org/wiki/License:Boost1.0" | |
65 | "https://www.gnu.org/licenses/license-list#boost")) | |
66 | ||
67 | (define bsd-2 | |
68 | (license "FreeBSD" | |
69 | "http://directory.fsf.org/wiki/License:FreeBSD" | |
70 | "https://www.gnu.org/licenses/license-list#FreeBSD")) | |
71 | ||
72 | (define bsd-3 | |
73 | (license "Modified BSD" | |
74 | "http://directory.fsf.org/wiki/License:BSD_3Clause" | |
75 | "https://www.gnu.org/licenses/license-list#ModifiedBSD")) | |
76 | ||
77 | (define bsd-4 | |
78 | (license "Original BSD" | |
79 | "http://directory.fsf.org/wiki/License:BSD_4Clause" | |
80 | "https://www.gnu.org/licenses/license-list#OriginalBSD")) | |
81 | ||
f15b31c5 NK |
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." | |
85 | (license "BSD-style" | |
86 | uri | |
87 | (string-append | |
88 | "This is a BSD-style, non-copyleft free software license. " | |
89 | "Check the URI for details. " | |
90 | comment))) | |
91 | ||
838d78e3 NK |
92 | (define cddl1.0 |
93 | (license "CDDL 1.0" | |
94 | "http://directory.fsf.org/wiki/License:CDDLv1.0" | |
95 | "https://www.gnu.org/licenses/license-list#CDDL")) | |
96 | ||
97 | (define cpl1.0 | |
98 | (license "CPL 1.0" | |
99 | "http://directory.fsf.org/wiki/License:CPLv1.0" | |
100 | "https://www.gnu.org/licenses/license-list#CommonPublicLicense10")) | |
101 | ||
102 | (define epl1.0 | |
103 | (license "EPL 1.0" | |
104 | "http://directory.fsf.org/wiki/License:EPLv1.0" | |
105 | "https://www.gnu.org/licenses/license-list#EPL")) | |
106 | ||
f15b31c5 NK |
107 | (define expat |
108 | (license "Expat" | |
109 | "http://directory.fsf.org/wiki/License:Expat" | |
110 | "https://www.gnu.org/licenses/license-list.html#Expat")) | |
111 | ||
112 | (define gpl1 | |
113 | (license "GPL 1" | |
114 | "https://www.gnu.org/licenses/old-licenses/gpl-1.0.html" | |
115 | #f)) | |
116 | ||
117 | (define gpl1+ | |
118 | (license "GPL 1+" | |
119 | "https://www.gnu.org/licenses/old-licenses/gpl-1.0.html" | |
120 | #f)) | |
121 | ||
838d78e3 NK |
122 | (define gpl2 |
123 | (license "GPL 2" | |
124 | "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html" | |
125 | "https://www.gnu.org/licenses/license-list#GPLv2")) | |
126 | ||
127 | (define gpl2+ | |
128 | (license "GPL 2+" | |
129 | "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html" | |
130 | "https://www.gnu.org/licenses/license-list#GPLv2")) | |
131 | ||
132 | (define gpl3 | |
133 | (license "GPL 3" | |
134 | "https://www.gnu.org/licenses/gpl.html" | |
135 | "https://www.gnu.org/licenses/license-list#GNUGPLv3")) | |
136 | ||
137 | (define gpl3+ | |
138 | (license "GPL 3+" | |
139 | "https://www.gnu.org/licenses/gpl.html" | |
140 | "https://www.gnu.org/licenses/license-list#GNUGPLv3")) | |
141 | ||
142 | (define ijg | |
143 | (license "IJG" | |
144 | "http://directory.fsf.org/wiki/License:JPEG" | |
145 | "https://www.gnu.org/licenses/license-list#ijg")) | |
146 | ||
147 | (define ibmpl1.0 | |
148 | (license "IBMPL 1.0" | |
149 | "http://directory.fsf.org/wiki/License:IBMPLv1.0" | |
150 | "https://www.gnu.org/licenses/license-list#IBMPL")) | |
151 | ||
f15b31c5 NK |
152 | (define lgpl2.0 |
153 | (license "LGPL 2.0" | |
154 | "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html" | |
155 | "https://www.gnu.org/licenses/why-not-lgpl.html")) | |
156 | ||
157 | (define lgpl2.0+ | |
158 | (license "LGPL 2.0+" | |
159 | "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html" | |
160 | "https://www.gnu.org/licenses/why-not-lgpl.html")) | |
161 | ||
838d78e3 NK |
162 | (define lgpl2.1 |
163 | (license "LGPL 2.1" | |
164 | "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html" | |
165 | "https://www.gnu.org/licenses/license-list#LGPLv2.1")) | |
166 | ||
167 | (define lgpl2.1+ | |
168 | (license "LGPL 2.1+" | |
169 | "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html" | |
170 | "https://www.gnu.org/licenses/license-list#LGPLv2.1")) | |
171 | ||
172 | (define lgpl3 | |
173 | (license "LGPL 3" | |
174 | "https://www.gnu.org/licenses/lgpl.html" | |
175 | "https://www.gnu.org/licenses/license-list#LGPLv3")) | |
176 | ||
177 | (define lgpl3+ | |
178 | (license "LGPL 3+" | |
179 | "https://www.gnu.org/licenses/lgpl.html" | |
180 | "https://www.gnu.org/licenses/license-list#LGPLv3")) | |
181 | ||
182 | (define mpl2.0 | |
183 | (license "MPL 2.0" | |
184 | "http://directory.fsf.org/wiki/License:MPLv2.0" | |
185 | "https://www.gnu.org/licenses/license-list#MPL-2.0")) | |
186 | ||
187 | (define openssl | |
188 | (license "OpenSSL" | |
189 | "http://directory.fsf.org/wiki/License:OpenSSL" | |
190 | "https://www.gnu.org/licenses/license-list#OpenSSL")) | |
191 | ||
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")) | |
196 | ||
197 | (define x11 | |
198 | (license "X11" | |
199 | "http://directory.fsf.org/wiki/License:X11" | |
200 | "https://www.gnu.org/licenses/license-list#X11License")) | |
201 | ||
202 | (define zlib | |
203 | (license "Zlib" | |
204 | "http://www.gzip.org/zlib/zlib_license.html" | |
205 | "https://www.gnu.org/licenses/license-list#ZLib")) | |
206 | ||
207 | ;;; licenses.scm ends here |