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