Merge branch 'master' into staging
[jackhill/guix/guix.git] / gnu / packages / perl-compression.scm
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 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
8 ;;;
9 ;;; This file is part of GNU Guix.
10 ;;;
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
15 ;;;
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
20 ;;;
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
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
35 (define-public perl-compress-raw-bzip2
36 (package
37 (name "perl-compress-raw-bzip2")
38 (version "2.091")
39 (source
40 (origin
41 (method url-fetch)
42 (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/"
43 "Compress-Raw-Bzip2-" version ".tar.gz"))
44 (sha256
45 (base32 "0c5lwaynkcprjd18d3c82m8cniyq3c8mc4jk42gb32lp7cyyzmr7"))))
46 (build-system perl-build-system)
47 ;; TODO: Use our bzip2 package.
48 (home-page "https://metacpan.org/release/Compress-Raw-Bzip2")
49 (synopsis "Low-level interface to bzip2 compression library")
50 (description "This module provides a Perl interface to the bzip2
51 compression library.")
52 (license license:perl-license)))
53
54 (define-public perl-compress-raw-zlib
55 (package
56 (name "perl-compress-raw-zlib")
57 (version "2.091")
58 (source
59 (origin
60 (method url-fetch)
61 (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/"
62 "Compress-Raw-Zlib-" version ".tar.gz"))
63 (sha256
64 (base32 "0vrzk1jzw2kwrsvnd190m7jl925cbd4skp6ipv5pndkn4y8gnzxn"))))
65 (build-system perl-build-system)
66 (inputs
67 `(("zlib" ,zlib)))
68 (arguments
69 `(#:phases (modify-phases %standard-phases
70 (add-before
71 'configure 'configure-zlib
72 (lambda* (#:key inputs #:allow-other-keys)
73 (call-with-output-file "config.in"
74 (lambda (port)
75 (format port "
76 BUILD_ZLIB = False
77 INCLUDE = ~a/include
78 LIB = ~:*~a/lib
79 OLD_ZLIB = False
80 GZIP_OS_CODE = AUTO_DETECT"
81 (assoc-ref inputs "zlib"))))
82 #t)))))
83 (home-page "https://metacpan.org/release/Compress-Raw-Zlib")
84 (synopsis "Low-level interface to zlib compression library")
85 (description "This module provides a Perl interface to the zlib
86 compression library.")
87 (license license:perl-license)))
88
89 (define-public perl-io-compress
90 (package
91 (name "perl-io-compress")
92 (version "2.091")
93 (source
94 (origin
95 (method url-fetch)
96 (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/"
97 "IO-Compress-" version ".tar.gz"))
98 (sha256
99 (base32 "15ayljvmxszkd5bvzd52l7gv71ldj8bhdqdnj9f48dipn681238z"))))
100 (build-system perl-build-system)
101 (propagated-inputs
102 ;; These two packages should be updated to this one's version first.
103 `(("perl-compress-raw-zlib" ,perl-compress-raw-zlib)
104 ("perl-compress-raw-bzip2" ,perl-compress-raw-bzip2)))
105 (home-page "https://metacpan.org/release/IO-Compress")
106 (synopsis "IO Interface to compressed files/buffers")
107 (description "IO-Compress provides a Perl interface to allow reading and
108 writing of compressed data created with the zlib and bzip2 libraries.")
109 (license license:perl-license)))
110
111 (define-public perl-perlio-gzip
112 (package
113 (name "perl-perlio-gzip")
114 (version "0.20")
115 (source (origin
116 (method url-fetch)
117 (uri (string-append
118 "mirror://cpan/authors/id/N/NW/NWCLARK/PerlIO-gzip-"
119 version ".tar.gz"))
120 (sha256
121 (base32
122 "1idxsdmpinsp6qm1lizs7y955bq2wqk9avsz1hxky7i07yd6fj28"))))
123 (build-system perl-build-system)
124 (arguments
125 `(#:make-maker-flags
126 ;; MakeMaker doesn't honor LIBRARY_PATH.
127 (let ((zlib (assoc-ref %build-inputs "zlib")))
128 (list (format #f "LIBS=-L~a/lib/ -lz" zlib)))))
129 (inputs `(("zlib" ,zlib)))
130 (home-page "https://metacpan.org/pod/PerlIO::gzip")
131 (synopsis "Perl extension to provide a PerlIO layer to gzip/gunzip")
132 (description "PerlIO::gzip provides a PerlIO layer that manipulates files
133 in the format used by the @command{gzip} program.")
134 (license license:perl-license)))
135
136 (define-public perl-archive-extract
137 (package
138 (name "perl-archive-extract")
139 (version "0.82")
140 (source
141 (origin
142 (method url-fetch)
143 (uri (string-append "mirror://cpan/authors/id/B/BI/BINGOS/Archive-Extract-"
144 version ".tar.gz"))
145 (sha256
146 (base32 "00zq2ishxk70192sjl1wciq14vhb9isz8rcafcy1j89va1srpvrn"))))
147 (build-system perl-build-system)
148 (home-page "https://metacpan.org/release/Archive-Extract")
149 (synopsis "Generic archive extracting mechanism")
150 (description "It allows you to extract any archive file of the type .tar,
151 .tar.gz, .gz, .Z, tar.bz2, .tbz, .bz2, .zip, .xz,, .txz, .tar.xz or .lzma
152 without having to worry how it does so, or use different interfaces for each
153 type by using either Perl modules, or command-line tools on your system.")
154 (license license:perl-license)))
155
156 (define-public perl-archive-zip
157 (package
158 (name "perl-archive-zip")
159 (version "1.68")
160 (source
161 (origin
162 (method url-fetch)
163 (uri (string-append
164 "mirror://cpan/authors/id/P/PH/PHRED/Archive-Zip-"
165 version ".tar.gz"))
166 (sha256
167 (base32 "0l663s3a68p8r2qjy4pn1g05lx0i8js8wpz7qqln3bsvg1fihklq"))))
168 (build-system perl-build-system)
169 (native-inputs
170 ;; For tests.
171 `(("perl-test-mockmodule" ,perl-test-mockmodule)))
172 (synopsis "Provides an interface to Zip archive files")
173 (description "The @code{Archive::Zip} module allows a Perl program to
174 create, manipulate, read, and write Zip archive files.")
175 (home-page "https://metacpan.org/release/Archive-Zip")
176 (license license:perl-license)))