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> |
a046c03e | 4 | ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de> |
d5ee4342 OP |
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 | ||
21 | (define-module (gnu packages license) | |
d5ee4342 | 22 | #:use-module (gnu packages) |
7c552913 | 23 | #:use-module (gnu packages check) |
d5ee4342 | 24 | #:use-module (gnu packages perl) |
966873e3 | 25 | #:use-module (gnu packages perl-check) |
7c552913 TGR |
26 | #:use-module (gnu packages python-web) |
27 | #:use-module (gnu packages python-xyz) | |
966873e3 | 28 | #:use-module (guix build-system perl) |
7c552913 | 29 | #:use-module (guix build-system python) |
966873e3 | 30 | #:use-module (guix download) |
7c552913 | 31 | #:use-module (guix git-download) |
966873e3 TGR |
32 | #:use-module (guix licenses) |
33 | #:use-module (guix packages)) | |
d5ee4342 OP |
34 | |
35 | ;;; | |
36 | ;;; Please: Try to add new module packages in alphabetic order. | |
37 | ;;; | |
38 | ||
39 | (define-public perl-regexp-pattern-license | |
40 | (package | |
41 | (name "perl-regexp-pattern-license") | |
aa714a06 | 42 | (version "3.1.94") |
d5ee4342 OP |
43 | (source |
44 | (origin | |
45 | (method url-fetch) | |
46 | (uri (string-append | |
47 | "mirror://cpan/authors/id/J/JO/JONASS/Regexp-Pattern-License-" | |
48 | "v" version ".tar.gz")) | |
49 | (sha256 | |
aa714a06 | 50 | (base32 "0kznpv628jrndn4nw646f6pl7yqvmacwljlygvsjfdkyh0i4sr2k")))) |
d5ee4342 OP |
51 | (build-system perl-build-system) |
52 | (native-inputs | |
53 | `(("perl-regexp-pattern" ,perl-regexp-pattern) | |
54 | ("perl-test-exception" ,perl-test-exception))) | |
55 | (propagated-inputs | |
44d085b4 OP |
56 | `(("perl-strictures" ,perl-strictures-2) |
57 | ("perl-try-tiny" ,perl-try-tiny))) | |
9aba9b12 | 58 | (home-page "https://metacpan.org/release/Regexp-Pattern-License") |
d5ee4342 OP |
59 | (synopsis "Regular expressions for legal licenses") |
60 | (description "Regexp::Pattern::License provides a hash of regular | |
61 | expression patterns related to legal software licenses. | |
62 | ||
63 | Regexp::Pattern is a convention for organizing reusable regex patterns.") | |
64 | (license gpl3+))) | |
f4e2d9ee OP |
65 | |
66 | (define-public perl-string-copyright | |
67 | (package | |
68 | (name "perl-string-copyright") | |
104f475f | 69 | (version "0.003006") |
f4e2d9ee OP |
70 | (source |
71 | (origin | |
72 | (method url-fetch) | |
73 | (uri (string-append | |
74 | "mirror://cpan/authors/id/J/JO/JONASS/String-Copyright-" | |
75 | version ".tar.gz")) | |
76 | (sha256 | |
77 | (base32 | |
104f475f | 78 | "0fzymv065nn3glwnw34nkyadzw2dh4rcz8avmki4zrnk4k45m01a")))) |
f4e2d9ee OP |
79 | (build-system perl-build-system) |
80 | (native-inputs | |
81 | `(("perl-number-range" ,perl-number-range))) | |
82 | (propagated-inputs | |
83 | `(("perl-exporter-tiny" ,perl-exporter-tiny))) | |
9aba9b12 | 84 | (home-page "https://metacpan.org/release/String-Copyright") |
f4e2d9ee OP |
85 | (synopsis "Representation of text-based copyright statements") |
86 | (description "String::Copyright Parses common styles of copyright | |
87 | statements and serializes in normalized format.") | |
88 | (license gpl3+))) | |
82e5e0dd OP |
89 | |
90 | (define-public perl-software-license | |
91 | (package | |
92 | (name "perl-software-license") | |
48c5e0cb | 93 | (version "0.103014") |
82e5e0dd OP |
94 | (source |
95 | (origin | |
96 | (method url-fetch) | |
97 | (uri (string-append | |
98 | "mirror://cpan/authors/id/L/LE/LEONT/Software-License-" | |
99 | version ".tar.gz")) | |
100 | (sha256 | |
101 | (base32 | |
48c5e0cb | 102 | "128pbm9pf5drakm9bpkifc1zg8f005xabfwzg21nc03m5mhfligb")))) |
82e5e0dd OP |
103 | (build-system perl-build-system) |
104 | (native-inputs | |
105 | `(("perl-try-tiny" ,perl-try-tiny))) | |
106 | (propagated-inputs | |
107 | `(("perl-data-section" ,perl-data-section) | |
108 | ("perl-text-template" ,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 | |
128 | `(("perl-regexp-pattern" ,perl-regexp-pattern) | |
129 | ("perl-software-license" ,perl-software-license) | |
130 | ("perl-test-requires" ,perl-test-requires) | |
131 | ("perl-test-roo" ,perl-test-roo) | |
132 | ("perl-test-script" ,perl-test-script) | |
133 | ("perl-universal-require" ,perl-universal-require) | |
134 | ("perl-number-range" ,perl-number-range) | |
135 | ("perl-sub-quote" ,perl-sub-quote))) | |
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 | |
165 | to each file passed to it, by searching the start of the file for text | |
166 | belonging to various licenses.") | |
167 | (license (package-license perl)))) | |
7c552913 TGR |
168 | |
169 | (define-public reuse | |
170 | (package | |
171 | (name "reuse") | |
a046c03e | 172 | (version "0.11.1") |
7c552913 TGR |
173 | (source |
174 | (origin | |
56b27a15 TGR |
175 | (method url-fetch) |
176 | (uri (pypi-uri "reuse" version)) | |
7c552913 | 177 | (sha256 |
a046c03e | 178 | (base32 "09qjb4f49vr0a7zrszab8g719ilg2p6b942mr0bgyvplrjikkid5")))) |
7c552913 TGR |
179 | (build-system python-build-system) |
180 | (native-inputs | |
a046c03e MR |
181 | `(("python-pytest" ,python-pytest) |
182 | ("python-setuptools-scm" ,python-setuptools-scm))) | |
7c552913 TGR |
183 | (inputs |
184 | `(("python-binaryornot" ,python-binaryornot) | |
185 | ("python-boolean.py" ,python-boolean.py) | |
186 | ("python-debian" ,python-debian) | |
187 | ("python-jinja2" ,python-jinja2) | |
188 | ("python-license-expression" ,python-license-expression) | |
189 | ("python-requests" ,python-requests))) | |
190 | (home-page "https://reuse.software/") | |
191 | (synopsis "Provide and verify copyright and licensing information") | |
192 | (description | |
193 | "The REUSE tool helps you achieve and confirm license compliance with the | |
194 | @uref{https://reuse.software, REUSE specification}, a set of recommendations | |
195 | for licensing Free Software projects. REUSE makes it easy to declare the | |
196 | licenses under which your works are released, especially when reusing software | |
197 | from different projects released under different licenses. It avoids reliance | |
198 | on fuzzy heuristicts and allows both legal experts and computers to understand | |
199 | how your project is licensed. This allows generating a \"bill of materials\" | |
200 | for software. | |
201 | ||
202 | This tool downloads full license texts, adds copyright and license information | |
203 | to file headers, and contains a linter to identify problems. There are other | |
204 | tools that have a lot more features and functionality surrounding the analysis | |
205 | and inspection of copyright and licenses in software projects. This one is | |
206 | designed to be simple.") | |
207 | (license (list asl2.0 gpl3+)))) |