license.scm 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
  3. ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
  4. ;;; Copyright © 2020, 2021 Michael Rohleder <mike@rohleder.de>
  5. ;;; Copyright © 2021 Tanguy Le Carrour <tanguy@bioneland.org>
  6. ;;;
  7. ;;; This file is part of GNU Guix.
  8. ;;;
  9. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  10. ;;; under the terms of the GNU General Public License as published by
  11. ;;; the Free Software Foundation; either version 3 of the License, or (at
  12. ;;; your option) any later version.
  13. ;;;
  14. ;;; GNU Guix is distributed in the hope that it will be useful, but
  15. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  16. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. ;;; GNU General Public License for more details.
  18. ;;;
  19. ;;; You should have received a copy of the GNU General Public License
  20. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  21. (define-module (gnu packages license)
  22. #:use-module (gnu packages)
  23. #:use-module (gnu packages check)
  24. #:use-module (gnu packages perl)
  25. #:use-module (gnu packages perl-check)
  26. #:use-module (gnu packages python-web)
  27. #:use-module (gnu packages python-xyz)
  28. #:use-module (guix build-system perl)
  29. #:use-module (guix build-system python)
  30. #:use-module (guix download)
  31. #:use-module (guix git-download)
  32. #:use-module (guix licenses)
  33. #:use-module (guix packages))
  34. ;;;
  35. ;;; Please: Try to add new module packages in alphabetic order.
  36. ;;;
  37. (define-public perl-regexp-pattern-license
  38. (package
  39. (name "perl-regexp-pattern-license")
  40. (version "3.1.94")
  41. (source
  42. (origin
  43. (method url-fetch)
  44. (uri (string-append
  45. "mirror://cpan/authors/id/J/JO/JONASS/Regexp-Pattern-License-"
  46. "v" version ".tar.gz"))
  47. (sha256
  48. (base32 "0kznpv628jrndn4nw646f6pl7yqvmacwljlygvsjfdkyh0i4sr2k"))))
  49. (build-system perl-build-system)
  50. (native-inputs
  51. `(("perl-regexp-pattern" ,perl-regexp-pattern)
  52. ("perl-test-exception" ,perl-test-exception)))
  53. (propagated-inputs
  54. `(("perl-strictures" ,perl-strictures-2)
  55. ("perl-try-tiny" ,perl-try-tiny)))
  56. (home-page "https://metacpan.org/release/Regexp-Pattern-License")
  57. (synopsis "Regular expressions for legal licenses")
  58. (description "Regexp::Pattern::License provides a hash of regular
  59. expression patterns related to legal software licenses.
  60. Regexp::Pattern is a convention for organizing reusable regex patterns.")
  61. (license gpl3+)))
  62. (define-public perl-string-copyright
  63. (package
  64. (name "perl-string-copyright")
  65. (version "0.003006")
  66. (source
  67. (origin
  68. (method url-fetch)
  69. (uri (string-append
  70. "mirror://cpan/authors/id/J/JO/JONASS/String-Copyright-"
  71. version ".tar.gz"))
  72. (sha256
  73. (base32
  74. "0fzymv065nn3glwnw34nkyadzw2dh4rcz8avmki4zrnk4k45m01a"))))
  75. (build-system perl-build-system)
  76. (native-inputs
  77. `(("perl-number-range" ,perl-number-range)))
  78. (propagated-inputs
  79. `(("perl-exporter-tiny" ,perl-exporter-tiny)))
  80. (home-page "https://metacpan.org/release/String-Copyright")
  81. (synopsis "Representation of text-based copyright statements")
  82. (description "String::Copyright Parses common styles of copyright
  83. statements and serializes in normalized format.")
  84. (license gpl3+)))
  85. (define-public perl-software-license
  86. (package
  87. (name "perl-software-license")
  88. (version "0.103014")
  89. (source
  90. (origin
  91. (method url-fetch)
  92. (uri (string-append
  93. "mirror://cpan/authors/id/L/LE/LEONT/Software-License-"
  94. version ".tar.gz"))
  95. (sha256
  96. (base32
  97. "128pbm9pf5drakm9bpkifc1zg8f005xabfwzg21nc03m5mhfligb"))))
  98. (build-system perl-build-system)
  99. (native-inputs
  100. `(("perl-try-tiny" ,perl-try-tiny)))
  101. (propagated-inputs
  102. `(("perl-data-section" ,perl-data-section)
  103. ("perl-text-template" ,perl-text-template)))
  104. (home-page "https://metacpan.org/release/Software-License")
  105. (synopsis "Templated software licenses")
  106. (description "This package provides templated software licenses.")
  107. (license (package-license perl))))
  108. (define-public licensecheck
  109. (package
  110. (name "licensecheck")
  111. (version "3.0.37")
  112. (source (origin
  113. (method url-fetch)
  114. (uri (string-append
  115. "mirror://cpan/authors/id/J/JO/JONASS/App-Licensecheck-"
  116. "v" version ".tar.gz"))
  117. (sha256
  118. (base32
  119. "12l83zf85zagpagizmzy3bwkc659sbzqf18cycx8g4h6d3mc5kqw"))))
  120. (build-system perl-build-system)
  121. (native-inputs
  122. `(("perl-regexp-pattern" ,perl-regexp-pattern)
  123. ("perl-software-license" ,perl-software-license)
  124. ("perl-test-requires" ,perl-test-requires)
  125. ("perl-test-roo" ,perl-test-roo)
  126. ("perl-test-script" ,perl-test-script)
  127. ("perl-universal-require" ,perl-universal-require)
  128. ("perl-number-range" ,perl-number-range)
  129. ("perl-sub-quote" ,perl-sub-quote)))
  130. (propagated-inputs
  131. `(("perl-getopt-long-descriptive" ,perl-getopt-long-descriptive)
  132. ("perl-moo" ,perl-moo-2)
  133. ("perl-namespace-clean" ,perl-namespace-clean)
  134. ("perl-path-iterator-rule" ,perl-path-iterator-rule)
  135. ("perl-path-tiny" ,perl-path-tiny)
  136. ("perl-pod-constants" ,perl-pod-constants)
  137. ("perl-regexp-pattern-license" ,perl-regexp-pattern-license)
  138. ("perl-sort-key" ,perl-sort-key)
  139. ("perl-strictures" ,perl-strictures-2)
  140. ("perl-string-copyright" ,perl-string-copyright)
  141. ("perl-string-escape" ,perl-string-escape)
  142. ("perl-try-tiny" ,perl-try-tiny)
  143. ("perl-module-runtime" ,perl-module-runtime)))
  144. (arguments
  145. `(#:phases
  146. (modify-phases %standard-phases
  147. (add-after 'install 'wrap-program
  148. (lambda* (#:key inputs outputs #:allow-other-keys)
  149. (let* ((out (assoc-ref outputs "out"))
  150. (perllib (string-append out "/lib/perl5/site_perl/"
  151. ,(package-version perl))))
  152. (wrap-program (string-append out "/bin/licensecheck")
  153. `("PERL5LIB" ":"
  154. prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
  155. #t))))))
  156. (home-page "https://metacpan.org/release/App-Licensecheck")
  157. (synopsis "License checker for source files")
  158. (description "Licensecheck attempts to determine the license that applies
  159. to each file passed to it, by searching the start of the file for text
  160. belonging to various licenses.")
  161. (license (package-license perl))))
  162. (define-public reuse
  163. (package
  164. (name "reuse")
  165. (version "0.13.0")
  166. (source
  167. (origin
  168. (method url-fetch)
  169. (uri (pypi-uri "reuse" version))
  170. (sha256
  171. (base32 "00gqpw124lz6kf3gi6m2i1bnxp3k5n3id0bgqff0bj08jga7pj49"))))
  172. (build-system python-build-system)
  173. (native-inputs
  174. `(("python-pytest" ,python-pytest)
  175. ("python-setuptools-scm" ,python-setuptools-scm)))
  176. (inputs
  177. `(("python-binaryornot" ,python-binaryornot)
  178. ("python-boolean.py" ,python-boolean.py)
  179. ("python-debian" ,python-debian)
  180. ("python-jinja2" ,python-jinja2)
  181. ("python-license-expression" ,python-license-expression)
  182. ("python-requests" ,python-requests)))
  183. (home-page "https://reuse.software/")
  184. (synopsis "Provide and verify copyright and licensing information")
  185. (description
  186. "The REUSE tool helps you achieve and confirm license compliance with the
  187. @uref{https://reuse.software, REUSE specification}, a set of recommendations
  188. for licensing Free Software projects. REUSE makes it easy to declare the
  189. licenses under which your works are released, especially when reusing software
  190. from different projects released under different licenses. It avoids reliance
  191. on fuzzy heuristicts and allows both legal experts and computers to understand
  192. how your project is licensed. This allows generating a \"bill of materials\"
  193. for software.
  194. This tool downloads full license texts, adds copyright and license information
  195. to file headers, and contains a linter to identify problems. There are other
  196. tools that have a lot more features and functionality surrounding the analysis
  197. and inspection of copyright and licenses in software projects. This one is
  198. designed to be simple.")
  199. (license (list asl2.0 gpl3+))))
  200. (define-public licenseheaders
  201. (package
  202. (name "licenseheaders")
  203. (version "0.8.6")
  204. (source
  205. (origin
  206. (method url-fetch)
  207. (uri (pypi-uri "licenseheaders" version))
  208. (sha256
  209. (base32 "073xcm10gyg5kcxqmbsyaz9sr0slbdwgr0r9qanch0zl8i0z9259"))))
  210. (build-system python-build-system)
  211. (arguments
  212. `(#:phases
  213. (modify-phases %standard-phases
  214. ;; Reported upstream:
  215. ;; <https://github.com/johann-petrak/licenseheaders/issues/47>.
  216. (add-after 'unpack 'patch-code
  217. (lambda _
  218. (substitute* "licenseheaders.py"
  219. (("\\\"filenames\\\": \\[\\\"CMakeLists.txt\\\"\\],")
  220. "\"filenames\": [\"CMakeLists.txt\"], \n \"extensions\": [],"))
  221. #t)))))
  222. (propagated-inputs
  223. `(("python-regex" ,python-regex)))
  224. (home-page "https://github.com/johann-petrak/licenseheaders")
  225. (synopsis "Add or change license headers for all files in a directory")
  226. (description
  227. "Licenseheaders is a Python 3 tool to update, change or add license
  228. headers to all files of any of the supported types in or below some
  229. directory.")
  230. (license expat)))