gnu: Add emacs-multiple-cursors.
[jackhill/guix/guix.git] / gnu / packages / compression.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
9b1bf330 2;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
b357faac 3;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
0a5c3087 4;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
27f76fe6 5;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
69d9792a 6;;; Copyright © 2015, 2016 Eric Bavier <bavier@member.fsf.org>
646898b3 7;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
82aa2a28 8;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
820dc3f5 9;;; Copyright © 2015 Jeff Mickey <j@codemac.net>
209e09fa 10;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
23f3cbb8 11;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
3fd4b90d 12;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org>
a268f085 13;;;
233e7676 14;;; This file is part of GNU Guix.
a268f085 15;;;
233e7676 16;;; GNU Guix is free software; you can redistribute it and/or modify it
a268f085
LC
17;;; under the terms of the GNU General Public License as published by
18;;; the Free Software Foundation; either version 3 of the License, or (at
19;;; your option) any later version.
20;;;
233e7676 21;;; GNU Guix is distributed in the hope that it will be useful, but
a268f085
LC
22;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24;;; GNU General Public License for more details.
25;;;
26;;; You should have received a copy of the GNU General Public License
233e7676 27;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
a268f085 28
1ffa7090 29(define-module (gnu packages compression)
b5b73a82 30 #:use-module ((guix licenses) #:prefix license:)
21b2ec4d 31 #:use-module (guix utils)
a268f085 32 #:use-module (guix packages)
87f5d366 33 #:use-module (guix download)
646898b3 34 #:use-module (guix git-download)
b357faac 35 #:use-module (guix build-system gnu)
73f542c3 36 #:use-module (guix build-system perl)
e99dd67a 37 #:use-module (gnu packages)
69d9792a 38 #:use-module (gnu packages autotools)
23f3cbb8 39 #:use-module (gnu packages backup)
73f542c3 40 #:use-module (gnu packages base)
646898b3 41 #:use-module (gnu packages perl)
23f3cbb8 42 #:use-module (gnu packages pkg-config)
82aa2a28 43 #:use-module (gnu packages valgrind)
646898b3 44 #:use-module ((srfi srfi-1) #:select (last)))
a268f085 45
6a92093d
LC
46(define-public zlib
47 (package
48 (name "zlib")
209e09fa 49 (version "1.2.8")
6a92093d
LC
50 (source
51 (origin
87f5d366 52 (method url-fetch)
a67f97fe
CR
53 (uri (list (string-append "http://zlib.net/zlib-"
54 version ".tar.gz")
55 (string-append "mirror://sourceforge/libpng/zlib-"
56 version ".tar.gz")))
6a92093d
LC
57 (sha256
58 (base32
209e09fa 59 "039agw5rqvqny92cpkrfn243x2gd4xn13hs3xi6isk55d2vqqr9n"))))
6a92093d
LC
60 (build-system gnu-build-system)
61 (arguments
62 `(#:phases (alist-replace
63 'configure
64 (lambda* (#:key outputs #:allow-other-keys)
e67253db 65 ;; Zlib's home-made `configure' fails when passed
6a92093d
LC
66 ;; extra flags like `--enable-fast-install', so we need to
67 ;; invoke it with just what it understand.
68 (let ((out (assoc-ref outputs "out")))
e67253db
JD
69 ;; 'configure' doesn't understand '--host'.
70 ,@(if (%current-target-system)
71 `((setenv "CHOST" ,(%current-target-system)))
72 '())
73 (zero?
74 (system* "./configure"
75 (string-append "--prefix=" out)))))
6a92093d
LC
76 %standard-phases)))
77 (home-page "http://zlib.net/")
35b9e423 78 (synopsis "Compression library")
6a92093d
LC
79 (description
80 "zlib is designed to be a free, general-purpose, legally unencumbered --
81that is, not covered by any patents -- lossless data-compression library for
82use on virtually any computer hardware and operating system. The zlib data
35b9e423 83format is itself portable across platforms. Unlike the LZW compression method
6a92093d
LC
84used in Unix compress(1) and in the GIF image format, the compression method
85currently used in zlib essentially never expands the data. (LZW can double or
86triple the file size in extreme cases.) zlib's memory footprint is also
87independent of the input data and can be reduced, if necessary, at some cost
88in compression.")
4a44e743 89 (license license:zlib)))
6a92093d 90
ee97be9f
RW
91(define-public fastjar
92 (package
93 (name "fastjar")
94 (version "0.98")
95 (source (origin
96 (method url-fetch)
97 (uri (string-append "mirror://savannah/fastjar/fastjar-"
98 version ".tar.gz"))
99 (sha256
100 (base32
101 "0iginbz2m15hcsa3x4y7v3mhk54gr1r7m3ghx0pg4n46vv2snmpi"))))
102 (build-system gnu-build-system)
103 (inputs `(("zlib" ,zlib)))
104 (home-page "http://savannah.nongnu.org/projects/fastjar")
105 (synopsis "Replacement for Sun's 'jar' utility")
106 (description
107 "FastJar is an attempt to create a much faster replacement for Sun's 'jar'
108utility. Instead of being written in Java, FastJar is written in C.")
109 (license license:gpl2+)))
110
58593975
RW
111(define-public libtar
112 (package
113 (name "libtar")
89d80159 114 (version "1.2.20")
58593975
RW
115 (source (origin
116 (method url-fetch)
89d80159
EF
117 (uri (list
118 (string-append
119 "ftp://ftp.feep.net/pub/software/libtar/libtar-"
120 version ".tar.gz")
121 (string-append
122 "mirror://debian/pool/main/libt/libtar/libtar_"
123 version ".orig.tar.gz")))
58593975
RW
124 (sha256
125 (base32
e99dd67a
EF
126 "02cihzl77ia0dcz7z2cga2412vyhhs5pa2355q4wpwbyga2lrwjh"))
127 (patches (search-patches "libtar-CVE-2013-4420.patch"))))
58593975 128 (build-system gnu-build-system)
89d80159
EF
129 (arguments
130 `(#:tests? #f ;no "check" target
131 #:phases
132 (modify-phases %standard-phases
133 (add-after 'unpack 'autoconf
134 (lambda _ (zero? (system* "sh" "autoreconf" "-vfi")))))))
135 (native-inputs
136 `(("autoconf" ,autoconf)
137 ("automake" ,automake)
138 ("libtool" ,libtool)))
139 (inputs
140 `(("zlib" ,zlib)))
58593975
RW
141 (synopsis "C library for manipulating POSIX tar files")
142 (description
143 "libtar is a C library for manipulating POSIX tar files. It handles
144adding and extracting files to/from a tar archive.")
89d80159 145 (home-page "https://repo.or.cz/libtar.git")
58593975
RW
146 (license license:bsd-3)))
147
a268f085
LC
148(define-public gzip
149 (package
150 (name "gzip")
2a511f7a 151 (version "1.6")
a268f085 152 (source (origin
87f5d366 153 (method url-fetch)
0db342a5 154 (uri (string-append "mirror://gnu/gzip/gzip-"
a268f085
LC
155 version ".tar.gz"))
156 (sha256
157 (base32
2a511f7a 158 "0zlgdm4v3dndrbiz7b67mbbj25dpwqbmbzjiycssvrfrcfvq7swp"))))
a268f085 159 (build-system gnu-build-system)
f50d2669 160 (synopsis "General file (de)compression (using lzw)")
a268f085
LC
161 (arguments
162 ;; FIXME: The test suite wants `less', and optionally Perl.
163 '(#:tests? #f))
164 (description
79c311b8
LC
165 "GNU Gzip provides data compression and decompression utilities; the
166typical extension is \".gz\". Unlike the \"zip\" format, it compresses a single
167file; as a result, it is often used in conjunction with \"tar\", resulting in
168\".tar.gz\" or \".tgz\", etc.")
4a44e743 169 (license license:gpl3+)
a268f085
LC
170 (home-page "http://www.gnu.org/software/gzip/")))
171
172(define-public bzip2
9b1bf330 173 (let ((build-shared-lib
a268f085
LC
174 ;; Build a shared library.
175 '(lambda* (#:key inputs #:allow-other-keys)
f678f6d9 176 (patch-makefile-SHELL "Makefile-libbz2_so")
a268f085
LC
177 (zero? (system* "make" "-f" "Makefile-libbz2_so"))))
178 (install-shared-lib
179 '(lambda* (#:key outputs #:allow-other-keys)
180 (let* ((out (assoc-ref outputs "out"))
181 (libdir (string-append out "/lib")))
182 (for-each (lambda (file)
183 (let ((base (basename file)))
184 (format #t "installing `~a' to `~a'~%"
185 base libdir)
186 (copy-file file
187 (string-append libdir "/" base))))
ab4fab19
LC
188 (find-files "." "^libbz2\\.so")))))
189 (set-cross-environment
190 '(lambda* (#:key target #:allow-other-keys)
191 (substitute* (find-files "." "Makefile")
192 (("CC=.*$")
193 (string-append "CC = " target "-gcc\n"))
194 (("AR=.*$")
195 (string-append "AR = " target "-ar\n"))
196 (("RANLIB=.*$")
197 (string-append "RANLIB = " target "-ranlib\n"))
198 (("^all:(.*)test" _ prerequisites)
199 ;; Remove 'all' -> 'test' dependency.
200 (string-append "all:" prerequisites "\n"))))))
a268f085
LC
201 (package
202 (name "bzip2")
203 (version "1.0.6")
204 (source (origin
87f5d366 205 (method url-fetch)
a268f085
LC
206 (uri (string-append "http://www.bzip.org/" version "/bzip2-"
207 version ".tar.gz"))
208 (sha256
209 (base32
210 "1kfrc7f0ja9fdn6j1y6yir6li818npy6217hvr3wzmnmzhs8z152"))))
211 (build-system gnu-build-system)
212 (arguments
213 `(#:modules ((guix build gnu-build-system)
214 (guix build utils)
215 (srfi srfi-1))
216 #:phases
ab4fab19
LC
217 ,(if (%current-target-system)
218
219 ;; Cross-compilation: use the cross tools.
220 `(alist-cons-before
221 'build 'build-shared-lib ,build-shared-lib
222 (alist-cons-after
9b1bf330
LC
223 'install 'install-shared-lib ,install-shared-lib
224 (alist-replace 'configure ,set-cross-environment
225 %standard-phases)))
ab4fab19
LC
226
227 ;; Native compilation: build the shared library.
228 `(alist-cons-before
229 'build 'build-shared-lib ,build-shared-lib
230 (alist-cons-after
9b1bf330
LC
231 'install 'install-shared-lib ,install-shared-lib
232 (alist-delete 'configure %standard-phases))))
ab4fab19 233
a268f085 234 #:make-flags (list (string-append "PREFIX="
ab4fab19
LC
235 (assoc-ref %outputs "out")))
236
237 ;; Don't attempt to run the tests when cross-compiling.
238 ,@(if (%current-target-system)
239 '(#:tests? #f)
240 '())))
35b9e423 241 (synopsis "High-quality data compression program")
a268f085
LC
242 (description
243 "bzip2 is a freely available, patent free (see below), high-quality data
244compressor. It typically compresses files to within 10% to 15% of the best
245available techniques (the PPM family of statistical compressors), whilst
246being around twice as fast at compression and six times faster at
247decompression.")
166191b3 248 (license (license:non-copyleft "file://LICENSE"
4a44e743 249 "See LICENSE in the distribution."))
a268f085
LC
250 (home-page "http://www.bzip.org/"))))
251
5d47eab0
EF
252(define-public pbzip2
253 (package
254 (name "pbzip2")
255 (version "1.1.12")
256 (source (origin
257 (method url-fetch)
21b2ec4d
EF
258 (uri (string-append "https://launchpad.net/pbzip2/"
259 (version-major+minor version) "/" version
260 "/+download/" name "-" version ".tar.gz"))
5d47eab0
EF
261 (sha256
262 (base32
263 "1vk6065dv3a47p86vmp8hv3n1ygd9hraz0gq89gvzlx7lmcb6fsp"))))
264 (build-system gnu-build-system)
265 (inputs
b3546174 266 `(("bzip2" ,bzip2)))
5d47eab0
EF
267 (arguments
268 `(#:tests? #f ; no tests
269 #:phases (modify-phases %standard-phases
21b2ec4d
EF
270 (delete 'configure))
271 #:make-flags (list (string-append "PREFIX=" %output))))
5d47eab0
EF
272 (home-page "http://compression.ca/pbzip2/")
273 (synopsis "Parallel bzip2 implementation")
274 (description
275 "Pbzip2 is a parallel implementation of the bzip2 block-sorting file
276compressor that uses pthreads and achieves near-linear speedup on SMP machines.
21b2ec4d 277The output of this version is fully compatible with bzip2 v1.0.2 (i.e. anything
5d47eab0
EF
278compressed with pbzip2 can be decompressed with bzip2).")
279 (license (license:non-copyleft "file://COPYING"
21b2ec4d 280 "See COPYING in the distribution."))))
5d47eab0 281
a268f085
LC
282(define-public xz
283 (package
284 (name "xz")
4655f515 285 (version "5.2.2")
a268f085 286 (source (origin
87f5d366 287 (method url-fetch)
52d76b64
LC
288 (uri (list (string-append "http://tukaani.org/xz/xz-" version
289 ".tar.gz")
290 (string-append "http://multiprecision.org/guix/xz-"
291 version ".tar.gz")))
a268f085
LC
292 (sha256
293 (base32
4655f515 294 "18h2k4jndhzjs8ln3a54qdnfv59y6spxiwh9gpaqniph6iflvpvk"))))
a268f085 295 (build-system gnu-build-system)
35b9e423 296 (synopsis "General-purpose data compression")
a268f085
LC
297 (description
298 "XZ Utils is free general-purpose data compression software with high
299compression ratio. XZ Utils were written for POSIX-like systems, but also
300work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils.
301
302The core of the XZ Utils compression code is based on LZMA SDK, but it has
303been modified quite a lot to be suitable for XZ Utils. The primary
304compression algorithm is currently LZMA2, which is used inside the .xz
305container format. With typical files, XZ Utils create 30 % smaller output
306than gzip and 15 % smaller output than bzip2.")
38bbd61d 307 (license (list license:gpl2+ license:lgpl2.1+)) ; bits of both
a268f085 308 (home-page "http://tukaani.org/xz/")))
c6eac761
LC
309
310(define-public lzo
311 (package
312 (name "lzo")
c0ec516d 313 (version "2.09")
c6eac761
LC
314 (source
315 (origin
316 (method url-fetch)
317 (uri (string-append "http://www.oberhumer.com/opensource/lzo/download/lzo-"
318 version ".tar.gz"))
319 (sha256
320 (base32
c0ec516d 321 "0k5kpj3jnsjfxqqkblpfpx0mqcy86zs5fhjhgh2kq1hksg7ag57j"))))
c6eac761 322 (build-system gnu-build-system)
165fd9d5 323 (arguments '(#:configure-flags '("--enable-shared")))
c6eac761
LC
324 (home-page "http://www.oberhumer.com/opensource/lzo")
325 (synopsis
e881752c 326 "Data compression library suitable for real-time data de-/compression")
c6eac761
LC
327 (description
328 "LZO is a data compression library which is suitable for data
329de-/compression in real-time. This means it favours speed over
330compression ratio.
331
332LZO is written in ANSI C. Both the source code and the compressed data
333format are designed to be portable across platforms.")
4a44e743 334 (license license:gpl2+)))
0f323dad 335
a9f48ff0
EB
336(define-public lzop
337 (package
338 (name "lzop")
339 (version "1.03")
340 (source
341 (origin
342 (method url-fetch)
343 (uri (string-append "http://www.lzop.org/download/lzop-"
344 version ".tar.gz"))
345 (sha256
346 (base32
347 "1jdjvc4yjndf7ihmlcsyln2rbnbaxa86q4jskmkmm7ylfy65nhn1"))))
348 (build-system gnu-build-system)
349 (inputs `(("lzo" ,lzo)))
350 (home-page "http://www.lzop.org/")
351 (synopsis "Compress or expand files")
352 (description
353 "Lzop is a file compressor which is very similar to gzip. Lzop uses the
354LZO data compression library for compression services, and its main advantages
355over gzip are much higher compression and decompression speed (at the cost of
356some compression ratio).")
357 (license license:gpl2+)))
358
0f323dad
LC
359(define-public lzip
360 (package
361 (name "lzip")
275a7711 362 (version "1.16")
0f323dad
LC
363 (source (origin
364 (method url-fetch)
365 (uri (string-append "mirror://savannah/lzip/lzip-"
366 version ".tar.gz"))
367 (sha256
368 (base32
275a7711 369 "0l9724rw1l3hg2ldr3n7ihqich4m9nc6y7l302bvdj4jmxdw530j"))))
0f323dad
LC
370 (build-system gnu-build-system)
371 (home-page "http://www.nongnu.org/lzip/lzip.html")
372 (synopsis "Lossless data compressor based on the LZMA algorithm")
373 (description
374 "Lzip is a lossless data compressor with a user interface similar to the
375one of gzip or bzip2. Lzip decompresses almost as fast as gzip and compresses
376more than bzip2, which makes it well suited for software distribution and data
377archiving. Lzip is a clean implementation of the LZMA algorithm.")
378 (license license:gpl3+)))
b357faac
AE
379
380(define-public sharutils
381 (package
382 (name "sharutils")
9a59ce24 383 (version "4.15.2")
b357faac
AE
384 (source
385 (origin
386 (method url-fetch)
387 (uri (string-append "mirror://gnu/sharutils/sharutils-"
388 version ".tar.xz"))
389 (sha256
390 (base32
9a59ce24 391 "16isapn8f39lnffc3dp4dan05b7x6mnc76v6q5nn8ysxvvvwy19b"))))
b357faac
AE
392 (build-system gnu-build-system)
393 (inputs
394 `(("which" ,which)))
395 (arguments
396 `(#:phases
397 (alist-cons-after
398 'patch-source-shebangs 'unpatch-source-shebang
399 ;; revert the patch-shebang phase on a script which is
400 ;; in fact test data
d4bf49b1 401 (lambda _
b357faac
AE
402 (substitute* "tests/shar-1.ok"
403 (((which "sh")) "/bin/sh")))
404 %standard-phases)))
405 (home-page "http://www.gnu.org/software/sharutils/")
406 (synopsis "Archives in shell scripts, uuencode/uudecode")
407 (description
79c311b8
LC
408 "GNU sharutils is a package for creating and manipulating shell
409archives that can be readily emailed. A shell archive is a file that can be
e881752c 410processed by a Bourne-type shell to unpack the original collection of files.
79c311b8 411This package is mostly for compatibility and historical interest.")
b357faac 412 (license license:gpl3+)))
28469ab0 413
646898b3
RW
414(define-public sfarklib
415 (package
416 (name "sfarklib")
979f9e8a 417 (version "2.24")
646898b3 418 (source (origin
979f9e8a
RW
419 (method url-fetch)
420 (uri (string-append "https://github.com/raboof/sfArkLib/archive/"
421 version ".tar.gz"))
422 (file-name (string-append name "-" version ".tar.gz"))
646898b3
RW
423 (sha256
424 (base32
979f9e8a 425 "0bzs2d98rk1xw9qwpnc7gmlbxwmwc3dg1rpn310afy9pq1k9clzi"))))
646898b3
RW
426 (build-system gnu-build-system)
427 (arguments
428 `(#:tests? #f ;no "check" target
429 #:phases
430 (modify-phases %standard-phases
431 (replace 'configure
432 (lambda* (#:key outputs #:allow-other-keys)
433 (substitute* "Makefile"
434 (("/usr/local") (assoc-ref outputs "out")))
435 #t)))))
436 (inputs
437 `(("zlib" ,zlib)))
438 (home-page "https://github.com/raboof/sfArkLib")
439 (synopsis "Library for SoundFont decompression")
440 (description
441 "SfArkLib is a C++ library for decompressing SoundFont files compressed
442with the sfArk algorithm.")
443 (license license:gpl3+)))
444
b5ad1659 445(define-public sfarkxtc
698bd297 446 (let ((commit "b5e0a2ba3921f019d74d4b92bd31c36dd19d2cf1"))
b5ad1659
RW
447 (package
448 (name "sfarkxtc")
698bd297 449 (version (string-take commit 10))
b5ad1659
RW
450 (source (origin
451 ;; There are no release tarballs, so we just fetch the latest
452 ;; commit at this time.
453 (method git-fetch)
454 (uri (git-reference
455 (url "https://github.com/raboof/sfarkxtc.git")
698bd297 456 (commit commit)))
b5ad1659
RW
457 (sha256
458 (base32
459 "0f5x6i46qfl6ry21s7g2p4sd4b2r1g4fb03yqi2vv4kq3saryhvj"))))
460 (build-system gnu-build-system)
461 (arguments
462 `(#:tests? #f ;no "check" target
463 #:phases
464 (modify-phases %standard-phases
465 (replace 'configure
466 (lambda* (#:key outputs #:allow-other-keys)
467 (substitute* "Makefile"
468 (("/usr/local") (assoc-ref outputs "out")))
469 #t)))))
470 (inputs
471 `(("zlib" ,zlib)
472 ("sfarklib" ,sfarklib)))
473 (home-page "https://github.com/raboof/sfarkxtc")
474 (synopsis "Basic sfArk decompressor")
475 (description "SfArk extractor converts SoundFonts in the compressed legacy
476sfArk file format to the uncompressed sf2 format.")
698bd297 477 (license license:gpl3+))))
b5ad1659 478
27f76fe6
TUBK
479(define-public libmspack
480 (package
481 (name "libmspack")
482 (version "0.5")
483 (source
484 (origin
485 (method url-fetch)
486 (uri (string-append "http://www.cabextract.org.uk/libmspack/libmspack-"
487 version "alpha.tar.gz"))
488 (sha256
489 (base32 "04413hynb7zizxnkgy9riik3612dwirkpr6fcjrnfl2za9sz4rw9"))))
490 (build-system gnu-build-system)
491 (home-page "http://www.cabextract.org.uk/libmspack/")
492 (synopsis "Compression tools for some formats used by Microsoft")
493 (description
494 "The purpose of libmspack is to provide both compression and
495decompression of some loosely related file formats used by Microsoft.")
496 (license license:lgpl2.1+)))
73f542c3
EB
497
498(define-public perl-compress-raw-bzip2
499 (package
500 (name "perl-compress-raw-bzip2")
501 (version "2.068")
502 (source
503 (origin
504 (method url-fetch)
505 (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/"
506 "Compress-Raw-Bzip2-" version ".tar.gz"))
507 (sha256
508 (base32
509 "16hl58xppckldz05zdyid1l5gpaykzwvkq682h3rc3nilbhgjqqg"))))
510 (build-system perl-build-system)
511 ;; TODO: Use our bzip2 package.
512 (home-page "http://search.cpan.org/dist/Compress-Raw-Bzip2")
513 (synopsis "Low-level interface to bzip2 compression library")
514 (description "This module provides a Perl interface to the bzip2
515compression library.")
516 (license (package-license perl))))
8e18514a
EB
517
518(define-public perl-compress-raw-zlib
519 (package
520 (name "perl-compress-raw-zlib")
521 (version "2.068")
522 (source
523 (origin
524 (method url-fetch)
525 (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/"
526 "Compress-Raw-Zlib-" version ".tar.gz"))
527 (sha256
528 (base32
529 "06q7n87g26nn5gv4z2p31ca32f6zk124hqxc25rfgkjd3qi5798i"))))
530 (build-system perl-build-system)
531 (inputs
532 `(("zlib" ,zlib)))
533 (arguments
534 `(#:phases (modify-phases %standard-phases
535 (add-before
40b084a3 536 'configure 'configure-zlib
8e18514a
EB
537 (lambda* (#:key inputs #:allow-other-keys)
538 (call-with-output-file "config.in"
539 (lambda (port)
540 (format port "
541BUILD_ZLIB = False
542INCLUDE = ~a/include
543LIB = ~:*~a/lib
544OLD_ZLIB = False
545GZIP_OS_CODE = AUTO_DETECT"
546 (assoc-ref inputs "zlib")))))))))
547 (home-page "http://search.cpan.org/dist/Compress-Raw-Zlib")
548 (synopsis "Low-level interface to zlib compression library")
549 (description "This module provides a Perl interface to the zlib
550compression library.")
551 (license (package-license perl))))
8aaafd34
EB
552
553(define-public perl-io-compress
554 (package
555 (name "perl-io-compress")
556 (version "2.068")
557 (source
558 (origin
559 (method url-fetch)
560 (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/"
561 "IO-Compress-" version ".tar.gz"))
562 (sha256
563 (base32
564 "0dy0apjp7j9dfkzfjspjd3z9gh26srx5vac72g59bkkz1jf8s1gs"))))
565 (build-system perl-build-system)
566 (propagated-inputs
567 `(("perl-compress-raw-zlib" ,perl-compress-raw-zlib) ; >=2.068
568 ("perl-compress-raw-bzip2" ,perl-compress-raw-bzip2))) ; >=2.068
569 (home-page "http://search.cpan.org/dist/IO-Compress")
570 (synopsis "IO Interface to compressed files/buffers")
571 (description "IO-Compress provides a Perl interface to allow reading and
572writing of compressed data created with the zlib and bzip2 libraries.")
573 (license (package-license perl))))
82aa2a28
LF
574
575(define-public lz4
576 (package
577 (name "lz4")
578 (version "131")
579 (source
580 (origin
581 (method url-fetch)
582 (uri (string-append "https://github.com/Cyan4973/lz4/archive/"
583 "r" version ".tar.gz"))
584 (sha256
585 (base32 "1vfg305zvj50hwscad24wan9jar6nqj14gdk2hqyr7bb9mhh0kcx"))
586 (file-name (string-append name "-" version ".tar.gz"))))
587 (build-system gnu-build-system)
588 (native-inputs `(("valgrind" ,valgrind)))
589 (arguments
590 `(#:test-target "test"
591 #:parallel-tests? #f ; tests fail if run in parallel
592 #:make-flags (list "CC=gcc"
593 (string-append "PREFIX=" (assoc-ref %outputs "out")))
594 #:phases (modify-phases %standard-phases
595 (delete 'configure))))
596 (home-page "https://github.com/Cyan4973/lz4")
597 (synopsis "Compression algorithm focused on speed")
598 (description "LZ4 is a lossless compression algorithm, providing
599compression speed at 400 MB/s per core (0.16 Bytes/cycle). It also features an
600extremely fast decoder, with speed in multiple GB/s per core (0.71 Bytes/cycle).
601A high compression derivative, called LZ4_HC, is also provided. It trades CPU
602time for compression ratio.")
603 ;; The libraries (lz4, lz4hc, and xxhash are BSD licenced. The command
604 ;; line interface programs (lz4, fullbench, fuzzer, datagen) are GPL2+.
605 (license (list license:bsd-2 license:gpl2+))))
dd8d6d65
SB
606
607(define-public squashfs-tools
608 (package
609 (name "squashfs-tools")
610 (version "4.3")
611 (source (origin
612 (method url-fetch)
613 (uri (string-append "mirror://sourceforge/squashfs/"
614 "squashfs" version ".tar.gz"))
615 (sha256
616 (base32
617 "1xpklm0y43nd9i6jw43y2xh5zvlmj9ar2rvknh0bh7kv8c95aq0d"))))
618 (build-system gnu-build-system)
619 (arguments
620 '(#:tests? #f ; no check target
621 #:make-flags
622 (list "CC=gcc"
623 "XZ_SUPPORT=1"
624 "LZO_SUPPORT=1"
625 "LZ4_SUPPORT=1"
626 (string-append "INSTALL_DIR=" %output "/bin"))
627 #:phases
628 (modify-phases %standard-phases
629 (replace 'configure
630 (lambda _
631 (chdir "squashfs-tools"))))))
632 (inputs
633 `(("lz4" ,lz4)
634 ("lzo" ,lzo)
635 ("xz" ,xz)
636 ("zlib" ,zlib)))
637 (home-page "http://squashfs.sourceforge.net/")
638 (synopsis "Tools to create and extract squashfs filesystems")
639 (description
640 "Squashfs is a highly compressed read-only filesystem for Linux. It uses
641zlib to compress files, inodes, and directories. All blocks are packed to
642minimize the data overhead, and block sizes of between 4K and 1M are supported.
643It is intended to be used for archival use, for live CDs, and for embedded
644systems where low overhead is needed. This package allows you to create and
645extract such filesystems.")
646 (license license:gpl2+)))
820dc3f5
JM
647
648(define-public pigz
649 (package
650 (name "pigz")
651 (version "2.3.3")
652 (source (origin
653 (method url-fetch)
654 (uri (string-append "http://zlib.net/pigz/"
655 name "-" version ".tar.gz"))
656 (sha256
657 (base32
658 "172hdf26k4zmm7z8md7nl0dph2a7mhf3x7slb9bhfyff6as6g2sf"))))
659 (build-system gnu-build-system)
660 (arguments
661 `(#:phases
662 (modify-phases %standard-phases
663 (delete 'configure)
664 (replace 'install
665 (lambda* (#:key outputs #:allow-other-keys)
666 (let* ((out (assoc-ref outputs "out"))
667 (bin (string-append out "/bin"))
668 (man (string-append out "/share/man/man1")))
669 (install-file "pigz" bin)
670 (symlink "pigz" (string-append bin "/unpigz"))
671 (install-file "pigz.1" man)
672 #t))))
673 #:make-flags (list "CC=gcc")
674 #:test-target "tests"))
675 (inputs `(("zlib" ,zlib)))
676 (home-page "http://zlib.net/pigz/")
677 (synopsis "Parallel implementation of gzip")
678 (description
679 "This package provides a parallel implementation of gzip that exploits
680multiple processors and multiple cores when compressing data.")
681
682 ;; Things under zopfli/ are under ASL2.0, but 4 files at the top-level,
683 ;; written by Mark Adler, are under another non-copyleft license.
684 (license license:asl2.0)))
23f3cbb8
BW
685
686(define-public pixz
687 (package
688 (name "pixz")
689 (version "1.0.6")
690 (source (origin
691 (method url-fetch)
692 (uri (string-append
693 "https://github.com/vasi/pixz/releases/download/v" version
694 "/pixz-" version ".tar.xz"))
695 (sha256
696 (base32
697 "1s3j7zw6j5zi3fhdxg287ndr3wf6swac7z21mqd1pyiln530gi82"))))
698 (build-system gnu-build-system)
699 (native-inputs
700 `(("pkg-config" ,pkg-config)
701 ("libarchive" ,libarchive)))
702 (home-page "https://github.com/vasi/pixz")
703 (synopsis "Parallel indexing implementation of LZMA")
704 (description
705 "The existing XZ Utils provide great compression in the .xz file format,
706but they produce just one big block of compressed data. Pixz instead produces
707a collection of smaller blocks which makes random access to the original data
708possible and can compress in parallel. This is especially useful for large
709tarballs.")
710 (license license:bsd-2)))
69d9792a
EB
711
712(define-public brotli
713 (let ((commit "e992cce7a174d6e2b3486616499d26bb0bad6448")
714 (revision "1"))
715 (package
716 (name "brotli")
717 (version (string-append "0.1-" revision "."
718 (string-take commit 7)))
719 (source (origin
720 (method git-fetch)
721 (uri (git-reference
722 (url "https://github.com/bagder/libbrotli.git")
723 (commit commit)
724 (recursive? #t)))
725 (file-name (string-append name "-" version ".tar.xz"))
726 (sha256
727 (base32
728 "1qxxsasvwbbbh6dl3138y9h3fg0q2v7xdk5jjc690bdg7g1wrj6n"))
729 (modules '((guix build utils)))
730 (snippet
731 ;; This is a recursive submodule that is unnecessary for this
732 ;; package, so delete it.
733 '(delete-file-recursively "brotli/terryfy"))))
734 (build-system gnu-build-system)
735 (native-inputs
736 `(("autoconf" ,autoconf)
737 ("automake" ,automake)
738 ("libtool" ,libtool)))
739 (arguments
740 `(#:phases (modify-phases %standard-phases
741 (add-after 'unpack 'autogen
742 (lambda _
743 (mkdir "m4")
744 (zero? (system* "autoreconf" "-vfi")))))))
745 (home-page "https://github.com/bagder/libbrotli/")
746 (synopsis "Implementation of the Brotli compression algorithm")
747 (description
748 "Brotli is a general-purpose lossless compression algorithm. It is
749similar in speed to deflate but offers denser compression. This package
750provides encoder and a decoder libraries: libbrotlienc and libbrotlidec,
751respectively, based on the reference implementation from Google.")
752 (license license:expat))))
3fd4b90d
DM
753
754(define-public cabextract
755 (package
756 (name "cabextract")
757 (version "1.6")
758 (source (origin
759 (method url-fetch)
760 (uri (string-append
761 "http://cabextract.org.uk/cabextract-" version ".tar.gz"))
762 (sha256
763 (base32
764 "1ysmmz25fjghq7mxb2anyyvr1ljxqxzi4piwjhk0sdamcnsn3rnf"))))
765 (build-system gnu-build-system)
766 (arguments '(#:configure-flags '("--with-external-libmspack")))
767 (native-inputs
768 `(("pkg-config" ,pkg-config)))
769 (inputs
770 `(("libmspack" ,libmspack)))
771 (home-page "http://www.cabextract.org.uk/")
772 (synopsis "Tool to unpack Cabinet archives")
773 (description "Extracts files out of Microsoft Cabinet (.cab) archives")
774 ;; Some source files specify gpl2+, lgpl2+, however COPYING is gpl3.
775 (license license:gpl3+)))