| 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2012, 2014, 2015 Ludovic Courtès <ludo@gnu.org> |
| 3 | ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr> |
| 4 | ;;; Copyright © 2012, 2013 Nikita Karetnikov <nikita@karetnikov.org> |
| 5 | ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> |
| 6 | ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net> |
| 7 | ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org> |
| 8 | ;;; Copyright © 2016 Leo Famulari <leo@famulari.name> |
| 9 | ;;; |
| 10 | ;;; This file is part of GNU Guix. |
| 11 | ;;; |
| 12 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 13 | ;;; under the terms of the GNU General Public License as published by |
| 14 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
| 15 | ;;; your option) any later version. |
| 16 | ;;; |
| 17 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 18 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 | ;;; GNU General Public License for more details. |
| 21 | ;;; |
| 22 | ;;; You should have received a copy of the GNU General Public License |
| 23 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 24 | |
| 25 | (define-module (guix licenses) |
| 26 | #:use-module (srfi srfi-9) |
| 27 | #:export (license? license-name license-uri license-comment |
| 28 | agpl3 agpl3+ |
| 29 | asl2.0 |
| 30 | boost1.0 |
| 31 | bsd-2 bsd-3 bsd-4 |
| 32 | non-copyleft |
| 33 | bsd-style ;deprecated! |
| 34 | cc0 |
| 35 | cc-by-sa4.0 cc-by-sa3.0 cc-by3.0 |
| 36 | cddl1.0 |
| 37 | cecill-c |
| 38 | artistic2.0 clarified-artistic |
| 39 | copyleft-next |
| 40 | cpl1.0 |
| 41 | epl1.0 |
| 42 | expat |
| 43 | freetype |
| 44 | giftware |
| 45 | gpl1 gpl1+ gpl2 gpl2+ gpl3 gpl3+ |
| 46 | gfl1.0 |
| 47 | fdl1.3+ |
| 48 | opl1.0+ |
| 49 | isc |
| 50 | ijg |
| 51 | ibmpl1.0 |
| 52 | imlib2 |
| 53 | ipa |
| 54 | lgpl2.0 lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3 lgpl3+ |
| 55 | mpl1.0 mpl1.1 mpl2.0 |
| 56 | ms-pl |
| 57 | ncsa |
| 58 | openldap2.8 openssl |
| 59 | psfl public-domain |
| 60 | qpl |
| 61 | ruby |
| 62 | sgifreeb2.0 |
| 63 | silofl1.1 |
| 64 | sleepycat |
| 65 | unlicense |
| 66 | vim |
| 67 | x11 x11-style |
| 68 | zpl2.1 |
| 69 | zlib |
| 70 | fsf-free)) |
| 71 | |
| 72 | (define-record-type <license> |
| 73 | (license name uri comment) |
| 74 | license? |
| 75 | (name license-name) |
| 76 | (uri license-uri) |
| 77 | (comment license-comment)) |
| 78 | |
| 79 | ;;; Commentary: |
| 80 | ;;; |
| 81 | ;;; Available licenses. |
| 82 | ;;; |
| 83 | ;;; This list is based on these links: |
| 84 | ;;; https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix |
| 85 | ;;; https://www.gnu.org/licenses/license-list |
| 86 | ;;; |
| 87 | ;;; Code: |
| 88 | |
| 89 | (define agpl3 |
| 90 | (license "AGPL 3" |
| 91 | "https://gnu.org/licenses/agpl.html" |
| 92 | "https://gnu.org/licenses/why-affero-gpl.html")) |
| 93 | |
| 94 | (define agpl3+ |
| 95 | (license "AGPL 3+" |
| 96 | "https://gnu.org/licenses/agpl.html" |
| 97 | "https://gnu.org/licenses/why-affero-gpl.html")) |
| 98 | |
| 99 | (define asl2.0 |
| 100 | (license "ASL 2.0" |
| 101 | "http://directory.fsf.org/wiki/License:Apache2.0" |
| 102 | "https://www.gnu.org/licenses/license-list#apache2")) |
| 103 | |
| 104 | (define boost1.0 |
| 105 | (license "Boost 1.0" |
| 106 | "http://directory.fsf.org/wiki/License:Boost1.0" |
| 107 | "https://www.gnu.org/licenses/license-list#boost")) |
| 108 | |
| 109 | (define bsd-2 |
| 110 | (license "FreeBSD" |
| 111 | "http://directory.fsf.org/wiki/License:FreeBSD" |
| 112 | "https://www.gnu.org/licenses/license-list#FreeBSD")) |
| 113 | |
| 114 | (define bsd-3 |
| 115 | (license "Modified BSD" |
| 116 | "http://directory.fsf.org/wiki/License:BSD_3Clause" |
| 117 | "https://www.gnu.org/licenses/license-list#ModifiedBSD")) |
| 118 | |
| 119 | (define bsd-4 |
| 120 | (license "Original BSD" |
| 121 | "http://directory.fsf.org/wiki/License:BSD_4Clause" |
| 122 | "https://www.gnu.org/licenses/license-list#OriginalBSD")) |
| 123 | |
| 124 | (define* (non-copyleft uri #:optional (comment "")) |
| 125 | "Return a lax, permissive, non-copyleft license (for example a variant of |
| 126 | the 3-clause BSD license or the Expat license), whose full text can be found |
| 127 | at URI, which may be a file:// URI pointing the package's tree." |
| 128 | (license "non-copyleft" |
| 129 | uri |
| 130 | (string-append |
| 131 | "This is a lax, non-copyleft free software license. " |
| 132 | "Check the URI for details. " |
| 133 | comment))) |
| 134 | |
| 135 | (define bsd-style |
| 136 | ;; This alias is kept for backward-compatibility. Do not use it for new |
| 137 | ;; packages: it is ambiguous, as rightfully explained at |
| 138 | ;; <http://www.gnu.org/philosophy/words-to-avoid.html#BSD-style>. |
| 139 | non-copyleft) |
| 140 | |
| 141 | (define cc0 |
| 142 | (license "CC0" |
| 143 | "http://directory.fsf.org/wiki/License:CC0" |
| 144 | "http://www.gnu.org/licenses/license-list.html#CC0")) |
| 145 | |
| 146 | (define cc-by-sa4.0 |
| 147 | (license "CC-BY-SA 4.0" |
| 148 | "http://creativecommons.org/licenses/by-sa/4.0/" |
| 149 | "Creative Commons Attribution-ShareAlike 4.0 International")) |
| 150 | |
| 151 | (define cc-by-sa3.0 |
| 152 | (license "CC-BY-SA 3.0" |
| 153 | "http://creativecommons.org/licenses/by-sa/3.0/" |
| 154 | "Creative Commons Attribution-ShareAlike 3.0 Unported")) |
| 155 | |
| 156 | (define cc-by3.0 |
| 157 | (license "CC-BY 3.0" |
| 158 | "http://creativecommons.org/licenses/by/3.0/" |
| 159 | "Creative Commons Attribution 3.0 Unported")) |
| 160 | |
| 161 | (define cddl1.0 |
| 162 | (license "CDDL 1.0" |
| 163 | "http://directory.fsf.org/wiki/License:CDDLv1.0" |
| 164 | "https://www.gnu.org/licenses/license-list#CDDL")) |
| 165 | |
| 166 | (define cecill-c |
| 167 | (license "CeCILL-C" |
| 168 | "http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html" |
| 169 | "https://www.gnu.org/licenses/license-list.html#CeCILL")) |
| 170 | |
| 171 | (define artistic2.0 |
| 172 | (license "Artistic License 2.0" |
| 173 | "http://www.perlfoundation.org/artistic_license_2_0" |
| 174 | "http://www.gnu.org/licenses/license-list.html#ArtisticLicense2")) |
| 175 | |
| 176 | (define clarified-artistic |
| 177 | (license "Clarified Artistic" |
| 178 | ;; http://directory.fsf.org/wiki/User:Jgay/license-categorization#Clarified_Artistic_License |
| 179 | "http://gianluca.dellavedova.org/2011/01/03/clarified-artistic-license/" |
| 180 | "https://www.gnu.org/licenses/license-list.html#ArtisticLicense2")) |
| 181 | |
| 182 | (define copyleft-next |
| 183 | (license "copyleft-next" |
| 184 | "https://raw.github.com/richardfontana/copyleft-next/master/Releases/copyleft-next-0.3.0" |
| 185 | "GPL-compatible copyleft license")) |
| 186 | |
| 187 | (define cpl1.0 |
| 188 | (license "CPL 1.0" |
| 189 | "http://directory.fsf.org/wiki/License:CPLv1.0" |
| 190 | "https://www.gnu.org/licenses/license-list#CommonPublicLicense10")) |
| 191 | |
| 192 | (define epl1.0 |
| 193 | (license "EPL 1.0" |
| 194 | "http://directory.fsf.org/wiki/License:EPLv1.0" |
| 195 | "https://www.gnu.org/licenses/license-list#EPL")) |
| 196 | |
| 197 | (define expat |
| 198 | (license "Expat" |
| 199 | "http://directory.fsf.org/wiki/License:Expat" |
| 200 | "https://www.gnu.org/licenses/license-list.html#Expat")) |
| 201 | |
| 202 | (define freetype |
| 203 | (license "Freetype" |
| 204 | "http://directory.fsf.org/wiki/License:Freetype" |
| 205 | "https://www.gnu.org/licenses/license-list.html#freetype")) |
| 206 | |
| 207 | (define giftware |
| 208 | (license "Giftware" |
| 209 | "http://liballeg.org/license.html" |
| 210 | "The Allegro 4 license")) |
| 211 | |
| 212 | (define gpl1 |
| 213 | (license "GPL 1" |
| 214 | "https://www.gnu.org/licenses/old-licenses/gpl-1.0.html" |
| 215 | #f)) |
| 216 | |
| 217 | (define gpl1+ |
| 218 | (license "GPL 1+" |
| 219 | "https://www.gnu.org/licenses/old-licenses/gpl-1.0.html" |
| 220 | #f)) |
| 221 | |
| 222 | (define gpl2 |
| 223 | (license "GPL 2" |
| 224 | "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html" |
| 225 | "https://www.gnu.org/licenses/license-list#GPLv2")) |
| 226 | |
| 227 | (define gpl2+ |
| 228 | (license "GPL 2+" |
| 229 | "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html" |
| 230 | "https://www.gnu.org/licenses/license-list#GPLv2")) |
| 231 | |
| 232 | (define gpl3 |
| 233 | (license "GPL 3" |
| 234 | "https://www.gnu.org/licenses/gpl.html" |
| 235 | "https://www.gnu.org/licenses/license-list#GNUGPLv3")) |
| 236 | |
| 237 | (define gpl3+ |
| 238 | (license "GPL 3+" |
| 239 | "https://www.gnu.org/licenses/gpl.html" |
| 240 | "https://www.gnu.org/licenses/license-list#GNUGPLv3")) |
| 241 | |
| 242 | ;; The “GUST font license” is legally equivalent to LPPL v1.3c as it only |
| 243 | ;; extends the LPPL with an optional request. |
| 244 | (define gfl1.0 |
| 245 | (license "GUST font license 1.0" |
| 246 | "http://www.gust.org.pl/projects/e-foundry/licenses/GUST-FONT-LICENSE.txt" |
| 247 | "https://www.gnu.org/licenses/license-list#LPPL-1.3a")) |
| 248 | |
| 249 | (define fdl1.3+ |
| 250 | (license "FDL 1.3+" |
| 251 | "https://www.gnu.org/licenses/fdl.html" |
| 252 | "https://www.gnu.org/licenses/license-list#FDL")) |
| 253 | |
| 254 | (define opl1.0+ |
| 255 | (license "Open Publication License 1.0 or later" |
| 256 | "http://opencontent.org/openpub/" |
| 257 | "https://www.gnu.org/licenses/license-list#OpenPublicationL")) |
| 258 | |
| 259 | (define isc |
| 260 | (license "ISC" |
| 261 | "http://directory.fsf.org/wiki/License:ISC" |
| 262 | "https://www.gnu.org/licenses/license-list.html#ISC")) |
| 263 | |
| 264 | (define ijg |
| 265 | (license "IJG" |
| 266 | "http://directory.fsf.org/wiki/License:JPEG" |
| 267 | "https://www.gnu.org/licenses/license-list#ijg")) |
| 268 | |
| 269 | (define ibmpl1.0 |
| 270 | (license "IBMPL 1.0" |
| 271 | "http://directory.fsf.org/wiki/License:IBMPLv1.0" |
| 272 | "https://www.gnu.org/licenses/license-list#IBMPL")) |
| 273 | |
| 274 | (define imlib2 |
| 275 | (license "Imlib2" |
| 276 | "http://directory.fsf.org/wiki/License:Imlib2" |
| 277 | "https://www.gnu.org/licenses/license-list#imlib")) |
| 278 | |
| 279 | (define ipa |
| 280 | (license "IPA Font License" |
| 281 | "http://directory.fsf.org/wiki/License:IPA_Font_License" |
| 282 | "https://www.gnu.org/licenses/license-list#IPAFONT")) |
| 283 | |
| 284 | (define lgpl2.0 |
| 285 | (license "LGPL 2.0" |
| 286 | "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html" |
| 287 | "https://www.gnu.org/licenses/why-not-lgpl.html")) |
| 288 | |
| 289 | (define lgpl2.0+ |
| 290 | (license "LGPL 2.0+" |
| 291 | "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html" |
| 292 | "https://www.gnu.org/licenses/why-not-lgpl.html")) |
| 293 | |
| 294 | (define lgpl2.1 |
| 295 | (license "LGPL 2.1" |
| 296 | "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html" |
| 297 | "https://www.gnu.org/licenses/license-list#LGPLv2.1")) |
| 298 | |
| 299 | (define lgpl2.1+ |
| 300 | (license "LGPL 2.1+" |
| 301 | "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html" |
| 302 | "https://www.gnu.org/licenses/license-list#LGPLv2.1")) |
| 303 | |
| 304 | (define lgpl3 |
| 305 | (license "LGPL 3" |
| 306 | "https://www.gnu.org/licenses/lgpl.html" |
| 307 | "https://www.gnu.org/licenses/license-list#LGPLv3")) |
| 308 | |
| 309 | (define lgpl3+ |
| 310 | (license "LGPL 3+" |
| 311 | "https://www.gnu.org/licenses/lgpl.html" |
| 312 | "https://www.gnu.org/licenses/license-list#LGPLv3")) |
| 313 | |
| 314 | (define mpl1.0 |
| 315 | (license "MPL 1.0" |
| 316 | "http://www.mozilla.org/MPL/1.0/" |
| 317 | "https://www.gnu.org/licenses/license-list.html#MPL")) |
| 318 | |
| 319 | (define mpl1.1 |
| 320 | (license "MPL 1.1" |
| 321 | "http://directory.fsf.org/wiki/License:MPLv1.1" |
| 322 | "https://www.gnu.org/licenses/license-list#MPL")) |
| 323 | |
| 324 | (define mpl2.0 |
| 325 | (license "MPL 2.0" |
| 326 | "http://directory.fsf.org/wiki/License:MPLv2.0" |
| 327 | "https://www.gnu.org/licenses/license-list#MPL-2.0")) |
| 328 | |
| 329 | (define ms-pl |
| 330 | (license "Ms-PL" ;Microsoft Public License |
| 331 | "http://directory.fsf.org/wiki/License:MsPL" |
| 332 | "http://www.gnu.org/licenses/license-list.html#ms-pl")) |
| 333 | |
| 334 | (define ncsa |
| 335 | (license "NCSA/University of Illinois Open Source License" |
| 336 | "http://directory.fsf.org/wiki/License:IllinoisNCSA" |
| 337 | "https://www.gnu.org/licenses/license-list#NCSA")) |
| 338 | |
| 339 | (define openssl |
| 340 | (license "OpenSSL" |
| 341 | "http://directory.fsf.org/wiki/License:OpenSSL" |
| 342 | "https://www.gnu.org/licenses/license-list#OpenSSL")) |
| 343 | |
| 344 | (define openldap2.8 |
| 345 | (license "OpenLDAPv2.8" |
| 346 | "http://directory.fsf.org/wiki/License:OpenLDAPv2.8" |
| 347 | "https://www.gnu.org/licenses/license-list#newOpenLDAP")) |
| 348 | ;; lists OpenLDAPv2.7, which is virtually identical |
| 349 | |
| 350 | (define psfl |
| 351 | (license "Python Software Foundation License" |
| 352 | "http://docs.python.org/license.html" |
| 353 | #f)) |
| 354 | |
| 355 | (define public-domain |
| 356 | (license "Public Domain" |
| 357 | "http://directory.fsf.org/wiki/License:PublicDomain" |
| 358 | "https://www.gnu.org/licenses/license-list#PublicDomain")) |
| 359 | |
| 360 | (define qpl |
| 361 | (license "QPL" |
| 362 | "http://directory.fsf.org/wiki/License:QPLv1.0" |
| 363 | "http://www.gnu.org/licenses/license-list.html#QPL")) |
| 364 | |
| 365 | (define ruby |
| 366 | (license "Ruby License" |
| 367 | "http://directory.fsf.org/wiki/License:Ruby" |
| 368 | "https://www.ruby-lang.org/en/about/license.txt")) |
| 369 | |
| 370 | (define sgifreeb2.0 |
| 371 | (license "SGI Free Software License B, version 2.0" |
| 372 | "http://directory.fsf.org/wiki/License:SGIFreeBv2" |
| 373 | "https://www.gnu.org/licenses/license-list.html#SGIFreeB")) |
| 374 | |
| 375 | (define silofl1.1 |
| 376 | (license "SIL OFL 1.1" |
| 377 | "http://scripts.sil.org/OFL_web" |
| 378 | "https://www.gnu.org/licenses/license-list#SILOFL")) |
| 379 | |
| 380 | (define sleepycat |
| 381 | (license "Sleepycat" |
| 382 | "http://directory.fsf.org/wiki/License:Sleepycat" |
| 383 | "https://www.gnu.org/licenses/license-list#BerkeleyDB")) |
| 384 | |
| 385 | (define vim |
| 386 | (license "Vim" |
| 387 | "http://directory.fsf.org/wiki/License:Vim7.2" |
| 388 | "http://www.gnu.org/licenses/license-list.html#Vim")) |
| 389 | |
| 390 | (define unlicense |
| 391 | (license "Unlicense" |
| 392 | "https://unlicense.org/" |
| 393 | "https://www.gnu.org/licenses/license-list.html#Unlicense")) |
| 394 | |
| 395 | (define x11 |
| 396 | (license "X11" |
| 397 | "http://directory.fsf.org/wiki/License:X11" |
| 398 | "https://www.gnu.org/licenses/license-list#X11License")) |
| 399 | |
| 400 | (define* (x11-style uri #:optional (comment "")) |
| 401 | "Return an X11-style license, whose full text can be found at URI, |
| 402 | which may be a file:// URI pointing the package's tree." |
| 403 | (license "X11-style" |
| 404 | uri |
| 405 | (string-append |
| 406 | "This is an X11-style, non-copyleft free software license. " |
| 407 | "Check the URI for details. " |
| 408 | comment))) |
| 409 | |
| 410 | (define zpl2.1 |
| 411 | (license "Zope Public License 2.1" |
| 412 | "http://directory.fsf.org/wiki?title=License:ZopePLv2.1" |
| 413 | "https://www.gnu.org/licenses/license-list.html#Zope2.0")) |
| 414 | |
| 415 | (define zlib |
| 416 | (license "Zlib" |
| 417 | "http://www.gzip.org/zlib/zlib_license.html" |
| 418 | "https://www.gnu.org/licenses/license-list#ZLib")) |
| 419 | |
| 420 | (define* (fsf-free uri #:optional (comment "")) |
| 421 | "Return a license that does not fit any of the ones above or a collection |
| 422 | of licenses, approved as free by the FSF. More details can be found at URI." |
| 423 | (license "FSF-free" |
| 424 | uri |
| 425 | comment)) |
| 426 | |
| 427 | ;;; licenses.scm ends here |