gnu: emacs-helm: Update to 3.8.7.
[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>
5db04059 3;;; Copyright © 2018–2021 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>
f499f629 6;;; Copyright © 2022 Felix Gruber <felgru@posteo.net>
d5ee4342
OP
7;;;
8;;; This file is part of GNU Guix.
9;;;
10;;; GNU Guix is free software; you can redistribute it and/or modify it
11;;; under the terms of the GNU General Public License as published by
12;;; the Free Software Foundation; either version 3 of the License, or (at
13;;; your option) any later version.
14;;;
15;;; GNU Guix is distributed in the hope that it will be useful, but
16;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;;; GNU General Public License for more details.
19;;;
20;;; You should have received a copy of the GNU General Public License
21;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23(define-module (gnu packages license)
d5ee4342 24 #:use-module (gnu packages)
7c552913 25 #:use-module (gnu packages check)
d5ee4342 26 #:use-module (gnu packages perl)
966873e3 27 #:use-module (gnu packages perl-check)
ed210c1b 28 #:use-module (gnu packages python-build)
7c552913
TGR
29 #:use-module (gnu packages python-web)
30 #:use-module (gnu packages python-xyz)
966873e3 31 #:use-module (guix build-system perl)
7c552913 32 #:use-module (guix build-system python)
966873e3 33 #:use-module (guix download)
7c552913 34 #:use-module (guix git-download)
966873e3
TGR
35 #:use-module (guix licenses)
36 #:use-module (guix packages))
d5ee4342
OP
37
38;;;
39;;; Please: Try to add new module packages in alphabetic order.
40;;;
41
42(define-public perl-regexp-pattern-license
43 (package
44 (name "perl-regexp-pattern-license")
aa714a06 45 (version "3.1.94")
d5ee4342
OP
46 (source
47 (origin
48 (method url-fetch)
49 (uri (string-append
50 "mirror://cpan/authors/id/J/JO/JONASS/Regexp-Pattern-License-"
51 "v" version ".tar.gz"))
52 (sha256
aa714a06 53 (base32 "0kznpv628jrndn4nw646f6pl7yqvmacwljlygvsjfdkyh0i4sr2k"))))
d5ee4342
OP
54 (build-system perl-build-system)
55 (native-inputs
8394619b 56 (list perl-regexp-pattern perl-test-exception))
d5ee4342 57 (propagated-inputs
8394619b 58 (list perl-strictures-2 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
8394619b 82 (list perl-number-range))
f4e2d9ee 83 (propagated-inputs
8394619b 84 (list 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
8394619b 106 (list perl-try-tiny))
82e5e0dd 107 (propagated-inputs
8394619b 108 (list perl-data-section perl-text-template))
9aba9b12 109 (home-page "https://metacpan.org/release/Software-License")
82e5e0dd
OP
110 (synopsis "Templated software licenses")
111 (description "This package provides templated software licenses.")
112 (license (package-license perl))))
f09cb93e
OP
113
114(define-public licensecheck
115 (package
116 (name "licensecheck")
bdc63012 117 (version "3.0.37")
f09cb93e
OP
118 (source (origin
119 (method url-fetch)
120 (uri (string-append
121 "mirror://cpan/authors/id/J/JO/JONASS/App-Licensecheck-"
122 "v" version ".tar.gz"))
123 (sha256
124 (base32
bdc63012 125 "12l83zf85zagpagizmzy3bwkc659sbzqf18cycx8g4h6d3mc5kqw"))))
f09cb93e
OP
126 (build-system perl-build-system)
127 (native-inputs
8394619b
LC
128 (list perl-regexp-pattern
129 perl-software-license
130 perl-test-requires
131 perl-test-roo
132 perl-test-script
133 perl-universal-require
134 perl-number-range
135 perl-sub-quote))
f09cb93e
OP
136 (propagated-inputs
137 `(("perl-getopt-long-descriptive" ,perl-getopt-long-descriptive)
138 ("perl-moo" ,perl-moo-2)
139 ("perl-namespace-clean" ,perl-namespace-clean)
140 ("perl-path-iterator-rule" ,perl-path-iterator-rule)
141 ("perl-path-tiny" ,perl-path-tiny)
142 ("perl-pod-constants" ,perl-pod-constants)
143 ("perl-regexp-pattern-license" ,perl-regexp-pattern-license)
144 ("perl-sort-key" ,perl-sort-key)
145 ("perl-strictures" ,perl-strictures-2)
146 ("perl-string-copyright" ,perl-string-copyright)
147 ("perl-string-escape" ,perl-string-escape)
148 ("perl-try-tiny" ,perl-try-tiny)
149 ("perl-module-runtime" ,perl-module-runtime)))
150 (arguments
151 `(#:phases
152 (modify-phases %standard-phases
153 (add-after 'install 'wrap-program
154 (lambda* (#:key inputs outputs #:allow-other-keys)
155 (let* ((out (assoc-ref outputs "out"))
156 (perllib (string-append out "/lib/perl5/site_perl/"
157 ,(package-version perl))))
158 (wrap-program (string-append out "/bin/licensecheck")
159 `("PERL5LIB" ":"
160 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
161 #t))))))
9aba9b12 162 (home-page "https://metacpan.org/release/App-Licensecheck")
f09cb93e
OP
163 (synopsis "License checker for source files")
164 (description "Licensecheck attempts to determine the license that applies
165to each file passed to it, by searching the start of the file for text
166belonging to various licenses.")
167 (license (package-license perl))))
7c552913
TGR
168
169(define-public reuse
170 (package
171 (name "reuse")
1903b0cb 172 (version "1.0.0")
7c552913
TGR
173 (source
174 (origin
56b27a15
TGR
175 (method url-fetch)
176 (uri (pypi-uri "reuse" version))
7c552913 177 (sha256
1903b0cb 178 (base32 "1m78q5x19xvhywi1xl0prrag89ihvqiq14lba27rrxl75nz24c6v"))))
7c552913
TGR
179 (build-system python-build-system)
180 (native-inputs
8394619b 181 (list python-pytest python-setuptools-scm))
7c552913 182 (inputs
8394619b
LC
183 (list python-binaryornot
184 python-boolean.py
185 python-debian
186 python-jinja2
187 python-license-expression
188 python-requests))
7c552913
TGR
189 (home-page "https://reuse.software/")
190 (synopsis "Provide and verify copyright and licensing information")
191 (description
192 "The REUSE tool helps you achieve and confirm license compliance with the
193@uref{https://reuse.software, REUSE specification}, a set of recommendations
194for licensing Free Software projects. REUSE makes it easy to declare the
195licenses under which your works are released, especially when reusing software
196from different projects released under different licenses. It avoids reliance
197on fuzzy heuristicts and allows both legal experts and computers to understand
198how your project is licensed. This allows generating a \"bill of materials\"
199for software.
200
201This tool downloads full license texts, adds copyright and license information
202to file headers, and contains a linter to identify problems. There are other
203tools that have a lot more features and functionality surrounding the analysis
204and inspection of copyright and licenses in software projects. This one is
205designed to be simple.")
206 (license (list asl2.0 gpl3+))))
232a10f0
TLC
207
208(define-public licenseheaders
209 (package
210 (name "licenseheaders")
211 (version "0.8.6")
212 (source
213 (origin
214 (method url-fetch)
215 (uri (pypi-uri "licenseheaders" version))
216 (sha256
217 (base32 "073xcm10gyg5kcxqmbsyaz9sr0slbdwgr0r9qanch0zl8i0z9259"))))
218 (build-system python-build-system)
219 (arguments
220 `(#:phases
221 (modify-phases %standard-phases
222 ;; Reported upstream:
223 ;; <https://github.com/johann-petrak/licenseheaders/issues/47>.
224 (add-after 'unpack 'patch-code
225 (lambda _
226 (substitute* "licenseheaders.py"
227 (("\\\"filenames\\\": \\[\\\"CMakeLists.txt\\\"\\],")
228 "\"filenames\": [\"CMakeLists.txt\"], \n \"extensions\": [],"))
229 #t)))))
230 (propagated-inputs
8394619b 231 (list python-regex))
c4178e1a 232 (home-page "https://github.com/johann-petrak/licenseheaders")
232a10f0
TLC
233 (synopsis "Add or change license headers for all files in a directory")
234 (description
235 "Licenseheaders is a Python 3 tool to update, change or add license
236headers to all files of any of the supported types in or below some
237directory.")
238 (license expat)))