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 ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
10 ;;; This file is part of GNU Guix.
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.
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.
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/>.
25 (define-module (gnu packages perl-compression)
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (guix utils)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix build-system perl)
31 #:use-module (gnu packages)
32 #:use-module (gnu packages compression)
33 #:use-module (gnu packages perl)
34 #:use-module (gnu packages perl-check))
36 (define-public perl-compress-bzip2
38 (name "perl-compress-bzip2")
43 (uri (string-append "mirror://cpan/authors/id/R/RU/RURBAN/"
44 "Compress-Bzip2-" version ".tar.gz"))
46 (base32 "0vhi6nqayvg6wz55bynccv5xd6gzhbigk9mjv088i6aw7xf877w5"))))
47 (build-system perl-build-system)
50 (modify-phases %standard-phases
51 (add-after 'unpack 'use-system-bzip2
52 (lambda* (#:key inputs #:allow-other-keys)
53 (let ((bzip2 (assoc-ref inputs "bzip2")))
54 (setenv "BUILD_BZLIB" "0")
55 (setenv "BZLIB_BIN" (string-append bzip2 "/bin"))
56 (setenv "BZLIB_INCLUDE" (string-append bzip2 "/include"))
57 (setenv "BZLIB_LIB" (string-append bzip2 "/lib"))
61 (home-page "https://metacpan.org/release/Compress-Bzip2")
62 (synopsis "Interface to Bzip2 compression library")
64 "The Compress::Bzip2 module provides a Perl interface to the Bzip2
65 compression library. A relevant subset of the functionality provided by Bzip2
66 is available in this module.")
67 (license license:perl-license)))
69 (define-public perl-compress-raw-bzip2
71 (name "perl-compress-raw-bzip2")
76 (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/"
77 "Compress-Raw-Bzip2-" version ".tar.gz"))
79 (base32 "1glcjnbqksaviwyrprh9i4dybsb12kzfy0bx932l0xya9riyfr55"))))
80 (build-system perl-build-system)
81 ;; TODO: Use our bzip2 package.
82 (home-page "https://metacpan.org/release/Compress-Raw-Bzip2")
83 (synopsis "Low-level interface to bzip2 compression library")
84 (description "This module provides a Perl interface to the bzip2
85 compression library.")
86 (license license:perl-license)))
88 (define-public perl-compress-raw-zlib
90 (name "perl-compress-raw-zlib")
95 (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/"
96 "Compress-Raw-Zlib-" version ".tar.gz"))
98 (base32 "04jrqvqsa2c655idw7skv5rhb9vx9997h4n9if5p99srq4hblk6d"))))
99 (build-system perl-build-system)
103 `(#:phases (modify-phases %standard-phases
105 'configure 'configure-zlib
106 (lambda* (#:key inputs #:allow-other-keys)
107 (call-with-output-file "config.in"
114 GZIP_OS_CODE = AUTO_DETECT"
115 (assoc-ref inputs "zlib"))))
117 (home-page "https://metacpan.org/release/Compress-Raw-Zlib")
118 (synopsis "Low-level interface to zlib compression library")
119 (description "This module provides a Perl interface to the zlib
120 compression library.")
121 (license license:perl-license)))
123 (define-public perl-io-compress
125 (name "perl-io-compress")
130 (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/"
131 "IO-Compress-" version ".tar.gz"))
133 (base32 "0wm51dib74l9baqfkfm0ixsr4cqwrgij2yc45xfhnjabvzary8cx"))))
134 (build-system perl-build-system)
136 ;; These two packages should be updated to this one's version first.
137 `(("perl-compress-raw-zlib" ,perl-compress-raw-zlib)
138 ("perl-compress-raw-bzip2" ,perl-compress-raw-bzip2)))
139 (home-page "https://metacpan.org/release/IO-Compress")
140 (synopsis "IO Interface to compressed files/buffers")
141 (description "IO-Compress provides a Perl interface to allow reading and
142 writing of compressed data created with the zlib and bzip2 libraries.")
143 (license license:perl-license)))
145 (define-public perl-perlio-gzip
147 (name "perl-perlio-gzip")
152 "mirror://cpan/authors/id/N/NW/NWCLARK/PerlIO-gzip-"
156 "1idxsdmpinsp6qm1lizs7y955bq2wqk9avsz1hxky7i07yd6fj28"))))
157 (build-system perl-build-system)
160 ;; MakeMaker doesn't honor LIBRARY_PATH.
161 (let ((zlib (assoc-ref %build-inputs "zlib")))
162 (list (format #f "LIBS=-L~a/lib/ -lz" zlib)))))
163 (inputs `(("zlib" ,zlib)))
164 (home-page "https://metacpan.org/pod/PerlIO::gzip")
165 (synopsis "Perl extension to provide a PerlIO layer to gzip/gunzip")
166 (description "PerlIO::gzip provides a PerlIO layer that manipulates files
167 in the format used by the @command{gzip} program.")
168 (license license:perl-license)))
170 (define-public perl-archive-extract
172 (name "perl-archive-extract")
177 (uri (string-append "mirror://cpan/authors/id/B/BI/BINGOS/Archive-Extract-"
180 (base32 "11xnmb21835hysdk2mcq6ndch0136j03n2i111nhpkz8p36hkkcs"))))
181 (build-system perl-build-system)
182 (home-page "https://metacpan.org/release/Archive-Extract")
183 (synopsis "Generic archive extracting mechanism")
184 (description "It allows you to extract any archive file of the type .tar,
185 .tar.gz, .gz, .Z, tar.bz2, .tbz, .bz2, .zip, .xz,, .txz, .tar.xz or .lzma
186 without having to worry how it does so, or use different interfaces for each
187 type by using either Perl modules, or command-line tools on your system.")
188 (license license:perl-license)))
190 (define-public perl-archive-zip
192 (name "perl-archive-zip")
198 "mirror://cpan/authors/id/P/PH/PHRED/Archive-Zip-"
201 (base32 "0l663s3a68p8r2qjy4pn1g05lx0i8js8wpz7qqln3bsvg1fihklq"))))
202 (build-system perl-build-system)
205 `(("perl-test-mockmodule" ,perl-test-mockmodule)))
206 (synopsis "Provides an interface to Zip archive files")
207 (description "The @code{Archive::Zip} module allows a Perl program to
208 create, manipulate, read, and write Zip archive files.")
209 (home-page "https://metacpan.org/release/Archive-Zip")
210 (license license:perl-license)))