1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
3 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
5 ;;; This file is part of GNU Guix.
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.
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.
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/>.
20 (define-module (gnu packages license)
21 #:use-module (guix licenses)
22 #:use-module (gnu packages)
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix build-system perl)
26 #:use-module (gnu packages perl)
27 #:use-module (gnu packages perl-check))
30 ;;; Please: Try to add new module packages in alphabetic order.
33 (define-public perl-regexp-pattern-license
35 (name "perl-regexp-pattern-license")
41 "mirror://cpan/authors/id/J/JO/JONASS/Regexp-Pattern-License-"
42 "v" version ".tar.gz"))
45 "0gxv8wpvlllmvhkpixv5x23ywn1s6zs7ypcs38s7nfh4phamyixh"))))
46 (build-system perl-build-system)
48 `(("perl-regexp-pattern" ,perl-regexp-pattern)
49 ("perl-test-exception" ,perl-test-exception)))
51 `(("perl-strictures" ,perl-strictures-2)
52 ("perl-try-tiny" ,perl-try-tiny)))
53 (home-page "https://metacpan.org/release/Regexp-Pattern-License")
54 (synopsis "Regular expressions for legal licenses")
55 (description "Regexp::Pattern::License provides a hash of regular
56 expression patterns related to legal software licenses.
58 Regexp::Pattern is a convention for organizing reusable regex patterns.")
61 (define-public perl-string-copyright
63 (name "perl-string-copyright")
69 "mirror://cpan/authors/id/J/JO/JONASS/String-Copyright-"
73 "0fzymv065nn3glwnw34nkyadzw2dh4rcz8avmki4zrnk4k45m01a"))))
74 (build-system perl-build-system)
76 `(("perl-number-range" ,perl-number-range)))
78 `(("perl-exporter-tiny" ,perl-exporter-tiny)))
79 (home-page "https://metacpan.org/release/String-Copyright")
80 (synopsis "Representation of text-based copyright statements")
81 (description "String::Copyright Parses common styles of copyright
82 statements and serializes in normalized format.")
85 (define-public perl-software-license
87 (name "perl-software-license")
93 "mirror://cpan/authors/id/L/LE/LEONT/Software-License-"
97 "128pbm9pf5drakm9bpkifc1zg8f005xabfwzg21nc03m5mhfligb"))))
98 (build-system perl-build-system)
100 `(("perl-try-tiny" ,perl-try-tiny)))
102 `(("perl-data-section" ,perl-data-section)
103 ("perl-text-template" ,perl-text-template)))
104 (home-page "https://metacpan.org/release/Software-License")
105 (synopsis "Templated software licenses")
106 (description "This package provides templated software licenses.")
107 (license (package-license perl))))
109 (define-public licensecheck
111 (name "licensecheck")
116 "mirror://cpan/authors/id/J/JO/JONASS/App-Licensecheck-"
117 "v" version ".tar.gz"))
120 "0y14ppq6f9hc0rc0syhfgms1r7fd51vpgfx5va6b2v84y8anb6g1"))))
121 (build-system perl-build-system)
123 `(("perl-regexp-pattern" ,perl-regexp-pattern)
124 ("perl-software-license" ,perl-software-license)
125 ("perl-test-requires" ,perl-test-requires)
126 ("perl-test-roo" ,perl-test-roo)
127 ("perl-test-script" ,perl-test-script)
128 ("perl-universal-require" ,perl-universal-require)
129 ("perl-number-range" ,perl-number-range)
130 ("perl-sub-quote" ,perl-sub-quote)))
132 `(("perl-getopt-long-descriptive" ,perl-getopt-long-descriptive)
133 ("perl-moo" ,perl-moo-2)
134 ("perl-namespace-clean" ,perl-namespace-clean)
135 ("perl-path-iterator-rule" ,perl-path-iterator-rule)
136 ("perl-path-tiny" ,perl-path-tiny)
137 ("perl-pod-constants" ,perl-pod-constants)
138 ("perl-regexp-pattern-license" ,perl-regexp-pattern-license)
139 ("perl-sort-key" ,perl-sort-key)
140 ("perl-strictures" ,perl-strictures-2)
141 ("perl-string-copyright" ,perl-string-copyright)
142 ("perl-string-escape" ,perl-string-escape)
143 ("perl-try-tiny" ,perl-try-tiny)
144 ("perl-module-runtime" ,perl-module-runtime)))
147 (modify-phases %standard-phases
148 (add-after 'install 'wrap-program
149 (lambda* (#:key inputs outputs #:allow-other-keys)
150 (let* ((out (assoc-ref outputs "out"))
151 (perllib (string-append out "/lib/perl5/site_perl/"
152 ,(package-version perl))))
153 (wrap-program (string-append out "/bin/licensecheck")
155 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
157 (home-page "https://metacpan.org/release/App-Licensecheck")
158 (synopsis "License checker for source files")
159 (description "Licensecheck attempts to determine the license that applies
160 to each file passed to it, by searching the start of the file for text
161 belonging to various licenses.")
162 (license (package-license perl))))