1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
3 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
6 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
36 ;;; Please: Try to add new module packages in alphabetic order.
39 (define-public perl-regexp-pattern-license
41 (name "perl-regexp-pattern-license")
47 "mirror://cpan/authors/id/J/JO/JONASS/Regexp-Pattern-License-"
48 "v" version ".tar.gz"))
50 (base32 "0kznpv628jrndn4nw646f6pl7yqvmacwljlygvsjfdkyh0i4sr2k"))))
51 (build-system perl-build-system)
53 `(("perl-regexp-pattern" ,perl-regexp-pattern)
54 ("perl-test-exception" ,perl-test-exception)))
56 `(("perl-strictures" ,perl-strictures-2)
57 ("perl-try-tiny" ,perl-try-tiny)))
58 (home-page "https://metacpan.org/release/Regexp-Pattern-License")
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.
63 Regexp::Pattern is a convention for organizing reusable regex patterns.")
66 (define-public perl-string-copyright
68 (name "perl-string-copyright")
74 "mirror://cpan/authors/id/J/JO/JONASS/String-Copyright-"
78 "0fzymv065nn3glwnw34nkyadzw2dh4rcz8avmki4zrnk4k45m01a"))))
79 (build-system perl-build-system)
81 `(("perl-number-range" ,perl-number-range)))
83 `(("perl-exporter-tiny" ,perl-exporter-tiny)))
84 (home-page "https://metacpan.org/release/String-Copyright")
85 (synopsis "Representation of text-based copyright statements")
86 (description "String::Copyright Parses common styles of copyright
87 statements and serializes in normalized format.")
90 (define-public perl-software-license
92 (name "perl-software-license")
98 "mirror://cpan/authors/id/L/LE/LEONT/Software-License-"
102 "128pbm9pf5drakm9bpkifc1zg8f005xabfwzg21nc03m5mhfligb"))))
103 (build-system perl-build-system)
105 `(("perl-try-tiny" ,perl-try-tiny)))
107 `(("perl-data-section" ,perl-data-section)
108 ("perl-text-template" ,perl-text-template)))
109 (home-page "https://metacpan.org/release/Software-License")
110 (synopsis "Templated software licenses")
111 (description "This package provides templated software licenses.")
112 (license (package-license perl))))
114 (define-public licensecheck
116 (name "licensecheck")
121 "mirror://cpan/authors/id/J/JO/JONASS/App-Licensecheck-"
122 "v" version ".tar.gz"))
125 "12l83zf85zagpagizmzy3bwkc659sbzqf18cycx8g4h6d3mc5kqw"))))
126 (build-system perl-build-system)
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)))
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)))
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")
160 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
162 (home-page "https://metacpan.org/release/App-Licensecheck")
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))))
176 (uri (pypi-uri "reuse" version))
178 (base32 "09qjb4f49vr0a7zrszab8g719ilg2p6b942mr0bgyvplrjikkid5"))))
179 (build-system python-build-system)
181 `(("python-pytest" ,python-pytest)
182 ("python-setuptools-scm" ,python-setuptools-scm)))
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")
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\"
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+))))