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>
21 ;;; This file is part of GNU Guix.
23 ;;; GNU Guix is free software; you can redistribute it and/or modify it
24 ;;; under the terms of the GNU General Public License as published by
25 ;;; the Free Software Foundation; either version 3 of the License, or (at
26 ;;; your option) any later version.
28 ;;; GNU Guix is distributed in the hope that it will be useful, but
29 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
30 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 ;;; GNU General Public License for more details.
33 ;;; You should have received a copy of the GNU General Public License
34 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
36 (define-module (guix licenses)
37 #:use-module (srfi srfi-9)
38 #:export (license? license-name license-uri license-comment
43 bsd-0 bsd-2 bsd-3 bsd-4
46 cc-by2.0 cc-by3.0 cc-by4.0
47 cc-by-sa2.0 cc-by-sa3.0 cc-by-sa4.0
50 cecill cecill-b cecill-c
51 artistic2.0 clarified-artistic
62 gpl1 gpl1+ gpl2 gpl2+ gpl3 gpl3+
64 fdl1.1+ fdl1.2+ fdl1.3+
73 lgpl2.0 lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3 lgpl3+ llgpl
74 lppl lppl1.0+ lppl1.1+ lppl1.2 lppl1.2+
109 (define-record-type <license>
110 (license name uri comment)
114 (comment license-comment))
118 ;;; Available licenses.
120 ;;; This list is based on these links:
121 ;;; https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix
122 ;;; https://www.gnu.org/licenses/license-list
124 ;;; Please update spdx-string->license from guix/import/utils.scm
125 ;;; when modifying this list to avoid mismatches.
131 "https://gnu.org/licenses/agpl.html"
132 "https://gnu.org/licenses/why-affero-gpl.html"))
136 "https://gnu.org/licenses/agpl.html"
137 "https://gnu.org/licenses/why-affero-gpl.html"))
141 "https://gnu.org/licenses/agpl.html"
142 "https://gnu.org/licenses/why-affero-gpl.html"))
146 "https://directory.fsf.org/wiki/License:APSL-2.0"
147 "https://www.gnu.org/licenses/license-list.html#apsl2"))
151 "http://directory.fsf.org/wiki/License:Apache1.1"
152 "https://www.gnu.org/licenses/license-list#apache1"))
156 "http://directory.fsf.org/wiki/License:Apache2.0"
157 "https://www.gnu.org/licenses/license-list#apache2"))
161 "http://directory.fsf.org/wiki/License:Boost1.0"
162 "https://www.gnu.org/licenses/license-list#boost"))
165 (license "Zero-Clause BSD"
166 "https://spdx.org/licenses/0BSD.html"
167 "https://opensource.org/licenses/0BSD"))
171 "http://directory.fsf.org/wiki/License:FreeBSD"
172 "https://www.gnu.org/licenses/license-list#FreeBSD"))
175 (license "Modified BSD"
176 "http://directory.fsf.org/wiki/License:BSD_3Clause"
177 "https://www.gnu.org/licenses/license-list#ModifiedBSD"))
180 (license "Original BSD"
181 "http://directory.fsf.org/wiki/License:BSD_4Clause"
182 "https://www.gnu.org/licenses/license-list#OriginalBSD"))
184 (define* (non-copyleft uri #:optional (comment ""))
185 "Return a lax, permissive, non-copyleft license (for example a variant of
186 the 3-clause BSD license or the Expat license), whose full text can be found
187 at URI, which may be a file:// URI pointing the package's tree."
188 (license "non-copyleft"
191 "This is a lax, non-copyleft free software license. "
192 "Check the URI for details. "
197 "http://directory.fsf.org/wiki/License:CC0"
198 "http://www.gnu.org/licenses/license-list.html#CC0"))
201 (license "CC-BY-SA 4.0"
202 "http://creativecommons.org/licenses/by-sa/4.0/"
203 "Creative Commons Attribution-ShareAlike 4.0 International"))
206 (license "CC-BY-SA 3.0"
207 "http://creativecommons.org/licenses/by-sa/3.0/"
208 "Creative Commons Attribution-ShareAlike 3.0 Unported"))
211 (license "CC-BY-SA 2.0"
212 "http://creativecommons.org/licenses/by-sa/2.0/"
213 "Creative Commons Attribution-ShareAlike 2.0 Generic"))
217 "http://creativecommons.org/licenses/by/4.0/"
218 "Creative Commons Attribution 4.0 Unported"))
222 "http://creativecommons.org/licenses/by/3.0/"
223 "Creative Commons Attribution 3.0 Unported"))
227 "http://creativecommons.org/licenses/by/2.0/"
228 "Creative Commons Attribution 2.0 Generic"))
230 (define cc-sampling-plus-1.0
231 (license "CC-Sampling+ 1.0"
232 "https://creativecommons.org/licenses/sampling+/1.0"
233 "Creative Commons Sampling Plus 1.0"))
237 "http://directory.fsf.org/wiki/License:CDDLv1.0"
238 "https://www.gnu.org/licenses/license-list#CDDL"))
240 ;; CDDL1.1 is the same as 1.0, except that "Sun Microsystems, Inc" becomes "Oracle",
241 ;; "LOST PROFITS" becoms "LOSS OF GOODWILL" and a section is added between 6.2
245 "https://oss.oracle.com/licenses/CDDL+GPL-1.1"
246 "https://www.gnu.org/licenses/license-list#CDDL"))
248 (define cecill ;copyleft
250 "http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.html"
251 "https://www.gnu.org/licenses/license-list.html#CeCILL"))
253 (define cecill-b ;non-copyleft
255 "http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html"
256 "https://www.gnu.org/licenses/license-list.html#CeCILL"))
258 (define cecill-c ;weak copyleft
260 "http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html"
261 "https://www.gnu.org/licenses/license-list.html#CeCILL"))
264 (license "Artistic License 2.0"
265 "http://www.perlfoundation.org/artistic_license_2_0"
266 "http://www.gnu.org/licenses/license-list.html#ArtisticLicense2"))
268 (define clarified-artistic
269 (license "Clarified Artistic"
270 ;; http://directory.fsf.org/wiki/User:Jgay/license-categorization#Clarified_Artistic_License
271 "http://gianluca.dellavedova.org/2011/01/03/clarified-artistic-license/"
272 "https://www.gnu.org/licenses/license-list.html#ArtisticLicense2"))
274 (define copyleft-next
275 (license "copyleft-next"
276 "https://raw.github.com/richardfontana/copyleft-next/master/Releases/copyleft-next-0.3.0"
277 "GPL-compatible copyleft license"))
281 "http://directory.fsf.org/wiki/License:CPLv1.0"
282 "https://www.gnu.org/licenses/license-list#CommonPublicLicense10"))
285 (license "CUA Office Public License v1.0"
286 "https://spdx.org/licenses/CUA-OPL-1.0.html"
287 "https://opensource.org/licenses/CUA-OPL-1.0"))
291 "http://directory.fsf.org/wiki/License:EDLv1.0"
292 "https://eclipse.org/org/documents/edl-v10.php"))
296 "http://directory.fsf.org/wiki/License:EPLv1.0"
297 "https://www.gnu.org/licenses/license-list#EPL"))
301 "https://www.eclipse.org/legal/epl-2.0/"
302 "https://www.gnu.org/licenses/license-list#EPL2"))
306 "http://directory.fsf.org/wiki/License:Expat"
307 "https://www.gnu.org/licenses/license-list.html#Expat"))
311 "http://directory.fsf.org/wiki/License:Freetype"
312 "https://www.gnu.org/licenses/license-list.html#freetype"))
316 "https://liballeg.org/license.html"
317 "The Allegro 4 license"))
321 "https://www.gnu.org/licenses/old-licenses/gpl-1.0.html"
326 "https://www.gnu.org/licenses/old-licenses/gpl-1.0.html"
331 "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
332 "https://www.gnu.org/licenses/license-list#GPLv2"))
336 "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
337 "https://www.gnu.org/licenses/license-list#GPLv2"))
341 "https://www.gnu.org/licenses/gpl.html"
342 "https://www.gnu.org/licenses/license-list#GNUGPLv3"))
346 "https://www.gnu.org/licenses/gpl.html"
347 "https://www.gnu.org/licenses/license-list#GNUGPLv3"))
349 ;; The “GUST font license” is legally equivalent to LPPL v1.3c as it only
350 ;; extends the LPPL with an optional request.
352 (license "GUST font license 1.0"
353 "http://www.gust.org.pl/projects/e-foundry/licenses/GUST-FONT-LICENSE.txt"
354 "https://www.gnu.org/licenses/license-list#LPPL-1.3a"))
358 "https://www.gnu.org/licenses/fdl-1.1"
359 "https://www.gnu.org/licenses/license-list#FDL"))
363 "https://www.gnu.org/licenses/fdl-1.2"
364 "https://www.gnu.org/licenses/license-list#FDL"))
368 "https://www.gnu.org/licenses/fdl.html"
369 "https://www.gnu.org/licenses/license-list#FDL"))
372 (license "FreeBSD Documentation License"
373 "https://www.freebsd.org/copyright/freebsd-doc-license.html"
374 "https://www.gnu.org/licenses/license-list.html#FreeBSDDL"))
377 (license "Open Publication License 1.0 or later"
378 "http://opencontent.org/openpub/"
379 "https://www.gnu.org/licenses/license-list#OpenPublicationL"))
382 (license "The Open Software License 2.1"
383 "https://opensource.org/licenses/osl-2.1.php"
384 "https://www.gnu.org/licenses/license-list#OSL"))
388 "http://directory.fsf.org/wiki/License:ISC"
389 "https://www.gnu.org/licenses/license-list.html#ISC"))
393 "http://directory.fsf.org/wiki/License:JPEG"
394 "https://www.gnu.org/licenses/license-list#ijg"))
398 "http://directory.fsf.org/wiki/License:IBMPLv1.0"
399 "https://www.gnu.org/licenses/license-list#IBMPL"))
403 "http://directory.fsf.org/wiki/License:Imlib2"
404 "https://www.gnu.org/licenses/license-list#imlib"))
407 (license "IPA Font License"
408 "http://directory.fsf.org/wiki/License:IPA_Font_License"
409 "https://www.gnu.org/licenses/license-list#IPAFONT"))
412 (license "Donald Knuth's license for TeX"
413 "http://www.ctan.org/license/knuth"
414 "Modification are only permitted under a different name."))
417 (license "Free Art License 1.3"
418 "http://artlibre.org/licence/lal/en/"
419 "https://www.gnu.org/licenses/license-list#FreeArt"))
423 "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html"
424 "https://www.gnu.org/licenses/why-not-lgpl.html"))
428 "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html"
429 "https://www.gnu.org/licenses/why-not-lgpl.html"))
433 "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
434 "https://www.gnu.org/licenses/license-list#LGPLv2.1"))
438 "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
439 "https://www.gnu.org/licenses/license-list#LGPLv2.1"))
443 "https://www.gnu.org/licenses/lgpl.html"
444 "https://www.gnu.org/licenses/license-list#LGPLv3"))
448 "https://www.gnu.org/licenses/lgpl.html"
449 "https://www.gnu.org/licenses/license-list#LGPLv3"))
453 "https://opensource.franz.com/preamble.html"
454 "Lisp Lesser General Public License"))
457 (license "LPPL (any version)"
458 "https://www.latex-project.org/lppl/lppl-1-0/"
459 "LaTeX Project Public License 1.0"))
463 "https://www.latex-project.org/lppl/lppl-1-0/"
464 "LaTeX Project Public License 1.0"))
468 "https://www.latex-project.org/lppl/lppl-1-1/"
469 "LaTeX Project Public License 1.1"))
473 "http://directory.fsf.org/wiki/License:LPPLv1.2"
474 "https://www.gnu.org/licenses/license-list#LPPL-1.2"))
478 "http://directory.fsf.org/wiki/License:LPPLv1.2"
479 "https://www.gnu.org/licenses/license-list#LPPL-1.2"))
483 "https://www.latex-project.org/lppl/lppl-1-3/"
484 "LaTeX Project Public License 1.3"))
488 "https://www.latex-project.org/lppl/lppl-1-3/"
489 "LaTeX Project Public License 1.3+"))
493 "http://directory.fsf.org/wiki/License:LPPLv1.3a"
494 "https://www.gnu.org/licenses/license-list#LPPL-1.3a"))
497 (license "LPPL 1.3a+"
498 "http://directory.fsf.org/wiki/License:LPPLv1.3a"
499 "https://www.gnu.org/licenses/license-list#LPPL-1.3a"))
503 "https://www.latex-project.org/lppl/lppl-1-3b/"
504 "LaTeX Project Public License 1.3b"))
507 (license "LPPL 1.3b+"
508 "https://www.latex-project.org/lppl/lppl-1-3b/"
509 "LaTeX Project Public License 1.3b or later"))
513 "https://www.latex-project.org/lppl/lppl-1-3c/"
514 "LaTeX Project Public License 1.3c"))
517 (license "LPPL 1.3c+"
518 "https://www.latex-project.org/lppl/lppl-1-3c/"
519 "LaTeX Project Public License 1.3c or later"))
523 "https://www.mirbsd.org/MirOS-Licence.htm"
528 "http://www.mozilla.org/MPL/1.0/"
529 "https://www.gnu.org/licenses/license-list.html#MPL"))
533 "http://directory.fsf.org/wiki/License:MPLv1.1"
534 "https://www.gnu.org/licenses/license-list#MPL"))
538 "http://directory.fsf.org/wiki/License:MPLv2.0"
539 "https://www.gnu.org/licenses/license-list#MPL-2.0"))
542 (license "Ms-PL" ;Microsoft Public License
543 "http://directory.fsf.org/wiki/License:MsPL"
544 "http://www.gnu.org/licenses/license-list.html#ms-pl"))
547 (license "NCSA/University of Illinois Open Source License"
548 "http://directory.fsf.org/wiki/License:IllinoisNCSA"
549 "https://www.gnu.org/licenses/license-list#NCSA"))
552 (license "Nmap license"
553 "https://svn.nmap.org/nmap/COPYING"
554 "https://fedoraproject.org/wiki/Licensing/Nmap"))
557 (license "Open Government Licence for Public Sector Information"
558 "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/1/"
563 "http://directory.fsf.org/wiki/License:OpenSSL"
564 "https://www.gnu.org/licenses/license-list#OpenSSL"))
567 (license "OpenLDAPv2.8"
568 "http://directory.fsf.org/wiki/License:OpenLDAPv2.8"
569 "https://www.gnu.org/licenses/license-list#newOpenLDAP"))
570 ;; lists OpenLDAPv2.7, which is virtually identical
573 ;; The license of Perl, GPLv1+ or Artistic (we ignore the latter here).
574 ;; We define this alias to avoid circular dependencies introduced by the use
575 ;; of the '(package-license perl)' idiom.
579 (license "Python Software Foundation License"
580 "http://docs.python.org/license.html"
583 (define public-domain
584 (license "Public Domain"
585 "http://directory.fsf.org/wiki/License:PublicDomain"
586 "https://www.gnu.org/licenses/license-list#PublicDomain"))
590 "http://directory.fsf.org/wiki/License:QPLv1.0"
591 "http://www.gnu.org/licenses/license-list.html#QPL"))
595 "http://qwt.sourceforge.net/qwtlicense.html"
596 "GNU Lesser General Public License with exceptions"))
600 "http://repoze.org/LICENSE.txt"
601 "A BSD-like license with a clause requiring all changes to be
602 attributed by author and date."))
605 (license "Ruby License"
606 "http://directory.fsf.org/wiki/License:Ruby"
607 "https://www.ruby-lang.org/en/about/license.txt"))
610 (license "SGI Free Software License B, version 2.0"
611 "http://directory.fsf.org/wiki/License:SGIFreeBv2"
612 "https://www.gnu.org/licenses/license-list.html#SGIFreeB"))
615 (license "SIL OFL 1.1"
616 "http://scripts.sil.org/OFL_web"
617 "https://www.gnu.org/licenses/license-list#SILOFL"))
621 "http://directory.fsf.org/wiki/License:Sleepycat"
622 "https://www.gnu.org/licenses/license-list#BerkeleyDB"))
626 "http://www.tcl.tk/software/tcltk/license.html"
627 "A non-copyleft free software license from the Tcl/Tk project"))
631 "http://directory.fsf.org/wiki/License:Vim7.2"
632 "http://www.gnu.org/licenses/license-list.html#Vim"))
636 "https://directory.fsf.org/wiki/License:Unicode"
637 "http://www.gnu.org/licenses/license-list.html#Unicode"))
641 "https://unlicense.org/"
642 "https://www.gnu.org/licenses/license-list.html#Unlicense"))
645 (license "W3C Software Notice and License"
646 "https://directory.fsf.org/wiki/License:W3C_31Dec2002"
647 "https://www.gnu.org/licenses/license-list.en.html#W3C"))
651 "http://www.wtfpl.net"
652 "http://www.wtfpl.net/about/"))
654 (define wxwindows3.1+
655 (license "wxWindows 3.1+"
656 "https://wxwidgets.org/about/licence"
657 "https://www.gnu.org/licenses/license-list.html#Wxwind"))
661 "http://directory.fsf.org/wiki/License:X11"
662 "https://www.gnu.org/licenses/license-list#X11License"))
664 (define* (x11-style uri #:optional (comment ""))
665 "Return an X11-style license, whose full text can be found at URI,
666 which may be a file:// URI pointing the package's tree."
670 "This is an X11-style, non-copyleft free software license. "
671 "Check the URI for details. "
675 (license "Zope Public License 2.1"
676 "http://directory.fsf.org/wiki?title=License:ZopePLv2.1"
677 "https://www.gnu.org/licenses/license-list.html#Zope2.0"))
681 "https://zlib.net/zlib_license.html"
682 "https://www.gnu.org/licenses/license-list#ZLib"))
686 "https://directory.fsf.org/wiki/License:HPND"
687 "https://www.gnu.org/licenses/license-list#HPND"))
689 (define* (fsf-free uri #:optional (comment ""))
690 "Return a license that does not fit any of the ones above or a collection
691 of licenses, approved as free by the FSF. More details can be found at URI."
696 (define* (fsdg-compatible uri #:optional (comment ""))
697 "Return a license that does not fit any of the ones above or a collection
698 of licenses, not necessarily free, but in accordance with FSDG as Non-functional
699 Data. More details can be found at URI. See also
700 https://www.gnu.org/distros/free-system-distribution-guidelines.en.html#non-functional-data."
701 (license "FSDG-compatible"
705 ;;; licenses.scm ends here