Add (guix licenses).
[jackhill/guix/guix.git] / guix / licenses.scm
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
25 bsd-2 bsd-3 bsd-4
26 cddl1.0
27 cpl1.0
28 epl1.0
29 gpl2 gpl2+ gpl3 gpl3+
30 ijg
31 ibmpl1.0
32 lgpl2.1 lgpl2.1+ lgpl3 lgpl3+
33 mpl2.0
34 openssl
35 public-domain
36 x11
37 zlib))
38
39 (define-record-type <license>
40 (license name uri comment)
41 license?
42 (name license-name)
43 (uri license-uri)
44 (comment license-comment))
45
46 ;;; Commentary:
47 ;;;
48 ;;; Available licenses.
49 ;;;
50 ;;; This list is based on these links:
51 ;;; https://github.com/NixOS/nixpkgs/blob/master/pkgs/lib/licenses.nix
52 ;;; https://www.gnu.org/licenses/license-list
53 ;;;
54 ;;; Code:
55
56 (define asl2.0
57 (license "ASL 2.0"
58 "http://directory.fsf.org/wiki/License:Apache2.0"
59 "https://www.gnu.org/licenses/license-list#apache2"))
60
61 (define boost1.0
62 (license "Boost 1.0"
63 "http://directory.fsf.org/wiki/License:Boost1.0"
64 "https://www.gnu.org/licenses/license-list#boost"))
65
66 (define bsd-2
67 (license "FreeBSD"
68 "http://directory.fsf.org/wiki/License:FreeBSD"
69 "https://www.gnu.org/licenses/license-list#FreeBSD"))
70
71 (define bsd-3
72 (license "Modified BSD"
73 "http://directory.fsf.org/wiki/License:BSD_3Clause"
74 "https://www.gnu.org/licenses/license-list#ModifiedBSD"))
75
76 (define bsd-4
77 (license "Original BSD"
78 "http://directory.fsf.org/wiki/License:BSD_4Clause"
79 "https://www.gnu.org/licenses/license-list#OriginalBSD"))
80
81 (define cddl1.0
82 (license "CDDL 1.0"
83 "http://directory.fsf.org/wiki/License:CDDLv1.0"
84 "https://www.gnu.org/licenses/license-list#CDDL"))
85
86 (define cpl1.0
87 (license "CPL 1.0"
88 "http://directory.fsf.org/wiki/License:CPLv1.0"
89 "https://www.gnu.org/licenses/license-list#CommonPublicLicense10"))
90
91 (define epl1.0
92 (license "EPL 1.0"
93 "http://directory.fsf.org/wiki/License:EPLv1.0"
94 "https://www.gnu.org/licenses/license-list#EPL"))
95
96 (define gpl2
97 (license "GPL 2"
98 "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
99 "https://www.gnu.org/licenses/license-list#GPLv2"))
100
101 (define gpl2+
102 (license "GPL 2+"
103 "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
104 "https://www.gnu.org/licenses/license-list#GPLv2"))
105
106 (define gpl3
107 (license "GPL 3"
108 "https://www.gnu.org/licenses/gpl.html"
109 "https://www.gnu.org/licenses/license-list#GNUGPLv3"))
110
111 (define gpl3+
112 (license "GPL 3+"
113 "https://www.gnu.org/licenses/gpl.html"
114 "https://www.gnu.org/licenses/license-list#GNUGPLv3"))
115
116 (define ijg
117 (license "IJG"
118 "http://directory.fsf.org/wiki/License:JPEG"
119 "https://www.gnu.org/licenses/license-list#ijg"))
120
121 (define ibmpl1.0
122 (license "IBMPL 1.0"
123 "http://directory.fsf.org/wiki/License:IBMPLv1.0"
124 "https://www.gnu.org/licenses/license-list#IBMPL"))
125
126 (define lgpl2.1
127 (license "LGPL 2.1"
128 "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
129 "https://www.gnu.org/licenses/license-list#LGPLv2.1"))
130
131 (define lgpl2.1+
132 (license "LGPL 2.1+"
133 "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
134 "https://www.gnu.org/licenses/license-list#LGPLv2.1"))
135
136 (define lgpl3
137 (license "LGPL 3"
138 "https://www.gnu.org/licenses/lgpl.html"
139 "https://www.gnu.org/licenses/license-list#LGPLv3"))
140
141 (define lgpl3+
142 (license "LGPL 3+"
143 "https://www.gnu.org/licenses/lgpl.html"
144 "https://www.gnu.org/licenses/license-list#LGPLv3"))
145
146 (define mpl2.0
147 (license "MPL 2.0"
148 "http://directory.fsf.org/wiki/License:MPLv2.0"
149 "https://www.gnu.org/licenses/license-list#MPL-2.0"))
150
151 (define openssl
152 (license "OpenSSL"
153 "http://directory.fsf.org/wiki/License:OpenSSL"
154 "https://www.gnu.org/licenses/license-list#OpenSSL"))
155
156 (define public-domain
157 (license "Public Domain"
158 "http://directory.fsf.org/wiki/License:PublicDomain"
159 "https://www.gnu.org/licenses/license-list#PublicDomain"))
160
161 (define x11
162 (license "X11"
163 "http://directory.fsf.org/wiki/License:X11"
164 "https://www.gnu.org/licenses/license-list#X11License"))
165
166 (define zlib
167 (license "Zlib"
168 "http://www.gzip.org/zlib/zlib_license.html"
169 "https://www.gnu.org/licenses/license-list#ZLib"))
170
171 ;;; licenses.scm ends here