Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / compression.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
6 ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
8 ;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
9 ;;; Copyright © 2015 Jeff Mickey <j@codemac.net>
10 ;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il>
11 ;;;
12 ;;; This file is part of GNU Guix.
13 ;;;
14 ;;; GNU Guix is free software; you can redistribute it and/or modify it
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 ;;;
19 ;;; GNU Guix is distributed in the hope that it will be useful, but
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
25 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26
27 (define-module (gnu packages compression)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix utils)
30 #:use-module (guix packages)
31 #:use-module (guix download)
32 #:use-module (guix git-download)
33 #:use-module (guix build-system gnu)
34 #:use-module (guix build-system perl)
35 #:use-module (gnu packages base)
36 #:use-module (gnu packages perl)
37 #:use-module (gnu packages valgrind)
38 #:use-module ((srfi srfi-1) #:select (last)))
39
40 (define-public zlib
41 (package
42 (name "zlib")
43 (version "1.2.7")
44 (source
45 (origin
46 (method url-fetch)
47 (uri (list (string-append "http://zlib.net/zlib-"
48 version ".tar.gz")
49 (string-append "mirror://sourceforge/libpng/zlib-"
50 version ".tar.gz")))
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)
59 ;; Zlib's home-made `configure' fails when passed
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")))
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)))))
70 %standard-phases)))
71 (home-page "http://zlib.net/")
72 (synopsis "Compression library")
73 (description
74 "zlib is designed to be a free, general-purpose, legally unencumbered --
75 that is, not covered by any patents -- lossless data-compression library for
76 use on virtually any computer hardware and operating system. The zlib data
77 format is itself portable across platforms. Unlike the LZW compression method
78 used in Unix compress(1) and in the GIF image format, the compression method
79 currently used in zlib essentially never expands the data. (LZW can double or
80 triple the file size in extreme cases.) zlib's memory footprint is also
81 independent of the input data and can be reduced, if necessary, at some cost
82 in compression.")
83 (license license:zlib)))
84
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'
102 utility. Instead of being written in Java, FastJar is written in C.")
103 (license license:gpl2+)))
104
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
122 adding and extracting files to/from a tar archive.")
123 (home-page "http://www.feep.net/libtar/")
124 (license license:bsd-3)))
125
126 (define-public gzip
127 (package
128 (name "gzip")
129 (version "1.6")
130 (source (origin
131 (method url-fetch)
132 (uri (string-append "mirror://gnu/gzip/gzip-"
133 version ".tar.gz"))
134 (sha256
135 (base32
136 "0zlgdm4v3dndrbiz7b67mbbj25dpwqbmbzjiycssvrfrcfvq7swp"))))
137 (build-system gnu-build-system)
138 (synopsis "General file (de)compression (using lzw)")
139 (arguments
140 ;; FIXME: The test suite wants `less', and optionally Perl.
141 '(#:tests? #f))
142 (description
143 "GNU Gzip provides data compression and decompression utilities; the
144 typical extension is \".gz\". Unlike the \"zip\" format, it compresses a single
145 file; as a result, it is often used in conjunction with \"tar\", resulting in
146 \".tar.gz\" or \".tgz\", etc.")
147 (license license:gpl3+)
148 (home-page "http://www.gnu.org/software/gzip/")))
149
150 (define-public bzip2
151 (let ((build-shared-lib
152 ;; Build a shared library.
153 '(lambda* (#:key inputs #:allow-other-keys)
154 (patch-makefile-SHELL "Makefile-libbz2_so")
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))))
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"))))))
179 (package
180 (name "bzip2")
181 (version "1.0.6")
182 (source (origin
183 (method url-fetch)
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
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
201 'install 'install-shared-lib ,install-shared-lib
202 (alist-replace 'configure ,set-cross-environment
203 %standard-phases)))
204
205 ;; Native compilation: build the shared library.
206 `(alist-cons-before
207 'build 'build-shared-lib ,build-shared-lib
208 (alist-cons-after
209 'install 'install-shared-lib ,install-shared-lib
210 (alist-delete 'configure %standard-phases))))
211
212 #:make-flags (list (string-append "PREFIX="
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 '())))
219 (synopsis "High-quality data compression program")
220 (description
221 "bzip2 is a freely available, patent free (see below), high-quality data
222 compressor. It typically compresses files to within 10% to 15% of the best
223 available techniques (the PPM family of statistical compressors), whilst
224 being around twice as fast at compression and six times faster at
225 decompression.")
226 (license (license:non-copyleft "file://LICENSE"
227 "See LICENSE in the distribution."))
228 (home-page "http://www.bzip.org/"))))
229
230 (define-public pbzip2
231 (package
232 (name "pbzip2")
233 (version "1.1.12")
234 (source (origin
235 (method url-fetch)
236 (uri (string-append "https://launchpad.net/pbzip2/"
237 (version-major+minor version) "/" version
238 "/+download/" name "-" version ".tar.gz"))
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
248 (delete 'configure))
249 #:make-flags (list (string-append "PREFIX=" %output))))
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
254 compressor that uses pthreads and achieves near-linear speedup on SMP machines.
255 The output of this version is fully compatible with bzip2 v1.0.2 (i.e. anything
256 compressed with pbzip2 can be decompressed with bzip2).")
257 (license (license:non-copyleft "file://COPYING"
258 "See COPYING in the distribution."))))
259
260 (define-public xz
261 (package
262 (name "xz")
263 (version "5.2.2")
264 (source (origin
265 (method url-fetch)
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")))
270 (sha256
271 (base32
272 "18h2k4jndhzjs8ln3a54qdnfv59y6spxiwh9gpaqniph6iflvpvk"))))
273 (build-system gnu-build-system)
274 (synopsis "General-purpose data compression")
275 (description
276 "XZ Utils is free general-purpose data compression software with high
277 compression ratio. XZ Utils were written for POSIX-like systems, but also
278 work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils.
279
280 The core of the XZ Utils compression code is based on LZMA SDK, but it has
281 been modified quite a lot to be suitable for XZ Utils. The primary
282 compression algorithm is currently LZMA2, which is used inside the .xz
283 container format. With typical files, XZ Utils create 30 % smaller output
284 than gzip and 15 % smaller output than bzip2.")
285 (license (list license:gpl2+ license:lgpl2.1+)) ; bits of both
286 (home-page "http://tukaani.org/xz/")))
287
288 (define-public lzo
289 (package
290 (name "lzo")
291 (version "2.09")
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
299 "0k5kpj3jnsjfxqqkblpfpx0mqcy86zs5fhjhgh2kq1hksg7ag57j"))))
300 (build-system gnu-build-system)
301 (arguments '(#:configure-flags '("--enable-shared")))
302 (home-page "http://www.oberhumer.com/opensource/lzo")
303 (synopsis
304 "Data compression library suitable for real-time data de-/compression")
305 (description
306 "LZO is a data compression library which is suitable for data
307 de-/compression in real-time. This means it favours speed over
308 compression ratio.
309
310 LZO is written in ANSI C. Both the source code and the compressed data
311 format are designed to be portable across platforms.")
312 (license license:gpl2+)))
313
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
332 LZO data compression library for compression services, and its main advantages
333 over gzip are much higher compression and decompression speed (at the cost of
334 some compression ratio).")
335 (license license:gpl2+)))
336
337 (define-public lzip
338 (package
339 (name "lzip")
340 (version "1.16")
341 (source (origin
342 (method url-fetch)
343 (uri (string-append "mirror://savannah/lzip/lzip-"
344 version ".tar.gz"))
345 (sha256
346 (base32
347 "0l9724rw1l3hg2ldr3n7ihqich4m9nc6y7l302bvdj4jmxdw530j"))))
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
353 one of gzip or bzip2. Lzip decompresses almost as fast as gzip and compresses
354 more than bzip2, which makes it well suited for software distribution and data
355 archiving. Lzip is a clean implementation of the LZMA algorithm.")
356 (license license:gpl3+)))
357
358 (define-public sharutils
359 (package
360 (name "sharutils")
361 (version "4.15.2")
362 (source
363 (origin
364 (method url-fetch)
365 (uri (string-append "mirror://gnu/sharutils/sharutils-"
366 version ".tar.xz"))
367 (sha256
368 (base32
369 "16isapn8f39lnffc3dp4dan05b7x6mnc76v6q5nn8ysxvvvwy19b"))))
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
379 (lambda _
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
386 "GNU sharutils is a package for creating and manipulating shell
387 archives that can be readily emailed. A shell archive is a file that can be
388 processed by a Bourne-type shell to unpack the original collection of files.
389 This package is mostly for compatibility and historical interest.")
390 (license license:gpl3+)))
391
392 (define-public sfarklib
393 (package
394 (name "sfarklib")
395 (version "2.24")
396 (source (origin
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"))
401 (sha256
402 (base32
403 "0bzs2d98rk1xw9qwpnc7gmlbxwmwc3dg1rpn310afy9pq1k9clzi"))))
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
420 with the sfArk algorithm.")
421 (license license:gpl3+)))
422
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
453 sfArk file format to the uncompressed sf2 format.")
454 (license license:gpl3+)))
455
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
472 decompression of some loosely related file formats used by Microsoft.")
473 (license license:lgpl2.1+)))
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
492 compression library.")
493 (license (package-license perl))))
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
513 'configure 'configure-zlib
514 (lambda* (#:key inputs #:allow-other-keys)
515 (call-with-output-file "config.in"
516 (lambda (port)
517 (format port "
518 BUILD_ZLIB = False
519 INCLUDE = ~a/include
520 LIB = ~:*~a/lib
521 OLD_ZLIB = False
522 GZIP_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
527 compression library.")
528 (license (package-license perl))))
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
549 writing of compressed data created with the zlib and bzip2 libraries.")
550 (license (package-license perl))))
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
576 compression speed at 400 MB/s per core (0.16 Bytes/cycle). It also features an
577 extremely fast decoder, with speed in multiple GB/s per core (0.71 Bytes/cycle).
578 A high compression derivative, called LZ4_HC, is also provided. It trades CPU
579 time 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+))))
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
618 zlib to compress files, inodes, and directories. All blocks are packed to
619 minimize the data overhead, and block sizes of between 4K and 1M are supported.
620 It is intended to be used for archival use, for live CDs, and for embedded
621 systems where low overhead is needed. This package allows you to create and
622 extract such filesystems.")
623 (license license:gpl2+)))
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
657 multiple 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)))