perl-compression.scm 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2014 John Darrington <jmd@gnu.org>
  3. ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
  4. ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
  5. ;;; Copyright © 2017 Petter <petter@mykolab.ch>
  6. ;;; Copyright © 2017, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
  7. ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  8. ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
  9. ;;;
  10. ;;; This file is part of GNU Guix.
  11. ;;;
  12. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  13. ;;; under the terms of the GNU General Public License as published by
  14. ;;; the Free Software Foundation; either version 3 of the License, or (at
  15. ;;; your option) any later version.
  16. ;;;
  17. ;;; GNU Guix is distributed in the hope that it will be useful, but
  18. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  19. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. ;;; GNU General Public License for more details.
  21. ;;;
  22. ;;; You should have received a copy of the GNU General Public License
  23. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  24. (define-module (gnu packages perl-compression)
  25. #:use-module ((guix licenses) #:prefix license:)
  26. #:use-module (guix utils)
  27. #:use-module (guix packages)
  28. #:use-module (guix download)
  29. #:use-module (guix build-system perl)
  30. #:use-module (gnu packages)
  31. #:use-module (gnu packages compression)
  32. #:use-module (gnu packages perl)
  33. #:use-module (gnu packages perl-check))
  34. (define-public perl-compress-bzip2
  35. (package
  36. (name "perl-compress-bzip2")
  37. (version "2.28")
  38. (source
  39. (origin
  40. (method url-fetch)
  41. (uri (string-append "mirror://cpan/authors/id/R/RU/RURBAN/"
  42. "Compress-Bzip2-" version ".tar.gz"))
  43. (sha256
  44. (base32 "0vhi6nqayvg6wz55bynccv5xd6gzhbigk9mjv088i6aw7xf877w5"))))
  45. (build-system perl-build-system)
  46. (arguments
  47. `(#:phases
  48. (modify-phases %standard-phases
  49. (add-after 'unpack 'use-system-bzip2
  50. (lambda* (#:key inputs #:allow-other-keys)
  51. (let ((bzip2 (assoc-ref inputs "bzip2")))
  52. (setenv "BUILD_BZLIB" "0")
  53. (setenv "BZLIB_BIN" (string-append bzip2 "/bin"))
  54. (setenv "BZLIB_INCLUDE" (string-append bzip2 "/include"))
  55. (setenv "BZLIB_LIB" (string-append bzip2 "/lib"))
  56. #t))))))
  57. (inputs
  58. `(("bzip2" ,bzip2)))
  59. (home-page "https://metacpan.org/release/Compress-Bzip2")
  60. (synopsis "Interface to Bzip2 compression library")
  61. (description
  62. "The Compress::Bzip2 module provides a Perl interface to the Bzip2
  63. compression library. A relevant subset of the functionality provided by Bzip2
  64. is available in this module.")
  65. (license license:perl-license)))
  66. (define-public perl-compress-raw-bzip2
  67. (package
  68. (name "perl-compress-raw-bzip2")
  69. (version "2.096")
  70. (source
  71. (origin
  72. (method url-fetch)
  73. (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/"
  74. "Compress-Raw-Bzip2-" version ".tar.gz"))
  75. (sha256
  76. (base32 "1glcjnbqksaviwyrprh9i4dybsb12kzfy0bx932l0xya9riyfr55"))))
  77. (build-system perl-build-system)
  78. ;; TODO: Use our bzip2 package.
  79. (home-page "https://metacpan.org/release/Compress-Raw-Bzip2")
  80. (synopsis "Low-level interface to bzip2 compression library")
  81. (description "This module provides a Perl interface to the bzip2
  82. compression library.")
  83. (license license:perl-license)))
  84. (define-public perl-compress-raw-zlib
  85. (package
  86. (name "perl-compress-raw-zlib")
  87. (version "2.096")
  88. (source
  89. (origin
  90. (method url-fetch)
  91. (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/"
  92. "Compress-Raw-Zlib-" version ".tar.gz"))
  93. (sha256
  94. (base32 "04jrqvqsa2c655idw7skv5rhb9vx9997h4n9if5p99srq4hblk6d"))))
  95. (build-system perl-build-system)
  96. (inputs
  97. `(("zlib" ,zlib)))
  98. (arguments
  99. `(#:phases (modify-phases %standard-phases
  100. (add-before
  101. 'configure 'configure-zlib
  102. (lambda* (#:key inputs #:allow-other-keys)
  103. (call-with-output-file "config.in"
  104. (lambda (port)
  105. (format port "
  106. BUILD_ZLIB = False
  107. INCLUDE = ~a/include
  108. LIB = ~:*~a/lib
  109. OLD_ZLIB = False
  110. GZIP_OS_CODE = AUTO_DETECT"
  111. (assoc-ref inputs "zlib"))))
  112. #t)))))
  113. (home-page "https://metacpan.org/release/Compress-Raw-Zlib")
  114. (synopsis "Low-level interface to zlib compression library")
  115. (description "This module provides a Perl interface to the zlib
  116. compression library.")
  117. (license license:perl-license)))
  118. (define-public perl-io-compress
  119. (package
  120. (name "perl-io-compress")
  121. (version "2.096")
  122. (source
  123. (origin
  124. (method url-fetch)
  125. (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/"
  126. "IO-Compress-" version ".tar.gz"))
  127. (sha256
  128. (base32 "0wm51dib74l9baqfkfm0ixsr4cqwrgij2yc45xfhnjabvzary8cx"))))
  129. (build-system perl-build-system)
  130. (propagated-inputs
  131. ;; These two packages should be updated to this one's version first.
  132. `(("perl-compress-raw-zlib" ,perl-compress-raw-zlib)
  133. ("perl-compress-raw-bzip2" ,perl-compress-raw-bzip2)))
  134. (home-page "https://metacpan.org/release/IO-Compress")
  135. (synopsis "IO Interface to compressed files/buffers")
  136. (description "IO-Compress provides a Perl interface to allow reading and
  137. writing of compressed data created with the zlib and bzip2 libraries.")
  138. (license license:perl-license)))
  139. (define-public perl-perlio-gzip
  140. (package
  141. (name "perl-perlio-gzip")
  142. (version "0.20")
  143. (source (origin
  144. (method url-fetch)
  145. (uri (string-append
  146. "mirror://cpan/authors/id/N/NW/NWCLARK/PerlIO-gzip-"
  147. version ".tar.gz"))
  148. (sha256
  149. (base32
  150. "1idxsdmpinsp6qm1lizs7y955bq2wqk9avsz1hxky7i07yd6fj28"))))
  151. (build-system perl-build-system)
  152. (arguments
  153. `(#:make-maker-flags
  154. ;; MakeMaker doesn't honor LIBRARY_PATH.
  155. (let ((zlib (assoc-ref %build-inputs "zlib")))
  156. (list (format #f "LIBS=-L~a/lib/ -lz" zlib)))))
  157. (inputs `(("zlib" ,zlib)))
  158. (home-page "https://metacpan.org/pod/PerlIO::gzip")
  159. (synopsis "Perl extension to provide a PerlIO layer to gzip/gunzip")
  160. (description "PerlIO::gzip provides a PerlIO layer that manipulates files
  161. in the format used by the @command{gzip} program.")
  162. (license license:perl-license)))
  163. (define-public perl-archive-extract
  164. (package
  165. (name "perl-archive-extract")
  166. (version "0.88")
  167. (source
  168. (origin
  169. (method url-fetch)
  170. (uri (string-append "mirror://cpan/authors/id/B/BI/BINGOS/Archive-Extract-"
  171. version ".tar.gz"))
  172. (sha256
  173. (base32 "0hpplmgf4j0rc9k3kl5fzi4m8j8ncxyly5827dyjh8h6rlsz3z6g"))))
  174. (build-system perl-build-system)
  175. (home-page "https://metacpan.org/release/Archive-Extract")
  176. (synopsis "Generic archive extracting mechanism")
  177. (description "It allows you to extract any archive file of the type .tar,
  178. .tar.gz, .gz, .Z, tar.bz2, .tbz, .bz2, .zip, .xz,, .txz, .tar.xz or .lzma
  179. without having to worry how it does so, or use different interfaces for each
  180. type by using either Perl modules, or command-line tools on your system.")
  181. (license license:perl-license)))
  182. (define-public perl-archive-zip
  183. (package
  184. (name "perl-archive-zip")
  185. (version "1.68")
  186. (source
  187. (origin
  188. (method url-fetch)
  189. (uri (string-append
  190. "mirror://cpan/authors/id/P/PH/PHRED/Archive-Zip-"
  191. version ".tar.gz"))
  192. (sha256
  193. (base32 "0l663s3a68p8r2qjy4pn1g05lx0i8js8wpz7qqln3bsvg1fihklq"))))
  194. (build-system perl-build-system)
  195. (native-inputs
  196. ;; For tests.
  197. `(("perl-test-mockmodule" ,perl-test-mockmodule)))
  198. (synopsis "Provides an interface to Zip archive files")
  199. (description "The @code{Archive::Zip} module allows a Perl program to
  200. create, manipulate, read, and write Zip archive files.")
  201. (home-page "https://metacpan.org/release/Archive-Zip")
  202. (license license:perl-license)))