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, 2016 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
8 ;;; Copyright © 2015 Leo Famulari <leo@famulari.name>
9 ;;; Copyright © 2015 Jeff Mickey <j@codemac.net>
10 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
11 ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
12 ;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org>
13 ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
14 ;;; Copyright © 2016 David Craven <david@craven.ch>
15 ;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
17 ;;; This file is part of GNU Guix.
19 ;;; GNU Guix is free software; you can redistribute it and/or modify it
20 ;;; under the terms of the GNU General Public License as published by
21 ;;; the Free Software Foundation; either version 3 of the License, or (at
22 ;;; your option) any later version.
24 ;;; GNU Guix is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ;;; GNU General Public License for more details.
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32 (define-module (gnu packages compression)
33 #:use-module ((guix licenses) #:prefix license:)
34 #:use-module (guix utils)
35 #:use-module (guix packages)
36 #:use-module (guix download)
37 #:use-module (guix git-download)
38 #:use-module (guix build-system gnu)
39 #:use-module (guix build-system perl)
40 #:use-module (gnu packages)
41 #:use-module (gnu packages assembly)
42 #:use-module (gnu packages autotools)
43 #:use-module (gnu packages backup)
44 #:use-module (gnu packages base)
45 #:use-module (gnu packages perl)
46 #:use-module (gnu packages pkg-config)
47 #:use-module (gnu packages valgrind)
48 #:use-module ((srfi srfi-1) #:select (last)))
57 (uri (list (string-append "http://zlib.net/zlib-"
59 (string-append "mirror://sourceforge/libpng/zlib-"
63 "039agw5rqvqny92cpkrfn243x2gd4xn13hs3xi6isk55d2vqqr9n"))))
64 (build-system gnu-build-system)
66 `(#:phases (alist-replace
68 (lambda* (#:key outputs #:allow-other-keys)
69 ;; Zlib's home-made `configure' fails when passed
70 ;; extra flags like `--enable-fast-install', so we need to
71 ;; invoke it with just what it understand.
72 (let ((out (assoc-ref outputs "out")))
73 ;; 'configure' doesn't understand '--host'.
74 ,@(if (%current-target-system)
75 `((setenv "CHOST" ,(%current-target-system)))
78 (system* "./configure"
79 (string-append "--prefix=" out)))))
81 (home-page "http://zlib.net/")
82 (synopsis "Compression library")
84 "zlib is designed to be a free, general-purpose, legally unencumbered --
85 that is, not covered by any patents -- lossless data-compression library for
86 use on virtually any computer hardware and operating system. The zlib data
87 format is itself portable across platforms. Unlike the LZW compression method
88 used in Unix compress(1) and in the GIF image format, the compression method
89 currently used in zlib essentially never expands the data. (LZW can double or
90 triple the file size in extreme cases.) zlib's memory footprint is also
91 independent of the input data and can be reduced, if necessary, at some cost
93 (license license:zlib)))
95 (define-public fastjar
101 (uri (string-append "mirror://savannah/fastjar/fastjar-"
105 "0iginbz2m15hcsa3x4y7v3mhk54gr1r7m3ghx0pg4n46vv2snmpi"))))
106 (build-system gnu-build-system)
107 (inputs `(("zlib" ,zlib)))
108 (home-page "http://savannah.nongnu.org/projects/fastjar")
109 (synopsis "Replacement for Sun's 'jar' utility")
111 "FastJar is an attempt to create a much faster replacement for Sun's 'jar'
112 utility. Instead of being written in Java, FastJar is written in C.")
113 (license license:gpl2+)))
115 (define-public libtar
123 "ftp://ftp.feep.net/pub/software/libtar/libtar-"
126 "mirror://debian/pool/main/libt/libtar/libtar_"
127 version ".orig.tar.gz")))
130 "02cihzl77ia0dcz7z2cga2412vyhhs5pa2355q4wpwbyga2lrwjh"))
131 (patches (search-patches "libtar-CVE-2013-4420.patch"))))
132 (build-system gnu-build-system)
134 `(#:tests? #f ;no "check" target
136 (modify-phases %standard-phases
137 (add-after 'unpack 'autoconf
138 (lambda _ (zero? (system* "sh" "autoreconf" "-vfi")))))))
140 `(("autoconf" ,autoconf)
141 ("automake" ,automake)
142 ("libtool" ,libtool)))
145 (synopsis "C library for manipulating POSIX tar files")
147 "libtar is a C library for manipulating POSIX tar files. It handles
148 adding and extracting files to/from a tar archive.")
149 (home-page "https://repo.or.cz/libtar.git")
150 (license license:bsd-3)))
158 (uri (string-append "mirror://gnu/gzip/gzip-"
162 "1lxv3p4iyx7833mlihkn5wfwmz4cys5nybwpz3dfawag8kn6f5zz"))))
163 (build-system gnu-build-system)
164 (synopsis "General file (de)compression (using lzw)")
166 ;; FIXME: The test suite wants `less', and optionally Perl.
169 "GNU Gzip provides data compression and decompression utilities; the
170 typical extension is \".gz\". Unlike the \"zip\" format, it compresses a single
171 file; as a result, it is often used in conjunction with \"tar\", resulting in
172 \".tar.gz\" or \".tgz\", etc.")
173 (license license:gpl3+)
174 (home-page "http://www.gnu.org/software/gzip/")))
177 (let ((build-shared-lib
178 ;; Build a shared library.
179 '(lambda* (#:key inputs #:allow-other-keys)
180 (patch-makefile-SHELL "Makefile-libbz2_so")
181 (zero? (system* "make" "-f" "Makefile-libbz2_so"))))
183 '(lambda* (#:key outputs #:allow-other-keys)
184 (let* ((out (assoc-ref outputs "out"))
185 (libdir (string-append out "/lib")))
186 (for-each (lambda (file)
187 (let ((base (basename file)))
188 (format #t "installing `~a' to `~a'~%"
191 (string-append libdir "/" base))))
192 (find-files "." "^libbz2\\.so")))))
193 (set-cross-environment
194 '(lambda* (#:key target #:allow-other-keys)
195 (substitute* (find-files "." "Makefile")
197 (string-append "CC = " target "-gcc\n"))
199 (string-append "AR = " target "-ar\n"))
201 (string-append "RANLIB = " target "-ranlib\n"))
202 (("^all:(.*)test" _ prerequisites)
203 ;; Remove 'all' -> 'test' dependency.
204 (string-append "all:" prerequisites "\n"))))))
210 (uri (string-append "http://www.bzip.org/" version "/bzip2-"
214 "1kfrc7f0ja9fdn6j1y6yir6li818npy6217hvr3wzmnmzhs8z152"))))
215 (build-system gnu-build-system)
217 `(#:modules ((guix build gnu-build-system)
221 ,(if (%current-target-system)
223 ;; Cross-compilation: use the cross tools.
225 'build 'build-shared-lib ,build-shared-lib
227 'install 'install-shared-lib ,install-shared-lib
228 (alist-replace 'configure ,set-cross-environment
231 ;; Native compilation: build the shared library.
233 'build 'build-shared-lib ,build-shared-lib
235 'install 'install-shared-lib ,install-shared-lib
236 (alist-delete 'configure %standard-phases))))
238 #:make-flags (list (string-append "PREFIX="
239 (assoc-ref %outputs "out")))
241 ;; Don't attempt to run the tests when cross-compiling.
242 ,@(if (%current-target-system)
245 (synopsis "High-quality data compression program")
247 "bzip2 is a freely available, patent free (see below), high-quality data
248 compressor. It typically compresses files to within 10% to 15% of the best
249 available techniques (the PPM family of statistical compressors), whilst
250 being around twice as fast at compression and six times faster at
252 (license (license:non-copyleft "file://LICENSE"
253 "See LICENSE in the distribution."))
254 (home-page "http://www.bzip.org/"))))
256 (define-public lbzip2
262 (uri (string-append "http://archive.lbzip2.org/lbzip2-"
266 "1sahaqc5bw4i0iyri05syfza4ncf5cml89an033fspn97klmxis6"))))
267 (build-system gnu-build-system)
268 (synopsis "Parallel bzip2 compression utility")
270 "lbzip2 is a multi-threaded compression utility with support for the
271 bzip2 compressed file format. lbzip2 can process standard bz2 files in
272 parallel. It uses POSIX threading model (pthreads), which allows it to take
273 full advantage of symmetric multiprocessing (SMP) systems. It has been proven
274 to scale linearly, even to over one hundred processor cores. lbzip2 is fully
275 compatible with bzip2 – both at file format and command line level.")
276 (home-page "http://www.lbzip2.org/")
277 (license license:gpl3+)))
279 (define-public pbzip2
285 (uri (string-append "https://launchpad.net/pbzip2/"
286 (version-major+minor version) "/" version
287 "/+download/" name "-" version ".tar.gz"))
290 "1vk6065dv3a47p86vmp8hv3n1ygd9hraz0gq89gvzlx7lmcb6fsp"))))
291 (build-system gnu-build-system)
295 `(#:tests? #f ; no tests
296 #:phases (modify-phases %standard-phases
298 #:make-flags (list (string-append "PREFIX=" %output))))
299 (home-page "http://compression.ca/pbzip2/")
300 (synopsis "Parallel bzip2 implementation")
302 "Pbzip2 is a parallel implementation of the bzip2 block-sorting file
303 compressor that uses pthreads and achieves near-linear speedup on SMP machines.
304 The output of this version is fully compatible with bzip2 v1.0.2 (i.e. anything
305 compressed with pbzip2 can be decompressed with bzip2).")
306 (license (license:non-copyleft "file://COPYING"
307 "See COPYING in the distribution."))))
315 (uri (list (string-append "http://tukaani.org/xz/xz-" version
317 (string-append "http://multiprecision.org/guix/xz-"
321 "18h2k4jndhzjs8ln3a54qdnfv59y6spxiwh9gpaqniph6iflvpvk"))))
322 (build-system gnu-build-system)
323 (synopsis "General-purpose data compression")
325 "XZ Utils is free general-purpose data compression software with high
326 compression ratio. XZ Utils were written for POSIX-like systems, but also
327 work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils.
329 The core of the XZ Utils compression code is based on LZMA SDK, but it has
330 been modified quite a lot to be suitable for XZ Utils. The primary
331 compression algorithm is currently LZMA2, which is used inside the .xz
332 container format. With typical files, XZ Utils create 30 % smaller output
333 than gzip and 15 % smaller output than bzip2.")
334 (license (list license:gpl2+ license:lgpl2.1+)) ; bits of both
335 (home-page "http://tukaani.org/xz/")))
344 (uri (string-append "http://www.oberhumer.com/opensource/lzo/download/lzo-"
348 "0k5kpj3jnsjfxqqkblpfpx0mqcy86zs5fhjhgh2kq1hksg7ag57j"))))
349 (build-system gnu-build-system)
350 (arguments '(#:configure-flags '("--enable-shared")))
351 (home-page "http://www.oberhumer.com/opensource/lzo")
353 "Data compression library suitable for real-time data de-/compression")
355 "LZO is a data compression library which is suitable for data
356 de-/compression in real-time. This means it favours speed over
359 LZO is written in ANSI C. Both the source code and the compressed data
360 format are designed to be portable across platforms.")
361 (license license:gpl2+)))
370 (uri (string-append "http://www.lzop.org/download/lzop-"
374 "1jdjvc4yjndf7ihmlcsyln2rbnbaxa86q4jskmkmm7ylfy65nhn1"))))
375 (build-system gnu-build-system)
376 (inputs `(("lzo" ,lzo)))
377 (home-page "http://www.lzop.org/")
378 (synopsis "Compress or expand files")
380 "Lzop is a file compressor which is very similar to gzip. Lzop uses the
381 LZO data compression library for compression services, and its main advantages
382 over gzip are much higher compression and decompression speed (at the cost of
383 some compression ratio).")
384 (license license:gpl2+)))
392 (uri (string-append "mirror://savannah/lzip/lzip-"
396 "0l9724rw1l3hg2ldr3n7ihqich4m9nc6y7l302bvdj4jmxdw530j"))))
397 (build-system gnu-build-system)
398 (home-page "http://www.nongnu.org/lzip/lzip.html")
399 (synopsis "Lossless data compressor based on the LZMA algorithm")
401 "Lzip is a lossless data compressor with a user interface similar to the
402 one of gzip or bzip2. Lzip decompresses almost as fast as gzip and compresses
403 more than bzip2, which makes it well suited for software distribution and data
404 archiving. Lzip is a clean implementation of the LZMA algorithm.")
405 (license license:gpl3+)))
407 (define-public sharutils
414 (uri (string-append "mirror://gnu/sharutils/sharutils-"
418 "16isapn8f39lnffc3dp4dan05b7x6mnc76v6q5nn8ysxvvvwy19b"))))
419 (build-system gnu-build-system)
425 'patch-source-shebangs 'unpatch-source-shebang
426 ;; revert the patch-shebang phase on a script which is
429 (substitute* "tests/shar-1.ok"
430 (((which "sh")) "/bin/sh")))
432 (home-page "http://www.gnu.org/software/sharutils/")
433 (synopsis "Archives in shell scripts, uuencode/uudecode")
435 "GNU sharutils is a package for creating and manipulating shell
436 archives that can be readily emailed. A shell archive is a file that can be
437 processed by a Bourne-type shell to unpack the original collection of files.
438 This package is mostly for compatibility and historical interest.")
439 (license license:gpl3+)))
441 (define-public sfarklib
447 (uri (string-append "https://github.com/raboof/sfArkLib/archive/"
449 (file-name (string-append name "-" version ".tar.gz"))
452 "0bzs2d98rk1xw9qwpnc7gmlbxwmwc3dg1rpn310afy9pq1k9clzi"))))
453 (build-system gnu-build-system)
455 `(#:tests? #f ;no "check" target
457 (modify-phases %standard-phases
459 (lambda* (#:key outputs #:allow-other-keys)
460 (substitute* "Makefile"
461 (("/usr/local") (assoc-ref outputs "out")))
465 (home-page "https://github.com/raboof/sfArkLib")
466 (synopsis "Library for SoundFont decompression")
468 "SfArkLib is a C++ library for decompressing SoundFont files compressed
469 with the sfArk algorithm.")
470 (license license:gpl3+)))
472 (define-public sfarkxtc
473 (let ((commit "b5e0a2ba3921f019d74d4b92bd31c36dd19d2cf1"))
476 (version (string-take commit 10))
478 ;; There are no release tarballs, so we just fetch the latest
479 ;; commit at this time.
482 (url "https://github.com/raboof/sfarkxtc.git")
486 "0f5x6i46qfl6ry21s7g2p4sd4b2r1g4fb03yqi2vv4kq3saryhvj"))))
487 (build-system gnu-build-system)
489 `(#:tests? #f ;no "check" target
491 (modify-phases %standard-phases
493 (lambda* (#:key outputs #:allow-other-keys)
494 (substitute* "Makefile"
495 (("/usr/local") (assoc-ref outputs "out")))
499 ("sfarklib" ,sfarklib)))
500 (home-page "https://github.com/raboof/sfarkxtc")
501 (synopsis "Basic sfArk decompressor")
502 (description "SfArk extractor converts SoundFonts in the compressed legacy
503 sfArk file format to the uncompressed sf2 format.")
504 (license license:gpl3+))))
506 (define-public libmspack
513 (uri (string-append "http://www.cabextract.org.uk/libmspack/libmspack-"
514 version "alpha.tar.gz"))
516 (base32 "04413hynb7zizxnkgy9riik3612dwirkpr6fcjrnfl2za9sz4rw9"))))
517 (build-system gnu-build-system)
518 (home-page "http://www.cabextract.org.uk/libmspack/")
519 (synopsis "Compression tools for some formats used by Microsoft")
521 "The purpose of libmspack is to provide both compression and
522 decompression of some loosely related file formats used by Microsoft.")
523 (license license:lgpl2.1+)))
525 (define-public perl-compress-raw-bzip2
527 (name "perl-compress-raw-bzip2")
532 (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/"
533 "Compress-Raw-Bzip2-" version ".tar.gz"))
536 "16hl58xppckldz05zdyid1l5gpaykzwvkq682h3rc3nilbhgjqqg"))))
537 (build-system perl-build-system)
538 ;; TODO: Use our bzip2 package.
539 (home-page "http://search.cpan.org/dist/Compress-Raw-Bzip2")
540 (synopsis "Low-level interface to bzip2 compression library")
541 (description "This module provides a Perl interface to the bzip2
542 compression library.")
543 (license (package-license perl))))
545 (define-public perl-compress-raw-zlib
547 (name "perl-compress-raw-zlib")
552 (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/"
553 "Compress-Raw-Zlib-" version ".tar.gz"))
556 "06q7n87g26nn5gv4z2p31ca32f6zk124hqxc25rfgkjd3qi5798i"))))
557 (build-system perl-build-system)
561 `(#:phases (modify-phases %standard-phases
563 'configure 'configure-zlib
564 (lambda* (#:key inputs #:allow-other-keys)
565 (call-with-output-file "config.in"
572 GZIP_OS_CODE = AUTO_DETECT"
573 (assoc-ref inputs "zlib")))))))))
574 (home-page "http://search.cpan.org/dist/Compress-Raw-Zlib")
575 (synopsis "Low-level interface to zlib compression library")
576 (description "This module provides a Perl interface to the zlib
577 compression library.")
578 (license (package-license perl))))
580 (define-public perl-io-compress
582 (name "perl-io-compress")
587 (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/"
588 "IO-Compress-" version ".tar.gz"))
591 "0dy0apjp7j9dfkzfjspjd3z9gh26srx5vac72g59bkkz1jf8s1gs"))))
592 (build-system perl-build-system)
594 `(("perl-compress-raw-zlib" ,perl-compress-raw-zlib) ; >=2.068
595 ("perl-compress-raw-bzip2" ,perl-compress-raw-bzip2))) ; >=2.068
596 (home-page "http://search.cpan.org/dist/IO-Compress")
597 (synopsis "IO Interface to compressed files/buffers")
598 (description "IO-Compress provides a Perl interface to allow reading and
599 writing of compressed data created with the zlib and bzip2 libraries.")
600 (license (package-license perl))))
609 (uri (string-append "https://github.com/Cyan4973/lz4/archive/"
610 "r" version ".tar.gz"))
612 (base32 "1vfg305zvj50hwscad24wan9jar6nqj14gdk2hqyr7bb9mhh0kcx"))
613 (file-name (string-append name "-" version ".tar.gz"))))
614 (build-system gnu-build-system)
615 (native-inputs `(("valgrind" ,valgrind)))
617 `(#:test-target "test"
618 #:parallel-tests? #f ; tests fail if run in parallel
619 #:make-flags (list "CC=gcc"
620 (string-append "PREFIX=" (assoc-ref %outputs "out")))
621 #:phases (modify-phases %standard-phases
622 (delete 'configure))))
623 (home-page "https://github.com/Cyan4973/lz4")
624 (synopsis "Compression algorithm focused on speed")
625 (description "LZ4 is a lossless compression algorithm, providing
626 compression speed at 400 MB/s per core (0.16 Bytes/cycle). It also features an
627 extremely fast decoder, with speed in multiple GB/s per core (0.71 Bytes/cycle).
628 A high compression derivative, called LZ4_HC, is also provided. It trades CPU
629 time for compression ratio.")
630 ;; The libraries (lz4, lz4hc, and xxhash are BSD licenced. The command
631 ;; line interface programs (lz4, fullbench, fuzzer, datagen) are GPL2+.
632 (license (list license:bsd-2 license:gpl2+))))
634 (define-public squashfs-tools
636 (name "squashfs-tools")
640 (uri (string-append "mirror://sourceforge/squashfs/squashfs/"
641 "squashfs" version "/"
642 "squashfs" version ".tar.gz"))
645 "1xpklm0y43nd9i6jw43y2xh5zvlmj9ar2rvknh0bh7kv8c95aq0d"))))
646 (build-system gnu-build-system)
648 '(#:tests? #f ; no check target
654 (string-append "INSTALL_DIR=" %output "/bin"))
656 (modify-phases %standard-phases
659 (chdir "squashfs-tools"))))))
665 (home-page "http://squashfs.sourceforge.net/")
666 (synopsis "Tools to create and extract squashfs filesystems")
668 "Squashfs is a highly compressed read-only filesystem for Linux. It uses
669 zlib to compress files, inodes, and directories. All blocks are packed to
670 minimize the data overhead, and block sizes of between 4K and 1M are supported.
671 It is intended to be used for archival use, for live CDs, and for embedded
672 systems where low overhead is needed. This package allows you to create and
673 extract such filesystems.")
674 (license license:gpl2+)))
682 (uri (string-append "http://zlib.net/pigz/"
683 name "-" version ".tar.gz"))
686 "172hdf26k4zmm7z8md7nl0dph2a7mhf3x7slb9bhfyff6as6g2sf"))))
687 (build-system gnu-build-system)
690 (modify-phases %standard-phases
693 (lambda* (#:key outputs #:allow-other-keys)
694 (let* ((out (assoc-ref outputs "out"))
695 (bin (string-append out "/bin"))
696 (man (string-append out "/share/man/man1")))
697 (install-file "pigz" bin)
698 (symlink "pigz" (string-append bin "/unpigz"))
699 (install-file "pigz.1" man)
701 #:make-flags (list "CC=gcc")
702 #:test-target "tests"))
703 (inputs `(("zlib" ,zlib)))
704 (home-page "http://zlib.net/pigz/")
705 (synopsis "Parallel implementation of gzip")
707 "This package provides a parallel implementation of gzip that exploits
708 multiple processors and multiple cores when compressing data.")
710 ;; Things under zopfli/ are under ASL2.0, but 4 files at the top-level,
711 ;; written by Mark Adler, are under another non-copyleft license.
712 (license license:asl2.0)))
721 "https://github.com/vasi/pixz/releases/download/v" version
722 "/pixz-" version ".tar.xz"))
725 "1s3j7zw6j5zi3fhdxg287ndr3wf6swac7z21mqd1pyiln530gi82"))))
726 (build-system gnu-build-system)
728 `(("pkg-config" ,pkg-config)
729 ("libarchive" ,libarchive)))
730 (home-page "https://github.com/vasi/pixz")
731 (synopsis "Parallel indexing implementation of LZMA")
733 "The existing XZ Utils provide great compression in the .xz file format,
734 but they produce just one big block of compressed data. Pixz instead produces
735 a collection of smaller blocks which makes random access to the original data
736 possible and can compress in parallel. This is especially useful for large
738 (license license:bsd-2)))
740 (define-public brotli
741 (let ((commit "e992cce7a174d6e2b3486616499d26bb0bad6448")
745 (version (string-append "0.1-" revision "."
746 (string-take commit 7)))
750 (url "https://github.com/bagder/libbrotli.git")
753 (file-name (string-append name "-" version ".tar.xz"))
756 "1qxxsasvwbbbh6dl3138y9h3fg0q2v7xdk5jjc690bdg7g1wrj6n"))
757 (modules '((guix build utils)))
759 ;; This is a recursive submodule that is unnecessary for this
760 ;; package, so delete it.
761 '(delete-file-recursively "brotli/terryfy"))))
762 (build-system gnu-build-system)
764 `(("autoconf" ,autoconf)
765 ("automake" ,automake)
766 ("libtool" ,libtool)))
768 `(#:phases (modify-phases %standard-phases
769 (add-after 'unpack 'autogen
772 (zero? (system* "autoreconf" "-vfi")))))))
773 (home-page "https://github.com/bagder/libbrotli/")
774 (synopsis "Implementation of the Brotli compression algorithm")
776 "Brotli is a general-purpose lossless compression algorithm. It is
777 similar in speed to deflate but offers denser compression. This package
778 provides encoder and a decoder libraries: libbrotlienc and libbrotlidec,
779 respectively, based on the reference implementation from Google.")
780 (license license:expat))))
782 (define-public cabextract
789 "http://cabextract.org.uk/cabextract-" version ".tar.gz"))
792 "1ysmmz25fjghq7mxb2anyyvr1ljxqxzi4piwjhk0sdamcnsn3rnf"))))
793 (build-system gnu-build-system)
794 (arguments '(#:configure-flags '("--with-external-libmspack")))
796 `(("pkg-config" ,pkg-config)))
798 `(("libmspack" ,libmspack)))
799 (home-page "http://www.cabextract.org.uk/")
800 (synopsis "Tool to unpack Cabinet archives")
801 (description "Extracts files out of Microsoft Cabinet (.cab) archives")
802 ;; Some source files specify gpl2+, lgpl2+, however COPYING is gpl3.
803 (license license:gpl3+)))
805 (define-public xdelta
812 (uri (string-append "https://github.com/jmacd/xdelta/archive/v"
816 "17g2pbbqy6h20qgdjq7ykib7kg5ajh8fwbsfgyjqg8pwg19wy5bm"))
817 (file-name (string-append name "-" version ".tar.gz"))
819 ;; This file isn't freely distributable and has no effect on building.
820 '(delete-file "xdelta3/draft-korn-vcdiff.txt"))))
821 (build-system gnu-build-system)
823 `(("autoconf" ,autoconf)
824 ("automake" ,automake)))
827 (modify-phases %standard-phases
828 (add-after 'unpack 'enter-build-directory
829 (lambda _ (chdir "xdelta3")))
830 (add-before 'configure 'autoconf
831 (lambda _ (zero? (system* "autoreconf" "-vfi")))))))
832 (home-page "http://xdelta.com")
833 (synopsis "Delta encoder for binary files")
834 (description "xdelta encodes only the differences between two binary files
835 using the VCDIFF algorithm and patch file format described in RFC 3284. It can
836 also be used to apply such patches. xdelta is similar to @command{diff} and
837 @command{patch}, but is not limited to plain text and does not generate
838 human-readable output.")
839 (license license:asl2.0)))
849 "http://ck.kolivas.org/apps/lrzip/lrzip-" version ".tar.bz2"))
852 "01ykxliqw4cavx9f2gawxfa9wf52cjy1qx28cnkrh6i3lfzzcq94"))))
853 (build-system gnu-build-system)
855 `(;; nasm is only required when building for 32-bit x86 platforms
856 ,@(if (string-prefix? "i686" (or (%current-target-system)
865 (home-page "http://ck.kolivas.org/apps/lrzip/")
866 (synopsis "Large file compressor with a very high compression ratio")
867 (description "lrzip is a compression utility that uses long-range
868 redundancy reduction to improve the subsequent compression ratio of
869 larger files. It can then further compress the result with the ZPAQ or
870 LZMA algorithms for maximum compression, or LZO for maximum speed. This
871 choice between size or speed allows for either better compression than
872 even LZMA can provide, or a higher speed than gzip while compressing as
874 (license (list license:gpl3+
875 license:public-domain)))) ; most files in lzma/
877 (define-public snappy
884 "https://github.com/google/snappy/releases/download/"
885 version "/" name "-" version ".tar.gz"))
888 "1wzf8yif5ym2gj52db6v5m1pxnmn258i38x7llk9x346y2nq47ig"))))
889 (build-system gnu-build-system)
890 (home-page "https://github.com/google/snappy")
891 (synopsis "Fast compressor/decompressor")
892 (description "Snappy is a compression/decompression library. It does not
893 aim for maximum compression, or compatibility with any other compression library;
894 instead, it aims for very high speeds and reasonable compression. For instance,
895 compared to the fastest mode of zlib, Snappy is an order of magnitude faster
896 for most inputs, but the resulting compressed files are anywhere from 20% to
898 (license license:asl2.0)))
906 (uri (string-append "mirror://sourceforge/" name "/" name "/"
907 version "/" name "_" version
911 "07rlwbbgszq8i7m8jh3x6j2w2hc9a72dc7fmqawnqkwlwb00mcjy"))
912 (modules '((guix build utils)))
915 ;; Remove non-free source files
916 (for-each delete-file
918 (find-files "CPP/7zip/Compress" "Rar.*")
919 (find-files "CPP/7zip/Crypto" "Rar.*")
920 (find-files "DOC/unRarLicense.txt")
921 (find-files "Utils/file_Codecs_Rar_so.py")))
922 (delete-file-recursively "CPP/7zip/Archive/Rar")
923 (delete-file-recursively "CPP/7zip/Compress/Rar")
925 (patches (search-patches "p7zip-remove-unused-code.patch"))))
926 (build-system gnu-build-system)
929 (list (string-append "DEST_HOME=" (assoc-ref %outputs "out")) "all3")
931 (modify-phases %standard-phases
933 (lambda* (#:key system outputs #:allow-other-keys)
935 (let ((system ,(or (%current-target-system)
938 ((string-prefix? "x86_64" system)
939 "makefile.linux_amd64_asm")
940 ((string-prefix? "i686" system)
941 "makefile.linux_x86_asm_gcc_4.X")
943 "makefile.linux_any_cpu_gcc_4.X")))
944 "makefile.machine"))))
947 (and (zero? (system* "make" "test"))
948 (zero? (system* "make" "test_7z"))
949 (zero? (system* "make" "test_7zr"))))))))
951 (let ((system (or (%current-target-system)
953 `(,@(cond ((string-prefix? "x86_64" system)
955 ((string-prefix? "i686" system)
958 (home-page "http://p7zip.sourceforge.net/")
959 (synopsis "Command-line file archiver with high compression ratio")
960 (description "p7zip is a command-line port of 7-Zip, a file archiver that
961 handles the 7z format which features very high compression ratios.")
962 (license (list license:lgpl2.1+
964 license:public-domain))))