2018-01-27 22:27:00 +00:00
|
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
|
|
|
|
;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
|
2021-07-04 15:44:27 +00:00
|
|
|
|
;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
|
2021-01-11 23:00:39 +00:00
|
|
|
|
;;; Copyright © 2020, 2021 Michael Rohleder <mike@rohleder.de>
|
2021-01-29 10:09:48 +00:00
|
|
|
|
;;; Copyright © 2021 Tanguy Le Carrour <tanguy@bioneland.org>
|
2022-01-07 18:08:39 +00:00
|
|
|
|
;;; Copyright © 2022 Felix Gruber <felgru@posteo.net>
|
2024-01-19 20:34:12 +00:00
|
|
|
|
;;; Copyright © 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
2018-01-27 22:27:00 +00:00
|
|
|
|
;;;
|
|
|
|
|
;;; This file is part of GNU Guix.
|
|
|
|
|
;;;
|
|
|
|
|
;;; GNU Guix is free software; you can redistribute it and/or modify it
|
|
|
|
|
;;; under the terms of the GNU General Public License as published by
|
|
|
|
|
;;; the Free Software Foundation; either version 3 of the License, or (at
|
|
|
|
|
;;; your option) any later version.
|
|
|
|
|
;;;
|
|
|
|
|
;;; GNU Guix is distributed in the hope that it will be useful, but
|
|
|
|
|
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
;;; GNU General Public License for more details.
|
|
|
|
|
;;;
|
|
|
|
|
;;; You should have received a copy of the GNU General Public License
|
|
|
|
|
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
(define-module (gnu packages license)
|
|
|
|
|
#:use-module (gnu packages)
|
2019-09-27 10:08:45 +00:00
|
|
|
|
#:use-module (gnu packages check)
|
2018-01-27 22:27:00 +00:00
|
|
|
|
#:use-module (gnu packages perl)
|
2019-09-27 08:22:27 +00:00
|
|
|
|
#:use-module (gnu packages perl-check)
|
2022-06-25 01:30:59 +00:00
|
|
|
|
#:use-module (gnu packages python-build)
|
2019-09-27 10:08:45 +00:00
|
|
|
|
#:use-module (gnu packages python-web)
|
|
|
|
|
#:use-module (gnu packages python-xyz)
|
2019-09-27 08:22:27 +00:00
|
|
|
|
#:use-module (guix build-system perl)
|
2019-09-27 10:08:45 +00:00
|
|
|
|
#:use-module (guix build-system python)
|
2023-03-14 18:27:10 +00:00
|
|
|
|
#:use-module (guix build-system pyproject)
|
2019-09-27 08:22:27 +00:00
|
|
|
|
#:use-module (guix download)
|
2024-01-19 20:34:12 +00:00
|
|
|
|
#:use-module (guix gexp)
|
2019-09-27 10:08:45 +00:00
|
|
|
|
#:use-module (guix git-download)
|
2019-09-27 08:22:27 +00:00
|
|
|
|
#:use-module (guix licenses)
|
|
|
|
|
#:use-module (guix packages))
|
2018-01-27 22:27:00 +00:00
|
|
|
|
|
|
|
|
|
;;;
|
|
|
|
|
;;; Please: Try to add new module packages in alphabetic order.
|
|
|
|
|
;;;
|
|
|
|
|
|
|
|
|
|
(define-public perl-regexp-pattern-license
|
|
|
|
|
(package
|
|
|
|
|
(name "perl-regexp-pattern-license")
|
2019-10-07 08:32:18 +00:00
|
|
|
|
(version "3.1.94")
|
2018-01-27 22:27:00 +00:00
|
|
|
|
(source
|
|
|
|
|
(origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append
|
|
|
|
|
"mirror://cpan/authors/id/J/JO/JONASS/Regexp-Pattern-License-"
|
|
|
|
|
"v" version ".tar.gz"))
|
|
|
|
|
(sha256
|
2019-10-07 08:32:18 +00:00
|
|
|
|
(base32 "0kznpv628jrndn4nw646f6pl7yqvmacwljlygvsjfdkyh0i4sr2k"))))
|
2018-01-27 22:27:00 +00:00
|
|
|
|
(build-system perl-build-system)
|
|
|
|
|
(native-inputs
|
2021-12-13 16:18:24 +00:00
|
|
|
|
(list perl-regexp-pattern perl-test-exception))
|
2018-01-27 22:27:00 +00:00
|
|
|
|
(propagated-inputs
|
2021-12-13 16:18:24 +00:00
|
|
|
|
(list perl-strictures-2 perl-try-tiny))
|
2018-08-11 13:53:20 +00:00
|
|
|
|
(home-page "https://metacpan.org/release/Regexp-Pattern-License")
|
2018-01-27 22:27:00 +00:00
|
|
|
|
(synopsis "Regular expressions for legal licenses")
|
|
|
|
|
(description "Regexp::Pattern::License provides a hash of regular
|
|
|
|
|
expression patterns related to legal software licenses.
|
|
|
|
|
|
|
|
|
|
Regexp::Pattern is a convention for organizing reusable regex patterns.")
|
|
|
|
|
(license gpl3+)))
|
2018-01-27 22:41:35 +00:00
|
|
|
|
|
|
|
|
|
(define-public perl-string-copyright
|
|
|
|
|
(package
|
|
|
|
|
(name "perl-string-copyright")
|
2018-10-04 03:58:52 +00:00
|
|
|
|
(version "0.003006")
|
2018-01-27 22:41:35 +00:00
|
|
|
|
(source
|
|
|
|
|
(origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append
|
|
|
|
|
"mirror://cpan/authors/id/J/JO/JONASS/String-Copyright-"
|
|
|
|
|
version ".tar.gz"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2018-10-04 03:58:52 +00:00
|
|
|
|
"0fzymv065nn3glwnw34nkyadzw2dh4rcz8avmki4zrnk4k45m01a"))))
|
2018-01-27 22:41:35 +00:00
|
|
|
|
(build-system perl-build-system)
|
|
|
|
|
(native-inputs
|
2021-12-13 16:18:24 +00:00
|
|
|
|
(list perl-number-range))
|
2018-01-27 22:41:35 +00:00
|
|
|
|
(propagated-inputs
|
2021-12-13 16:18:24 +00:00
|
|
|
|
(list perl-exporter-tiny))
|
2018-08-11 13:53:20 +00:00
|
|
|
|
(home-page "https://metacpan.org/release/String-Copyright")
|
2018-01-27 22:41:35 +00:00
|
|
|
|
(synopsis "Representation of text-based copyright statements")
|
|
|
|
|
(description "String::Copyright Parses common styles of copyright
|
|
|
|
|
statements and serializes in normalized format.")
|
|
|
|
|
(license gpl3+)))
|
2018-01-28 17:53:47 +00:00
|
|
|
|
|
|
|
|
|
(define-public perl-software-license
|
|
|
|
|
(package
|
|
|
|
|
(name "perl-software-license")
|
2019-03-22 14:23:12 +00:00
|
|
|
|
(version "0.103014")
|
2018-01-28 17:53:47 +00:00
|
|
|
|
(source
|
|
|
|
|
(origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append
|
|
|
|
|
"mirror://cpan/authors/id/L/LE/LEONT/Software-License-"
|
|
|
|
|
version ".tar.gz"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2019-03-22 14:23:12 +00:00
|
|
|
|
"128pbm9pf5drakm9bpkifc1zg8f005xabfwzg21nc03m5mhfligb"))))
|
2018-01-28 17:53:47 +00:00
|
|
|
|
(build-system perl-build-system)
|
|
|
|
|
(native-inputs
|
2021-12-13 16:18:24 +00:00
|
|
|
|
(list perl-try-tiny))
|
2018-01-28 17:53:47 +00:00
|
|
|
|
(propagated-inputs
|
2021-12-13 16:18:24 +00:00
|
|
|
|
(list perl-data-section perl-text-template))
|
2018-08-11 13:53:20 +00:00
|
|
|
|
(home-page "https://metacpan.org/release/Software-License")
|
2018-01-28 17:53:47 +00:00
|
|
|
|
(synopsis "Templated software licenses")
|
|
|
|
|
(description "This package provides templated software licenses.")
|
|
|
|
|
(license (package-license perl))))
|
2018-01-28 18:12:30 +00:00
|
|
|
|
|
|
|
|
|
(define-public licensecheck
|
|
|
|
|
(package
|
|
|
|
|
(name "licensecheck")
|
2019-10-07 08:32:49 +00:00
|
|
|
|
(version "3.0.37")
|
2018-01-28 18:12:30 +00:00
|
|
|
|
(source (origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (string-append
|
|
|
|
|
"mirror://cpan/authors/id/J/JO/JONASS/App-Licensecheck-"
|
|
|
|
|
"v" version ".tar.gz"))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32
|
2019-10-07 08:32:49 +00:00
|
|
|
|
"12l83zf85zagpagizmzy3bwkc659sbzqf18cycx8g4h6d3mc5kqw"))))
|
2018-01-28 18:12:30 +00:00
|
|
|
|
(build-system perl-build-system)
|
|
|
|
|
(native-inputs
|
2021-12-13 16:18:24 +00:00
|
|
|
|
(list perl-regexp-pattern
|
|
|
|
|
perl-software-license
|
|
|
|
|
perl-test-requires
|
|
|
|
|
perl-test-roo
|
|
|
|
|
perl-test-script
|
|
|
|
|
perl-universal-require
|
|
|
|
|
perl-number-range
|
|
|
|
|
perl-sub-quote))
|
2018-01-28 18:12:30 +00:00
|
|
|
|
(propagated-inputs
|
|
|
|
|
`(("perl-getopt-long-descriptive" ,perl-getopt-long-descriptive)
|
|
|
|
|
("perl-moo" ,perl-moo-2)
|
|
|
|
|
("perl-namespace-clean" ,perl-namespace-clean)
|
|
|
|
|
("perl-path-iterator-rule" ,perl-path-iterator-rule)
|
|
|
|
|
("perl-path-tiny" ,perl-path-tiny)
|
|
|
|
|
("perl-pod-constants" ,perl-pod-constants)
|
|
|
|
|
("perl-regexp-pattern-license" ,perl-regexp-pattern-license)
|
|
|
|
|
("perl-sort-key" ,perl-sort-key)
|
|
|
|
|
("perl-strictures" ,perl-strictures-2)
|
|
|
|
|
("perl-string-copyright" ,perl-string-copyright)
|
|
|
|
|
("perl-string-escape" ,perl-string-escape)
|
|
|
|
|
("perl-try-tiny" ,perl-try-tiny)
|
|
|
|
|
("perl-module-runtime" ,perl-module-runtime)))
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:phases
|
|
|
|
|
(modify-phases %standard-phases
|
|
|
|
|
(add-after 'install 'wrap-program
|
|
|
|
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
|
|
|
|
(let* ((out (assoc-ref outputs "out"))
|
|
|
|
|
(perllib (string-append out "/lib/perl5/site_perl/"
|
|
|
|
|
,(package-version perl))))
|
|
|
|
|
(wrap-program (string-append out "/bin/licensecheck")
|
|
|
|
|
`("PERL5LIB" ":"
|
|
|
|
|
prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
|
|
|
|
|
#t))))))
|
2018-08-11 13:53:20 +00:00
|
|
|
|
(home-page "https://metacpan.org/release/App-Licensecheck")
|
2018-01-28 18:12:30 +00:00
|
|
|
|
(synopsis "License checker for source files")
|
|
|
|
|
(description "Licensecheck attempts to determine the license that applies
|
|
|
|
|
to each file passed to it, by searching the start of the file for text
|
|
|
|
|
belonging to various licenses.")
|
|
|
|
|
(license (package-license perl))))
|
2019-09-27 10:08:45 +00:00
|
|
|
|
|
|
|
|
|
(define-public reuse
|
|
|
|
|
(package
|
|
|
|
|
(name "reuse")
|
2024-07-02 16:31:05 +00:00
|
|
|
|
(version "3.0.2")
|
2019-09-27 10:08:45 +00:00
|
|
|
|
(source
|
|
|
|
|
(origin
|
2020-01-10 12:35:37 +00:00
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (pypi-uri "reuse" version))
|
2019-09-27 10:08:45 +00:00
|
|
|
|
(sha256
|
2024-07-02 16:31:05 +00:00
|
|
|
|
(base32 "19ijdwbr47pa0ba30s40b53qb0chyq27akj0484aj9s5p1i85svk"))))
|
2023-03-14 18:27:10 +00:00
|
|
|
|
(build-system pyproject-build-system)
|
2024-01-19 20:34:12 +00:00
|
|
|
|
(arguments
|
|
|
|
|
;; Change directory before running the test suite to avoid having both
|
|
|
|
|
;; the local sources on GUIX_PYTHONPATH as well as the installed
|
|
|
|
|
;; libraries confusing Pytest (ImportPathMismatchError).
|
|
|
|
|
(list #:phases #~(modify-phases %standard-phases
|
|
|
|
|
(add-before 'check 'chdir
|
|
|
|
|
(lambda _
|
|
|
|
|
(chdir "/tmp"))))))
|
|
|
|
|
(native-inputs (list python-poetry-core python-pytest))
|
|
|
|
|
(inputs (list python-binaryornot
|
|
|
|
|
python-boolean.py
|
|
|
|
|
python-debian
|
|
|
|
|
python-jinja2
|
|
|
|
|
python-license-expression))
|
2019-09-27 10:08:45 +00:00
|
|
|
|
(home-page "https://reuse.software/")
|
|
|
|
|
(synopsis "Provide and verify copyright and licensing information")
|
|
|
|
|
(description
|
|
|
|
|
"The REUSE tool helps you achieve and confirm license compliance with the
|
|
|
|
|
@uref{https://reuse.software, REUSE specification}, a set of recommendations
|
|
|
|
|
for licensing Free Software projects. REUSE makes it easy to declare the
|
|
|
|
|
licenses under which your works are released, especially when reusing software
|
|
|
|
|
from different projects released under different licenses. It avoids reliance
|
|
|
|
|
on fuzzy heuristicts and allows both legal experts and computers to understand
|
|
|
|
|
how your project is licensed. This allows generating a \"bill of materials\"
|
|
|
|
|
for software.
|
|
|
|
|
|
|
|
|
|
This tool downloads full license texts, adds copyright and license information
|
|
|
|
|
to file headers, and contains a linter to identify problems. There are other
|
|
|
|
|
tools that have a lot more features and functionality surrounding the analysis
|
|
|
|
|
and inspection of copyright and licenses in software projects. This one is
|
|
|
|
|
designed to be simple.")
|
|
|
|
|
(license (list asl2.0 gpl3+))))
|
2021-01-29 10:09:48 +00:00
|
|
|
|
|
|
|
|
|
(define-public licenseheaders
|
|
|
|
|
(package
|
|
|
|
|
(name "licenseheaders")
|
|
|
|
|
(version "0.8.6")
|
|
|
|
|
(source
|
|
|
|
|
(origin
|
|
|
|
|
(method url-fetch)
|
|
|
|
|
(uri (pypi-uri "licenseheaders" version))
|
|
|
|
|
(sha256
|
|
|
|
|
(base32 "073xcm10gyg5kcxqmbsyaz9sr0slbdwgr0r9qanch0zl8i0z9259"))))
|
|
|
|
|
(build-system python-build-system)
|
|
|
|
|
(arguments
|
|
|
|
|
`(#:phases
|
|
|
|
|
(modify-phases %standard-phases
|
|
|
|
|
;; Reported upstream:
|
|
|
|
|
;; <https://github.com/johann-petrak/licenseheaders/issues/47>.
|
|
|
|
|
(add-after 'unpack 'patch-code
|
|
|
|
|
(lambda _
|
|
|
|
|
(substitute* "licenseheaders.py"
|
|
|
|
|
(("\\\"filenames\\\": \\[\\\"CMakeLists.txt\\\"\\],")
|
|
|
|
|
"\"filenames\": [\"CMakeLists.txt\"], \n \"extensions\": [],"))
|
|
|
|
|
#t)))))
|
|
|
|
|
(propagated-inputs
|
2021-12-13 16:18:24 +00:00
|
|
|
|
(list python-regex))
|
2021-02-28 10:13:01 +00:00
|
|
|
|
(home-page "https://github.com/johann-petrak/licenseheaders")
|
2021-01-29 10:09:48 +00:00
|
|
|
|
(synopsis "Add or change license headers for all files in a directory")
|
|
|
|
|
(description
|
|
|
|
|
"Licenseheaders is a Python 3 tool to update, change or add license
|
|
|
|
|
headers to all files of any of the supported types in or below some
|
|
|
|
|
directory.")
|
|
|
|
|
(license expat)))
|