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