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