gnu: python-llvmlite: Remove obsolete patch.
[jackhill/guix/guix.git] / gnu / packages / license.scm
index 3933b31..44c7a1b 100644 (file)
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
+;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -32,7 +33,7 @@
 (define-public perl-regexp-pattern-license
   (package
     (name "perl-regexp-pattern-license")
-    (version "3.1.0")
+    (version "3.1.92")
     (source
      (origin
        (method url-fetch)
              "v" version ".tar.gz"))
        (sha256
         (base32
-         "1479ismcgq1mx712yhw0qswb4z75spc81f9k621vfpkji0smpyk2"))))
+         "0gxv8wpvlllmvhkpixv5x23ywn1s6zs7ypcs38s7nfh4phamyixh"))))
     (build-system perl-build-system)
     (native-inputs
      `(("perl-regexp-pattern" ,perl-regexp-pattern)
        ("perl-test-exception" ,perl-test-exception)))
     (propagated-inputs
-     `(("perl-strictures" ,perl-strictures-2)))
-    (home-page "http://search.cpan.org/dist/Regexp-Pattern-License/")
+     `(("perl-strictures" ,perl-strictures-2)
+       ("perl-try-tiny" ,perl-try-tiny)))
+    (home-page "https://metacpan.org/release/Regexp-Pattern-License")
     (synopsis "Regular expressions for legal licenses")
     (description "Regexp::Pattern::License provides a hash of regular
 expression patterns related to legal software licenses.
@@ -74,7 +76,7 @@ Regexp::Pattern is a convention for organizing reusable regex patterns.")
      `(("perl-number-range" ,perl-number-range)))
     (propagated-inputs
      `(("perl-exporter-tiny" ,perl-exporter-tiny)))
-    (home-page "http://search.cpan.org/dist/String-Copyright/")
+    (home-page "https://metacpan.org/release/String-Copyright")
     (synopsis "Representation of text-based copyright statements")
     (description "String::Copyright Parses common styles of copyright
 statements and serializes in normalized format.")
@@ -99,7 +101,62 @@ statements and serializes in normalized format.")
     (propagated-inputs
      `(("perl-data-section" ,perl-data-section)
        ("perl-text-template" ,perl-text-template)))
-    (home-page "http://search.cpan.org/dist/Software-License/")
+    (home-page "https://metacpan.org/release/Software-License")
     (synopsis "Templated software licenses")
     (description "This package provides templated software licenses.")
     (license (package-license perl))))
+
+(define-public licensecheck
+  (package
+    (name "licensecheck")
+    (version "3.0.36")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://cpan/authors/id/J/JO/JONASS/App-Licensecheck-"
+                    "v" version ".tar.gz"))
+              (sha256
+               (base32
+                "0y14ppq6f9hc0rc0syhfgms1r7fd51vpgfx5va6b2v84y8anb6g1"))))
+    (build-system perl-build-system)
+    (native-inputs
+     `(("perl-regexp-pattern" ,perl-regexp-pattern)
+       ("perl-software-license" ,perl-software-license)
+       ("perl-test-requires" ,perl-test-requires)
+       ("perl-test-roo" ,perl-test-roo)
+       ("perl-test-script" ,perl-test-script)
+       ("perl-universal-require" ,perl-universal-require)
+       ("perl-number-range" ,perl-number-range)
+       ("perl-sub-quote" ,perl-sub-quote)))
+    (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))))))
+    (home-page "https://metacpan.org/release/App-Licensecheck")
+    (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))))