1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2014, 2015, 2017, 2019, 2020 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, 2019 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
8 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
9 ;;; Copyright © 2016 Fabian Harfert <fhmgufs@web.de>
10 ;;; Copyright © 2016 Rene Saavedra <rennes@openmailbox.org>
11 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
12 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
13 ;;; Copyright © 2017 Petter <petter@mykolab.ch>
14 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
15 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
16 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
17 ;;; Copyright © 2020 André Batista <nandre@riseup.net>
18 ;;; Copyright © 2020 Helio Machado <0x2b3bfa0+guix@googlemail.com>
19 ;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
20 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
22 ;;; This file is part of GNU Guix.
24 ;;; GNU Guix is free software; you can redistribute it and/or modify it
25 ;;; under the terms of the GNU General Public License as published by
26 ;;; the Free Software Foundation; either version 3 of the License, or (at
27 ;;; your option) any later version.
29 ;;; GNU Guix is distributed in the hope that it will be useful, but
30 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
31 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 ;;; GNU General Public License for more details.
34 ;;; You should have received a copy of the GNU General Public License
35 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
37 (define-module (guix licenses)
38 #:use-module (srfi srfi-9)
39 #:export (license? license-name license-uri license-comment
44 bsd-0 bsd-1 bsd-2 bsd-3 bsd-4
47 cc-by2.0 cc-by3.0 cc-by4.0
48 cc-by-sa2.0 cc-by-sa3.0 cc-by-sa4.0
51 cecill cecill-b cecill-c
52 artistic2.0 clarified-artistic
63 gpl1 gpl1+ gpl2 gpl2+ gpl3 gpl3+
65 fdl1.1+ fdl1.2+ fdl1.3+
74 lgpl2.0 lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3 lgpl3+ llgpl
75 lppl lppl1.0+ lppl1.1+ lppl1.2 lppl1.2+
110 (define-record-type <license>
111 (license name uri comment)
115 (comment license-comment))
119 ;;; Available licenses.
121 ;;; This list is based on these links:
122 ;;; https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix
123 ;;; https://www.gnu.org/licenses/license-list
125 ;;; Please update spdx-string->license from guix/import/utils.scm
126 ;;; when modifying this list to avoid mismatches.
132 "https://gnu.org/licenses/agpl.html"
133 "https://gnu.org/licenses/why-affero-gpl.html"))
137 "https://gnu.org/licenses/agpl.html"
138 "https://gnu.org/licenses/why-affero-gpl.html"))
142 "https://gnu.org/licenses/agpl.html"
143 "https://gnu.org/licenses/why-affero-gpl.html"))
147 "https://directory.fsf.org/wiki/License:APSL-2.0"
148 "https://www.gnu.org/licenses/license-list.html#apsl2"))
152 "http://directory.fsf.org/wiki/License:Apache1.1"
153 "https://www.gnu.org/licenses/license-list#apache1"))
157 "http://directory.fsf.org/wiki/License:Apache2.0"
158 "https://www.gnu.org/licenses/license-list#apache2"))
162 "http://directory.fsf.org/wiki/License:Boost1.0"
163 "https://www.gnu.org/licenses/license-list#boost"))
166 (license "Zero-Clause BSD"
167 "https://spdx.org/licenses/0BSD.html"
168 "https://opensource.org/licenses/0BSD"))
171 (license "BSD 1-Clause"
172 "https://spdx.org/licenses/BSD-1-Clause.html"
173 "https://opensource.org/licenses/BSD-1-Clause"))
177 "http://directory.fsf.org/wiki/License:FreeBSD"
178 "https://www.gnu.org/licenses/license-list#FreeBSD"))
181 (license "Modified BSD"
182 "http://directory.fsf.org/wiki/License:BSD_3Clause"
183 "https://www.gnu.org/licenses/license-list#ModifiedBSD"))
186 (license "Original BSD"
187 "http://directory.fsf.org/wiki/License:BSD_4Clause"
188 "https://www.gnu.org/licenses/license-list#OriginalBSD"))
190 (define* (non-copyleft uri #:optional (comment ""))
191 "Return a lax, permissive, non-copyleft license (for example a variant of
192 the 3-clause BSD license or the Expat license), whose full text can be found
193 at URI, which may be a file:// URI pointing the package's tree."
194 (license "non-copyleft"
197 "This is a lax, non-copyleft free software license. "
198 "Check the URI for details. "
203 "http://directory.fsf.org/wiki/License:CC0"
204 "http://www.gnu.org/licenses/license-list.html#CC0"))
207 (license "CC-BY-SA 4.0"
208 "http://creativecommons.org/licenses/by-sa/4.0/"
209 "Creative Commons Attribution-ShareAlike 4.0 International"))
212 (license "CC-BY-SA 3.0"
213 "http://creativecommons.org/licenses/by-sa/3.0/"
214 "Creative Commons Attribution-ShareAlike 3.0 Unported"))
217 (license "CC-BY-SA 2.0"
218 "http://creativecommons.org/licenses/by-sa/2.0/"
219 "Creative Commons Attribution-ShareAlike 2.0 Generic"))
223 "http://creativecommons.org/licenses/by/4.0/"
224 "Creative Commons Attribution 4.0 Unported"))
228 "http://creativecommons.org/licenses/by/3.0/"
229 "Creative Commons Attribution 3.0 Unported"))
233 "http://creativecommons.org/licenses/by/2.0/"
234 "Creative Commons Attribution 2.0 Generic"))
236 (define cc-sampling-plus-1.0
237 (license "CC-Sampling+ 1.0"
238 "https://creativecommons.org/licenses/sampling+/1.0"
239 "Creative Commons Sampling Plus 1.0"))
243 "http://directory.fsf.org/wiki/License:CDDLv1.0"
244 "https://www.gnu.org/licenses/license-list#CDDL"))
246 ;; CDDL1.1 is the same as 1.0, except that "Sun Microsystems, Inc" becomes "Oracle",
247 ;; "LOST PROFITS" becoms "LOSS OF GOODWILL" and a section is added between 6.2
251 "https://oss.oracle.com/licenses/CDDL+GPL-1.1"
252 "https://www.gnu.org/licenses/license-list#CDDL"))
254 (define cecill ;copyleft
256 "http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.html"
257 "https://www.gnu.org/licenses/license-list.html#CeCILL"))
259 (define cecill-b ;non-copyleft
261 "http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html"
262 "https://www.gnu.org/licenses/license-list.html#CeCILL"))
264 (define cecill-c ;weak copyleft
266 "http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html"
267 "https://www.gnu.org/licenses/license-list.html#CeCILL"))
270 (license "Artistic License 2.0"
271 "http://www.perlfoundation.org/artistic_license_2_0"
272 "http://www.gnu.org/licenses/license-list.html#ArtisticLicense2"))
274 (define clarified-artistic
275 (license "Clarified Artistic"
276 ;; http://directory.fsf.org/wiki/User:Jgay/license-categorization#Clarified_Artistic_License
277 "http://gianluca.dellavedova.org/2011/01/03/clarified-artistic-license/"
278 "https://www.gnu.org/licenses/license-list.html#ArtisticLicense2"))
280 (define copyleft-next
281 (license "copyleft-next"
282 "https://raw.github.com/richardfontana/copyleft-next/master/Releases/copyleft-next-0.3.0"
283 "GPL-compatible copyleft license"))
287 "http://directory.fsf.org/wiki/License:CPLv1.0"
288 "https://www.gnu.org/licenses/license-list#CommonPublicLicense10"))
291 (license "CUA Office Public License v1.0"
292 "https://spdx.org/licenses/CUA-OPL-1.0.html"
293 "https://opensource.org/licenses/CUA-OPL-1.0"))
297 "http://directory.fsf.org/wiki/License:EDLv1.0"
298 "https://eclipse.org/org/documents/edl-v10.php"))
302 "http://directory.fsf.org/wiki/License:EPLv1.0"
303 "https://www.gnu.org/licenses/license-list#EPL"))
307 "https://www.eclipse.org/legal/epl-2.0/"
308 "https://www.gnu.org/licenses/license-list#EPL2"))
312 "http://directory.fsf.org/wiki/License:Expat"
313 "https://www.gnu.org/licenses/license-list.html#Expat"))
317 "http://directory.fsf.org/wiki/License:Freetype"
318 "https://www.gnu.org/licenses/license-list.html#freetype"))
322 "https://liballeg.org/license.html"
323 "The Allegro 4 license"))
327 "https://www.gnu.org/licenses/old-licenses/gpl-1.0.html"
332 "https://www.gnu.org/licenses/old-licenses/gpl-1.0.html"
337 "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
338 "https://www.gnu.org/licenses/license-list#GPLv2"))
342 "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
343 "https://www.gnu.org/licenses/license-list#GPLv2"))
347 "https://www.gnu.org/licenses/gpl.html"
348 "https://www.gnu.org/licenses/license-list#GNUGPLv3"))
352 "https://www.gnu.org/licenses/gpl.html"
353 "https://www.gnu.org/licenses/license-list#GNUGPLv3"))
355 ;; The “GUST font license” is legally equivalent to LPPL v1.3c as it only
356 ;; extends the LPPL with an optional request.
358 (license "GUST font license 1.0"
359 "http://www.gust.org.pl/projects/e-foundry/licenses/GUST-FONT-LICENSE.txt"
360 "https://www.gnu.org/licenses/license-list#LPPL-1.3a"))
364 "https://www.gnu.org/licenses/fdl-1.1"
365 "https://www.gnu.org/licenses/license-list#FDL"))
369 "https://www.gnu.org/licenses/fdl-1.2"
370 "https://www.gnu.org/licenses/license-list#FDL"))
374 "https://www.gnu.org/licenses/fdl.html"
375 "https://www.gnu.org/licenses/license-list#FDL"))
378 (license "FreeBSD Documentation License"
379 "https://www.freebsd.org/copyright/freebsd-doc-license.html"
380 "https://www.gnu.org/licenses/license-list.html#FreeBSDDL"))
383 (license "Open Publication License 1.0 or later"
384 "http://opencontent.org/openpub/"
385 "https://www.gnu.org/licenses/license-list#OpenPublicationL"))
388 (license "The Open Software License 2.1"
389 "https://opensource.org/licenses/osl-2.1.php"
390 "https://www.gnu.org/licenses/license-list#OSL"))
394 "http://directory.fsf.org/wiki/License:ISC"
395 "https://www.gnu.org/licenses/license-list.html#ISC"))
399 "http://directory.fsf.org/wiki/License:JPEG"
400 "https://www.gnu.org/licenses/license-list#ijg"))
404 "http://directory.fsf.org/wiki/License:IBMPLv1.0"
405 "https://www.gnu.org/licenses/license-list#IBMPL"))
409 "http://directory.fsf.org/wiki/License:Imlib2"
410 "https://www.gnu.org/licenses/license-list#imlib"))
413 (license "IPA Font License"
414 "http://directory.fsf.org/wiki/License:IPA_Font_License"
415 "https://www.gnu.org/licenses/license-list#IPAFONT"))
418 (license "Donald Knuth's license for TeX"
419 "http://www.ctan.org/license/knuth"
420 "Modification are only permitted under a different name."))
423 (license "Free Art License 1.3"
424 "http://artlibre.org/licence/lal/en/"
425 "https://www.gnu.org/licenses/license-list#FreeArt"))
429 "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html"
430 "https://www.gnu.org/licenses/why-not-lgpl.html"))
434 "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html"
435 "https://www.gnu.org/licenses/why-not-lgpl.html"))
439 "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
440 "https://www.gnu.org/licenses/license-list#LGPLv2.1"))
444 "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
445 "https://www.gnu.org/licenses/license-list#LGPLv2.1"))
449 "https://www.gnu.org/licenses/lgpl.html"
450 "https://www.gnu.org/licenses/license-list#LGPLv3"))
454 "https://www.gnu.org/licenses/lgpl.html"
455 "https://www.gnu.org/licenses/license-list#LGPLv3"))
459 "https://opensource.franz.com/preamble.html"
460 "Lisp Lesser General Public License"))
463 (license "LPPL (any version)"
464 "https://www.latex-project.org/lppl/lppl-1-0/"
465 "LaTeX Project Public License 1.0"))
469 "https://www.latex-project.org/lppl/lppl-1-0/"
470 "LaTeX Project Public License 1.0"))
474 "https://www.latex-project.org/lppl/lppl-1-1/"
475 "LaTeX Project Public License 1.1"))
479 "http://directory.fsf.org/wiki/License:LPPLv1.2"
480 "https://www.gnu.org/licenses/license-list#LPPL-1.2"))
484 "http://directory.fsf.org/wiki/License:LPPLv1.2"
485 "https://www.gnu.org/licenses/license-list#LPPL-1.2"))
489 "https://www.latex-project.org/lppl/lppl-1-3/"
490 "LaTeX Project Public License 1.3"))
494 "https://www.latex-project.org/lppl/lppl-1-3/"
495 "LaTeX Project Public License 1.3+"))
499 "http://directory.fsf.org/wiki/License:LPPLv1.3a"
500 "https://www.gnu.org/licenses/license-list#LPPL-1.3a"))
503 (license "LPPL 1.3a+"
504 "http://directory.fsf.org/wiki/License:LPPLv1.3a"
505 "https://www.gnu.org/licenses/license-list#LPPL-1.3a"))
509 "https://www.latex-project.org/lppl/lppl-1-3b/"
510 "LaTeX Project Public License 1.3b"))
513 (license "LPPL 1.3b+"
514 "https://www.latex-project.org/lppl/lppl-1-3b/"
515 "LaTeX Project Public License 1.3b or later"))
519 "https://www.latex-project.org/lppl/lppl-1-3c/"
520 "LaTeX Project Public License 1.3c"))
523 (license "LPPL 1.3c+"
524 "https://www.latex-project.org/lppl/lppl-1-3c/"
525 "LaTeX Project Public License 1.3c or later"))
529 "https://www.mirbsd.org/MirOS-Licence.htm"
534 "http://www.mozilla.org/MPL/1.0/"
535 "https://www.gnu.org/licenses/license-list.html#MPL"))
539 "http://directory.fsf.org/wiki/License:MPLv1.1"
540 "https://www.gnu.org/licenses/license-list#MPL"))
544 "http://directory.fsf.org/wiki/License:MPLv2.0"
545 "https://www.gnu.org/licenses/license-list#MPL-2.0"))
548 (license "Ms-PL" ;Microsoft Public License
549 "http://directory.fsf.org/wiki/License:MsPL"
550 "http://www.gnu.org/licenses/license-list.html#ms-pl"))
553 (license "NCSA/University of Illinois Open Source License"
554 "http://directory.fsf.org/wiki/License:IllinoisNCSA"
555 "https://www.gnu.org/licenses/license-list#NCSA"))
558 (license "Nmap license"
559 "https://svn.nmap.org/nmap/COPYING"
560 "https://fedoraproject.org/wiki/Licensing/Nmap"))
563 (license "Open Government Licence for Public Sector Information"
564 "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/1/"
569 "http://directory.fsf.org/wiki/License:OpenSSL"
570 "https://www.gnu.org/licenses/license-list#OpenSSL"))
573 (license "OpenLDAPv2.8"
574 "http://directory.fsf.org/wiki/License:OpenLDAPv2.8"
575 "https://www.gnu.org/licenses/license-list#newOpenLDAP"))
576 ;; lists OpenLDAPv2.7, which is virtually identical
579 ;; The license of Perl, GPLv1+ or Artistic (we ignore the latter here).
580 ;; We define this alias to avoid circular dependencies introduced by the use
581 ;; of the '(package-license perl)' idiom.
585 (license "Python Software Foundation License"
586 "http://docs.python.org/license.html"
589 (define public-domain
590 (license "Public Domain"
591 "http://directory.fsf.org/wiki/License:PublicDomain"
592 "https://www.gnu.org/licenses/license-list#PublicDomain"))
596 "http://directory.fsf.org/wiki/License:QPLv1.0"
597 "http://www.gnu.org/licenses/license-list.html#QPL"))
601 "http://qwt.sourceforge.net/qwtlicense.html"
602 "GNU Lesser General Public License with exceptions"))
606 "http://repoze.org/LICENSE.txt"
607 "A BSD-like license with a clause requiring all changes to be
608 attributed by author and date."))
611 (license "Ruby License"
612 "http://directory.fsf.org/wiki/License:Ruby"
613 "https://www.ruby-lang.org/en/about/license.txt"))
616 (license "SGI Free Software License B, version 2.0"
617 "http://directory.fsf.org/wiki/License:SGIFreeBv2"
618 "https://www.gnu.org/licenses/license-list.html#SGIFreeB"))
621 (license "SIL OFL 1.1"
622 "http://scripts.sil.org/OFL_web"
623 "https://www.gnu.org/licenses/license-list#SILOFL"))
627 "http://directory.fsf.org/wiki/License:Sleepycat"
628 "https://www.gnu.org/licenses/license-list#BerkeleyDB"))
632 "http://www.tcl.tk/software/tcltk/license.html"
633 "A non-copyleft free software license from the Tcl/Tk project"))
637 "http://directory.fsf.org/wiki/License:Vim7.2"
638 "http://www.gnu.org/licenses/license-list.html#Vim"))
642 "https://directory.fsf.org/wiki/License:Unicode"
643 "http://www.gnu.org/licenses/license-list.html#Unicode"))
647 "https://unlicense.org/"
648 "https://www.gnu.org/licenses/license-list.html#Unlicense"))
651 (license "W3C Software Notice and License"
652 "https://directory.fsf.org/wiki/License:W3C_31Dec2002"
653 "https://www.gnu.org/licenses/license-list.en.html#W3C"))
657 "http://www.wtfpl.net"
658 "http://www.wtfpl.net/about/"))
660 (define wxwindows3.1+
661 (license "wxWindows 3.1+"
662 "https://wxwidgets.org/about/licence"
663 "https://www.gnu.org/licenses/license-list.html#Wxwind"))
667 "http://directory.fsf.org/wiki/License:X11"
668 "https://www.gnu.org/licenses/license-list#X11License"))
670 (define* (x11-style uri #:optional (comment ""))
671 "Return an X11-style license, whose full text can be found at URI,
672 which may be a file:// URI pointing the package's tree."
676 "This is an X11-style, non-copyleft free software license. "
677 "Check the URI for details. "
681 (license "Zope Public License 2.1"
682 "http://directory.fsf.org/wiki?title=License:ZopePLv2.1"
683 "https://www.gnu.org/licenses/license-list.html#Zope2.0"))
687 "https://zlib.net/zlib_license.html"
688 "https://www.gnu.org/licenses/license-list#ZLib"))
692 "https://directory.fsf.org/wiki/License:HPND"
693 "https://www.gnu.org/licenses/license-list#HPND"))
695 (define* (fsf-free uri #:optional (comment ""))
696 "Return a license that does not fit any of the ones above or a collection
697 of licenses, approved as free by the FSF. More details can be found at URI."
702 (define* (fsdg-compatible uri #:optional (comment ""))
703 "Return a license that does not fit any of the ones above or a collection
704 of licenses, not necessarily free, but in accordance with FSDG as Non-functional
705 Data. More details can be found at URI. See also
706 https://www.gnu.org/distros/free-system-distribution-guidelines.en.html#non-functional-data."
707 (license "FSDG-compatible"
711 ;;; licenses.scm ends here