Mirror of GNU Guix
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

161 lines
6.2 KiB

  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>
  4. ;;;
  5. ;;; This file is part of GNU Guix.
  6. ;;;
  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.
  11. ;;;
  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.
  16. ;;;
  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/>.
  19. (define-module (gnu packages license)
  20. #:use-module (guix licenses)
  21. #:use-module (gnu packages)
  22. #:use-module (guix packages)
  23. #:use-module (guix download)
  24. #:use-module (guix build-system perl)
  25. #:use-module (gnu packages perl)
  26. #:use-module (gnu packages perl-check))
  27. ;;;
  28. ;;; Please: Try to add new module packages in alphabetic order.
  29. ;;;
  30. (define-public perl-regexp-pattern-license
  31. (package
  32. (name "perl-regexp-pattern-license")
  33. (version "3.1.0")
  34. (source
  35. (origin
  36. (method url-fetch)
  37. (uri (string-append
  38. "mirror://cpan/authors/id/J/JO/JONASS/Regexp-Pattern-License-"
  39. "v" version ".tar.gz"))
  40. (sha256
  41. (base32
  42. "1479ismcgq1mx712yhw0qswb4z75spc81f9k621vfpkji0smpyk2"))))
  43. (build-system perl-build-system)
  44. (native-inputs
  45. `(("perl-regexp-pattern" ,perl-regexp-pattern)
  46. ("perl-test-exception" ,perl-test-exception)))
  47. (propagated-inputs
  48. `(("perl-strictures" ,perl-strictures-2)))
  49. (home-page "https://metacpan.org/release/Regexp-Pattern-License")
  50. (synopsis "Regular expressions for legal licenses")
  51. (description "Regexp::Pattern::License provides a hash of regular
  52. expression patterns related to legal software licenses.
  53. Regexp::Pattern is a convention for organizing reusable regex patterns.")
  54. (license gpl3+)))
  55. (define-public perl-string-copyright
  56. (package
  57. (name "perl-string-copyright")
  58. (version "0.003005")
  59. (source
  60. (origin
  61. (method url-fetch)
  62. (uri (string-append
  63. "mirror://cpan/authors/id/J/JO/JONASS/String-Copyright-"
  64. version ".tar.gz"))
  65. (sha256
  66. (base32
  67. "12c6x4c10gr46ryc3dpwgfi6wggmgy4a1ls2hwhcpdm3wvzy5619"))))
  68. (build-system perl-build-system)
  69. (native-inputs
  70. `(("perl-number-range" ,perl-number-range)))
  71. (propagated-inputs
  72. `(("perl-exporter-tiny" ,perl-exporter-tiny)))
  73. (home-page "https://metacpan.org/release/String-Copyright")
  74. (synopsis "Representation of text-based copyright statements")
  75. (description "String::Copyright Parses common styles of copyright
  76. statements and serializes in normalized format.")
  77. (license gpl3+)))
  78. (define-public perl-software-license
  79. (package
  80. (name "perl-software-license")
  81. (version "0.103013")
  82. (source
  83. (origin
  84. (method url-fetch)
  85. (uri (string-append
  86. "mirror://cpan/authors/id/L/LE/LEONT/Software-License-"
  87. version ".tar.gz"))
  88. (sha256
  89. (base32
  90. "1wqgh7vdlc966amlrq0b2szz18lnrl9rfh8wlf7v0hqg74vxjh96"))))
  91. (build-system perl-build-system)
  92. (native-inputs
  93. `(("perl-try-tiny" ,perl-try-tiny)))
  94. (propagated-inputs
  95. `(("perl-data-section" ,perl-data-section)
  96. ("perl-text-template" ,perl-text-template)))
  97. (home-page "https://metacpan.org/release/Software-License")
  98. (synopsis "Templated software licenses")
  99. (description "This package provides templated software licenses.")
  100. (license (package-license perl))))
  101. (define-public licensecheck
  102. (package
  103. (name "licensecheck")
  104. (version "3.0.34")
  105. (source (origin
  106. (method url-fetch)
  107. (uri (string-append
  108. "mirror://cpan/authors/id/J/JO/JONASS/App-Licensecheck-"
  109. "v" version ".tar.gz"))
  110. (sha256
  111. (base32
  112. "0k0acybgibdqg1h6xqnba1jb0spmw7hpq0jbrs7n7gfj22wkz0vd"))))
  113. (build-system perl-build-system)
  114. (native-inputs
  115. `(("perl-regexp-pattern" ,perl-regexp-pattern)
  116. ("perl-software-license" ,perl-software-license)
  117. ("perl-test-requires" ,perl-test-requires)
  118. ("perl-test-roo" ,perl-test-roo)
  119. ("perl-test-script" ,perl-test-script)
  120. ("perl-universal-require" ,perl-universal-require)
  121. ("perl-number-range" ,perl-number-range)
  122. ("perl-sub-quote" ,perl-sub-quote)))
  123. (propagated-inputs
  124. `(("perl-getopt-long-descriptive" ,perl-getopt-long-descriptive)
  125. ("perl-moo" ,perl-moo-2)
  126. ("perl-namespace-clean" ,perl-namespace-clean)
  127. ("perl-path-iterator-rule" ,perl-path-iterator-rule)
  128. ("perl-path-tiny" ,perl-path-tiny)
  129. ("perl-pod-constants" ,perl-pod-constants)
  130. ("perl-regexp-pattern-license" ,perl-regexp-pattern-license)
  131. ("perl-sort-key" ,perl-sort-key)
  132. ("perl-strictures" ,perl-strictures-2)
  133. ("perl-string-copyright" ,perl-string-copyright)
  134. ("perl-string-escape" ,perl-string-escape)
  135. ("perl-try-tiny" ,perl-try-tiny)
  136. ("perl-module-runtime" ,perl-module-runtime)))
  137. (arguments
  138. `(#:phases
  139. (modify-phases %standard-phases
  140. (add-after 'install 'wrap-program
  141. (lambda* (#:key inputs outputs #:allow-other-keys)
  142. (let* ((out (assoc-ref outputs "out"))
  143. (perllib (string-append out "/lib/perl5/site_perl/"
  144. ,(package-version perl))))
  145. (wrap-program (string-append out "/bin/licensecheck")
  146. `("PERL5LIB" ":"
  147. prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
  148. #t))))))
  149. (home-page "https://metacpan.org/release/App-Licensecheck")
  150. (synopsis "License checker for source files")
  151. (description "Licensecheck attempts to determine the license that applies
  152. to each file passed to it, by searching the start of the file for text
  153. belonging to various licenses.")
  154. (license (package-license perl))))