You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

297 lines
9.3 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2012, 2014 Ludovic Courtès <ludo@gnu.org>
  3. ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
  4. ;;; Copyright © 2012, 2013 Nikita Karetnikov <nikita@karetnikov.org>
  5. ;;;
  6. ;;; This file is part of GNU Guix.
  7. ;;;
  8. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  9. ;;; under the terms of the GNU General Public License as published by
  10. ;;; the Free Software Foundation; either version 3 of the License, or (at
  11. ;;; your option) any later version.
  12. ;;;
  13. ;;; GNU Guix is distributed in the hope that it will be useful, but
  14. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. ;;; GNU General Public License for more details.
  17. ;;;
  18. ;;; You should have received a copy of the GNU General Public License
  19. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  20. (define-module (guix licenses)
  21. #:use-module (srfi srfi-9)
  22. #:export (license? license-name license-uri license-comment
  23. agpl3 agpl3+
  24. asl2.0
  25. boost1.0
  26. bsd-2 bsd-3 bsd-4 bsd-style
  27. cc0
  28. cddl1.0
  29. cecill-c
  30. cpl1.0
  31. epl1.0
  32. expat
  33. freetype
  34. gpl1 gpl1+ gpl2 gpl2+ gpl3 gpl3+
  35. fdl1.3+
  36. isc
  37. ijg
  38. ibmpl1.0
  39. lgpl2.0 lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3 lgpl3+
  40. mpl2.0
  41. openldap2.8 openssl
  42. psfl public-domain
  43. qpl
  44. ruby
  45. vim
  46. x11 x11-style
  47. zlib
  48. fsf-free))
  49. (define-record-type <license>
  50. (license name uri comment)
  51. license?
  52. (name license-name)
  53. (uri license-uri)
  54. (comment license-comment))
  55. ;;; Commentary:
  56. ;;;
  57. ;;; Available licenses.
  58. ;;;
  59. ;;; This list is based on these links:
  60. ;;; https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix
  61. ;;; https://www.gnu.org/licenses/license-list
  62. ;;;
  63. ;;; Code:
  64. (define agpl3
  65. (license "AGPL 3"
  66. "https://gnu.org/licenses/agpl.html"
  67. "https://gnu.org/licenses/why-affero-gpl.html"))
  68. (define agpl3+
  69. (license "AGPL 3+"
  70. "https://gnu.org/licenses/agpl.html"
  71. "https://gnu.org/licenses/why-affero-gpl.html"))
  72. (define asl2.0
  73. (license "ASL 2.0"
  74. "http://directory.fsf.org/wiki/License:Apache2.0"
  75. "https://www.gnu.org/licenses/license-list#apache2"))
  76. (define boost1.0
  77. (license "Boost 1.0"
  78. "http://directory.fsf.org/wiki/License:Boost1.0"
  79. "https://www.gnu.org/licenses/license-list#boost"))
  80. (define bsd-2
  81. (license "FreeBSD"
  82. "http://directory.fsf.org/wiki/License:FreeBSD"
  83. "https://www.gnu.org/licenses/license-list#FreeBSD"))
  84. (define bsd-3
  85. (license "Modified BSD"
  86. "http://directory.fsf.org/wiki/License:BSD_3Clause"
  87. "https://www.gnu.org/licenses/license-list#ModifiedBSD"))
  88. (define bsd-4
  89. (license "Original BSD"
  90. "http://directory.fsf.org/wiki/License:BSD_4Clause"
  91. "https://www.gnu.org/licenses/license-list#OriginalBSD"))
  92. (define* (bsd-style uri #:optional (comment ""))
  93. "Return a BSD-style license, whose full text can be found at URI,
  94. which may be a file:// URI pointing the package's tree."
  95. (license "BSD-style"
  96. uri
  97. (string-append
  98. "This is a BSD-style, non-copyleft free software license. "
  99. "Check the URI for details. "
  100. comment)))
  101. (define cc0
  102. (license "CC0"
  103. "http://directory.fsf.org/wiki/License:CC0"
  104. "http://www.gnu.org/licenses/license-list.html#CC0"))
  105. (define cddl1.0
  106. (license "CDDL 1.0"
  107. "http://directory.fsf.org/wiki/License:CDDLv1.0"
  108. "https://www.gnu.org/licenses/license-list#CDDL"))
  109. (define cecill-c
  110. (license "CeCILL-C"
  111. "http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html"
  112. "https://www.gnu.org/licenses/license-list.html#CeCILL"))
  113. (define cpl1.0
  114. (license "CPL 1.0"
  115. "http://directory.fsf.org/wiki/License:CPLv1.0"
  116. "https://www.gnu.org/licenses/license-list#CommonPublicLicense10"))
  117. (define epl1.0
  118. (license "EPL 1.0"
  119. "http://directory.fsf.org/wiki/License:EPLv1.0"
  120. "https://www.gnu.org/licenses/license-list#EPL"))
  121. (define expat
  122. (license "Expat"
  123. "http://directory.fsf.org/wiki/License:Expat"
  124. "https://www.gnu.org/licenses/license-list.html#Expat"))
  125. (define freetype
  126. (license "Freetype"
  127. "http://directory.fsf.org/wiki/License:Freetype"
  128. "https://www.gnu.org/licenses/license-list.html#freetype"))
  129. (define gpl1
  130. (license "GPL 1"
  131. "https://www.gnu.org/licenses/old-licenses/gpl-1.0.html"
  132. #f))
  133. (define gpl1+
  134. (license "GPL 1+"
  135. "https://www.gnu.org/licenses/old-licenses/gpl-1.0.html"
  136. #f))
  137. (define gpl2
  138. (license "GPL 2"
  139. "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
  140. "https://www.gnu.org/licenses/license-list#GPLv2"))
  141. (define gpl2+
  142. (license "GPL 2+"
  143. "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
  144. "https://www.gnu.org/licenses/license-list#GPLv2"))
  145. (define gpl3
  146. (license "GPL 3"
  147. "https://www.gnu.org/licenses/gpl.html"
  148. "https://www.gnu.org/licenses/license-list#GNUGPLv3"))
  149. (define gpl3+
  150. (license "GPL 3+"
  151. "https://www.gnu.org/licenses/gpl.html"
  152. "https://www.gnu.org/licenses/license-list#GNUGPLv3"))
  153. (define fdl1.3+
  154. (license "FDL 1.3+"
  155. "https://www.gnu.org/licenses/fdl.html"
  156. "https://www.gnu.org/licenses/license-list#FDL"))
  157. (define isc
  158. (license "ISC"
  159. "http://directory.fsf.org/wiki/License:ISC"
  160. "https://www.gnu.org/licenses/license-list.html#ISC"))
  161. (define ijg
  162. (license "IJG"
  163. "http://directory.fsf.org/wiki/License:JPEG"
  164. "https://www.gnu.org/licenses/license-list#ijg"))
  165. (define ibmpl1.0
  166. (license "IBMPL 1.0"
  167. "http://directory.fsf.org/wiki/License:IBMPLv1.0"
  168. "https://www.gnu.org/licenses/license-list#IBMPL"))
  169. (define lgpl2.0
  170. (license "LGPL 2.0"
  171. "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html"
  172. "https://www.gnu.org/licenses/why-not-lgpl.html"))
  173. (define lgpl2.0+
  174. (license "LGPL 2.0+"
  175. "https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html"
  176. "https://www.gnu.org/licenses/why-not-lgpl.html"))
  177. (define lgpl2.1
  178. (license "LGPL 2.1"
  179. "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
  180. "https://www.gnu.org/licenses/license-list#LGPLv2.1"))
  181. (define lgpl2.1+
  182. (license "LGPL 2.1+"
  183. "https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"
  184. "https://www.gnu.org/licenses/license-list#LGPLv2.1"))
  185. (define lgpl3
  186. (license "LGPL 3"
  187. "https://www.gnu.org/licenses/lgpl.html"
  188. "https://www.gnu.org/licenses/license-list#LGPLv3"))
  189. (define lgpl3+
  190. (license "LGPL 3+"
  191. "https://www.gnu.org/licenses/lgpl.html"
  192. "https://www.gnu.org/licenses/license-list#LGPLv3"))
  193. (define mpl2.0
  194. (license "MPL 2.0"
  195. "http://directory.fsf.org/wiki/License:MPLv2.0"
  196. "https://www.gnu.org/licenses/license-list#MPL-2.0"))
  197. (define openssl
  198. (license "OpenSSL"
  199. "http://directory.fsf.org/wiki/License:OpenSSL"
  200. "https://www.gnu.org/licenses/license-list#OpenSSL"))
  201. (define openldap2.8
  202. (license "OpenLDAPv2.8"
  203. "http://directory.fsf.org/wiki/License:OpenLDAPv2.8"
  204. "https://www.gnu.org/licenses/license-list#newOpenLDAP"))
  205. ;; lists OpenLDAPv2.7, which is virtually identical
  206. (define psfl
  207. (license "Python Software Foundation License"
  208. "http://docs.python.org/license.html"
  209. #f))
  210. (define public-domain
  211. (license "Public Domain"
  212. "http://directory.fsf.org/wiki/License:PublicDomain"
  213. "https://www.gnu.org/licenses/license-list#PublicDomain"))
  214. (define qpl
  215. (license "QPL"
  216. "http://directory.fsf.org/wiki/License:QPLv1.0"
  217. "http://www.gnu.org/licenses/license-list.html#QPL"))
  218. (define ruby
  219. (license "Ruby License"
  220. "http://directory.fsf.org/wiki/License:Ruby"
  221. "https://www.ruby-lang.org/en/about/license.txt"))
  222. (define vim
  223. (license "Vim"
  224. "http://directory.fsf.org/wiki/License:Vim7.2"
  225. "http://www.gnu.org/licenses/license-list.html#Vim"))
  226. (define x11
  227. (license "X11"
  228. "http://directory.fsf.org/wiki/License:X11"
  229. "https://www.gnu.org/licenses/license-list#X11License"))
  230. (define* (x11-style uri #:optional (comment ""))
  231. "Return an X11-style license, whose full text can be found at URI,
  232. which may be a file:// URI pointing the package's tree."
  233. (license "X11-style"
  234. uri
  235. (string-append
  236. "This is an X11-style, non-copyleft free software license. "
  237. "Check the URI for details. "
  238. comment)))
  239. (define zlib
  240. (license "Zlib"
  241. "http://www.gzip.org/zlib/zlib_license.html"
  242. "https://www.gnu.org/licenses/license-list#ZLib"))
  243. (define* (fsf-free uri #:optional (comment ""))
  244. "Return a license that does not fit any of the ones above or a collection
  245. of licenses, approved as free by the FSF. More details can be found at URI."
  246. (license "FSF-free"
  247. uri
  248. comment))
  249. ;;; licenses.scm ends here