gnu: java-iq80-snappy: Use invoke.
[jackhill/guix/guix.git] / gnu / packages / compression.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
b2859a4f 2;;; Copyright © 2012, 2013, 2014, 2015, 2017 Ludovic Courtès <ludo@gnu.org>
b357faac 3;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
144cc3c4 4;;; Copyright © 2014, 2015, 2018 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>
48623f5b 7;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
77737e03 8;;; Copyright © 2015, 2017, 2018 Leo Famulari <leo@famulari.name>
820dc3f5 9;;; Copyright © 2015 Jeff Mickey <j@codemac.net>
2b8bea03 10;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
23f3cbb8 11;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
3fd4b90d 12;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org>
d5960bf7 13;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
e4c2136d 14;;; Copyright © 2016 David Craven <david@craven.ch>
3c8ba11a 15;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
2b786f67 16;;; Copyright © 2016, 2018 Marius Bakke <mbakke@fastmail.com>
4a78fd46 17;;; Copyright © 2017 Nils Gillmann <ng0@n0.is>
9e6ada8f 18;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
d109b1e8 19;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
ef5c40aa 20;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
b44ecca6 21;;; Copyright © 2017 Petter <petter@mykolab.ch>
9869bb12 22;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
e294c05e 23;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
2ed0ef2f 24;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
a268f085 25;;;
233e7676 26;;; This file is part of GNU Guix.
a268f085 27;;;
233e7676 28;;; GNU Guix is free software; you can redistribute it and/or modify it
a268f085
LC
29;;; under the terms of the GNU General Public License as published by
30;;; the Free Software Foundation; either version 3 of the License, or (at
31;;; your option) any later version.
32;;;
233e7676 33;;; GNU Guix is distributed in the hope that it will be useful, but
a268f085
LC
34;;; WITHOUT ANY WARRANTY; without even the implied warranty of
35;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36;;; GNU General Public License for more details.
37;;;
38;;; You should have received a copy of the GNU General Public License
233e7676 39;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
a268f085 40
1ffa7090 41(define-module (gnu packages compression)
b5b73a82 42 #:use-module ((guix licenses) #:prefix license:)
21b2ec4d 43 #:use-module (guix utils)
a268f085 44 #:use-module (guix packages)
87f5d366 45 #:use-module (guix download)
646898b3 46 #:use-module (guix git-download)
cea83466 47 #:use-module (guix build-system ant)
9e6ada8f 48 #:use-module (guix build-system cmake)
b357faac 49 #:use-module (guix build-system gnu)
73f542c3 50 #:use-module (guix build-system perl)
1ae60db8 51 #:use-module (guix build-system python)
e99dd67a 52 #:use-module (gnu packages)
389eb3fa 53 #:use-module (gnu packages assembly)
69d9792a 54 #:use-module (gnu packages autotools)
23f3cbb8 55 #:use-module (gnu packages backup)
73f542c3 56 #:use-module (gnu packages base)
e294c05e 57 #:use-module (gnu packages boost)
0f03c531 58 #:use-module (gnu packages check)
9e6ada8f 59 #:use-module (gnu packages curl)
ef5c40aa 60 #:use-module (gnu packages file)
cea83466 61 #:use-module (gnu packages java)
9869bb12 62 #:use-module (gnu packages maths)
646898b3 63 #:use-module (gnu packages perl)
d5960bf7 64 #:use-module (gnu packages perl-check)
23f3cbb8 65 #:use-module (gnu packages pkg-config)
1ae60db8 66 #:use-module (gnu packages python)
9e6ada8f 67 #:use-module (gnu packages tls)
82aa2a28 68 #:use-module (gnu packages valgrind)
36df995c 69 #:use-module (ice-9 match)
646898b3 70 #:use-module ((srfi srfi-1) #:select (last)))
a268f085 71
6a92093d
LC
72(define-public zlib
73 (package
74 (name "zlib")
2b8bea03 75 (version "1.2.11")
6a92093d
LC
76 (source
77 (origin
87f5d366 78 (method url-fetch)
a67f97fe
CR
79 (uri (list (string-append "http://zlib.net/zlib-"
80 version ".tar.gz")
b2859a4f
LC
81 (string-append "mirror://sourceforge/libpng/zlib/"
82 version "/zlib-" version ".tar.gz")))
6a92093d
LC
83 (sha256
84 (base32
2b8bea03 85 "18dighcs333gsvajvvgqp8l4cx7h1x7yx9gd5xacnk80spyykrf3"))))
6a92093d
LC
86 (build-system gnu-build-system)
87 (arguments
6cd00453
EF
88 `(#:phases
89 (modify-phases %standard-phases
90 (replace 'configure
91 (lambda* (#:key outputs #:allow-other-keys)
92 ;; Zlib's home-made `configure' fails when passed
93 ;; extra flags like `--enable-fast-install', so we need to
94 ;; invoke it with just what it understand.
95 (let ((out (assoc-ref outputs "out")))
96 ;; 'configure' doesn't understand '--host'.
97 ,@(if (%current-target-system)
98 `((setenv "CHOST" ,(%current-target-system)))
99 '())
144cc3c4
MW
100 (invoke "./configure"
101 (string-append "--prefix=" out))))))))
7f1773ea 102 (home-page "https://zlib.net/")
35b9e423 103 (synopsis "Compression library")
6a92093d
LC
104 (description
105 "zlib is designed to be a free, general-purpose, legally unencumbered --
106that is, not covered by any patents -- lossless data-compression library for
107use on virtually any computer hardware and operating system. The zlib data
35b9e423 108format is itself portable across platforms. Unlike the LZW compression method
6a92093d
LC
109used in Unix compress(1) and in the GIF image format, the compression method
110currently used in zlib essentially never expands the data. (LZW can double or
111triple the file size in extreme cases.) zlib's memory footprint is also
112independent of the input data and can be reduced, if necessary, at some cost
113in compression.")
4a44e743 114 (license license:zlib)))
6a92093d 115
8298df96
MB
116(define-public minizip
117 (package
118 (name "minizip")
119 (version (package-version zlib))
120 (source (package-source zlib))
121 (build-system gnu-build-system)
122 (arguments
123 `(#:phases
124 (modify-phases %standard-phases
125 (add-after 'unpack 'enter-source
126 (lambda _ (chdir "contrib/minizip") #t))
d10092b8 127 (add-after 'enter-source 'autoreconf
8298df96 128 (lambda _
fbc3e0c4 129 (invoke "autoreconf" "-vif"))))))
8298df96
MB
130 (native-inputs
131 `(("autoconf" ,autoconf)
132 ("automake" ,automake)
133 ("libtool" ,libtool)))
134 (propagated-inputs `(("zlib" ,zlib)))
135 (home-page (package-home-page zlib))
136 (synopsis "Zip Compression library")
137 (description
138 "Minizip is a minimalistic library that supports compressing,
139extracting and viewing ZIP archives. This version is extracted from
140the @code{zlib} source.")
141 (license (package-license zlib))))
142
ee97be9f
RW
143(define-public fastjar
144 (package
145 (name "fastjar")
146 (version "0.98")
147 (source (origin
148 (method url-fetch)
149 (uri (string-append "mirror://savannah/fastjar/fastjar-"
150 version ".tar.gz"))
151 (sha256
152 (base32
153 "0iginbz2m15hcsa3x4y7v3mhk54gr1r7m3ghx0pg4n46vv2snmpi"))))
154 (build-system gnu-build-system)
155 (inputs `(("zlib" ,zlib)))
340978d7 156 (home-page "https://savannah.nongnu.org/projects/fastjar")
ee97be9f
RW
157 (synopsis "Replacement for Sun's 'jar' utility")
158 (description
159 "FastJar is an attempt to create a much faster replacement for Sun's 'jar'
160utility. Instead of being written in Java, FastJar is written in C.")
161 (license license:gpl2+)))
162
58593975
RW
163(define-public libtar
164 (package
165 (name "libtar")
89d80159 166 (version "1.2.20")
58593975
RW
167 (source (origin
168 (method url-fetch)
89d80159
EF
169 (uri (list
170 (string-append
171 "ftp://ftp.feep.net/pub/software/libtar/libtar-"
172 version ".tar.gz")
173 (string-append
174 "mirror://debian/pool/main/libt/libtar/libtar_"
175 version ".orig.tar.gz")))
58593975
RW
176 (sha256
177 (base32
e99dd67a
EF
178 "02cihzl77ia0dcz7z2cga2412vyhhs5pa2355q4wpwbyga2lrwjh"))
179 (patches (search-patches "libtar-CVE-2013-4420.patch"))))
58593975 180 (build-system gnu-build-system)
89d80159
EF
181 (arguments
182 `(#:tests? #f ;no "check" target
183 #:phases
184 (modify-phases %standard-phases
185 (add-after 'unpack 'autoconf
c65956f3 186 (lambda _ (invoke "sh" "autoreconf" "-vfi"))))))
89d80159
EF
187 (native-inputs
188 `(("autoconf" ,autoconf)
189 ("automake" ,automake)
190 ("libtool" ,libtool)))
191 (inputs
192 `(("zlib" ,zlib)))
58593975
RW
193 (synopsis "C library for manipulating POSIX tar files")
194 (description
195 "libtar is a C library for manipulating POSIX tar files. It handles
196adding and extracting files to/from a tar archive.")
89d80159 197 (home-page "https://repo.or.cz/libtar.git")
58593975
RW
198 (license license:bsd-3)))
199
a268f085
LC
200(define-public gzip
201 (package
202 (name "gzip")
49b080de 203 (version "1.9")
a268f085 204 (source (origin
87f5d366 205 (method url-fetch)
0db342a5 206 (uri (string-append "mirror://gnu/gzip/gzip-"
28181faf 207 version ".tar.xz"))
a268f085
LC
208 (sha256
209 (base32
49b080de 210 "16h8g4acy7fgfxcjacr3wijjsnixwsfd2jhz3zwdi2qrzi262l5f"))))
a268f085 211 (build-system gnu-build-system)
f50d2669 212 (synopsis "General file (de)compression (using lzw)")
a268f085
LC
213 (arguments
214 ;; FIXME: The test suite wants `less', and optionally Perl.
48623f5b
RW
215 '(#:tests? #f
216 #:phases
217 (modify-phases %standard-phases
218 (add-after 'unpack 'use-absolute-name-of-gzip
219 (lambda* (#:key outputs #:allow-other-keys)
220 (substitute* "gunzip.in"
221 (("exec gzip")
222 (string-append "exec " (assoc-ref outputs "out")
223 "/bin/gzip")))
224 #t)))))
a268f085 225 (description
79c311b8
LC
226 "GNU Gzip provides data compression and decompression utilities; the
227typical extension is \".gz\". Unlike the \"zip\" format, it compresses a single
228file; as a result, it is often used in conjunction with \"tar\", resulting in
229\".tar.gz\" or \".tgz\", etc.")
4a44e743 230 (license license:gpl3+)
6fd52309 231 (home-page "https://www.gnu.org/software/gzip/")))
a268f085
LC
232
233(define-public bzip2
03bc86b8
CB
234 (package
235 (name "bzip2")
236 (version "1.0.6")
237 (source (origin
238 (method url-fetch)
239 (uri (string-append "http://www.bzip.org/" version "/bzip2-"
240 version ".tar.gz"))
241 (sha256
242 (base32
243 "1kfrc7f0ja9fdn6j1y6yir6li818npy6217hvr3wzmnmzhs8z152"))))
244 (build-system gnu-build-system)
245 (arguments
246 `(#:modules ((guix build gnu-build-system)
247 (guix build utils)
248 (srfi srfi-1))
249 #:phases
250 (modify-phases %standard-phases
251 (replace 'configure
252 (lambda* (#:key target #:allow-other-keys)
3158bc04
MW
253 (when ,(%current-target-system)
254 ;; Cross-compilation: use the cross tools.
255 (substitute* (find-files "." "Makefile")
256 (("CC=.*$")
257 (string-append "CC = " target "-gcc\n"))
258 (("AR=.*$")
259 (string-append "AR = " target "-ar\n"))
260 (("RANLIB=.*$")
261 (string-append "RANLIB = " target "-ranlib\n"))
262 (("^all:(.*)test" _ prerequisites)
263 ;; Remove 'all' -> 'test' dependency.
264 (string-append "all:" prerequisites "\n"))))
265 #t))
03bc86b8
CB
266 (add-before 'build 'build-shared-lib
267 (lambda* (#:key inputs #:allow-other-keys)
268 (patch-makefile-SHELL "Makefile-libbz2_so")
3158bc04 269 (invoke "make" "-f" "Makefile-libbz2_so")))
03bc86b8
CB
270 (add-after 'install 'install-shared-lib
271 (lambda* (#:key outputs #:allow-other-keys)
2b786f67
MB
272 ;; The Makefile above does not have an 'install' target, nor does
273 ;; it create all the (un)versioned symlinks, so we handle it here.
03bc86b8 274 (let* ((out (assoc-ref outputs "out"))
2b786f67
MB
275 (libdir (string-append out "/lib"))
276 ;; Find the actual library (e.g. "libbz2.so.1.0.6").
277 (lib (string-drop
278 (car (find-files
279 "."
280 (lambda (file stat)
281 (and (string-prefix? "./libbz2.so" file)
282 (eq? 'regular (stat:type stat))))))
283 2))
284 (soversion (string-drop lib (string-length "libbz2.so."))))
285 (install-file lib libdir)
286 (with-directory-excursion libdir
287 ;; Create symlinks libbz2.so.1 -> libbz2.so.1.0, etc.
288 (let loop ((base "libbz2.so")
289 (numbers (string-split soversion #\.)))
290 (unless (null? numbers)
291 (let ((so-file (string-append base "." (car numbers))))
292 (symlink so-file base)
293 (loop so-file (cdr numbers))))))
294 #t)))
e7ee50f2
CB
295 (add-after 'install-shared-lib 'patch-scripts
296 (lambda* (#:key outputs inputs #:allow-other-keys)
297 (let* ((out (assoc-ref outputs "out")))
298 (substitute* (string-append out "/bin/bzdiff")
299 (("/bin/rm") "rm")))
03bc86b8 300 #t)))
ab4fab19 301
03bc86b8
CB
302 #:make-flags (list (string-append "PREFIX="
303 (assoc-ref %outputs "out")))
ab4fab19 304
03bc86b8
CB
305 ;; Don't attempt to run the tests when cross-compiling.
306 ,@(if (%current-target-system)
307 '(#:tests? #f)
308 '())))
309 (synopsis "High-quality data compression program")
310 (description
311 "bzip2 is a freely available, patent free (see below), high-quality data
a268f085
LC
312compressor. It typically compresses files to within 10% to 15% of the best
313available techniques (the PPM family of statistical compressors), whilst
314being around twice as fast at compression and six times faster at
315decompression.")
03bc86b8
CB
316 (license (license:non-copyleft "file://LICENSE"
317 "See LICENSE in the distribution."))
318 (home-page "http://www.bzip.org/")))
a268f085 319
669b7b83
RW
320(define-public lbzip2
321 (package
322 (name "lbzip2")
323 (version "2.5")
324 (source (origin
325 (method url-fetch)
326 (uri (string-append "http://archive.lbzip2.org/lbzip2-"
327 version ".tar.gz"))
328 (sha256
329 (base32
330 "1sahaqc5bw4i0iyri05syfza4ncf5cml89an033fspn97klmxis6"))))
331 (build-system gnu-build-system)
332 (synopsis "Parallel bzip2 compression utility")
333 (description
334 "lbzip2 is a multi-threaded compression utility with support for the
335bzip2 compressed file format. lbzip2 can process standard bz2 files in
336parallel. It uses POSIX threading model (pthreads), which allows it to take
337full advantage of symmetric multiprocessing (SMP) systems. It has been proven
338to scale linearly, even to over one hundred processor cores. lbzip2 is fully
339compatible with bzip2 – both at file format and command line level.")
340 (home-page "http://www.lbzip2.org/")
341 (license license:gpl3+)))
342
5d47eab0
EF
343(define-public pbzip2
344 (package
345 (name "pbzip2")
bf867709 346 (version "1.1.13")
5d47eab0
EF
347 (source (origin
348 (method url-fetch)
21b2ec4d
EF
349 (uri (string-append "https://launchpad.net/pbzip2/"
350 (version-major+minor version) "/" version
351 "/+download/" name "-" version ".tar.gz"))
5d47eab0
EF
352 (sha256
353 (base32
bf867709 354 "1rnvgcdixjzbrmcr1nv9b6ccrjfrhryaj7jwz28yxxv6lam3xlcg"))))
5d47eab0
EF
355 (build-system gnu-build-system)
356 (inputs
b3546174 357 `(("bzip2" ,bzip2)))
5d47eab0 358 (arguments
bf867709 359 `(#:tests? #f ; no tests
5d47eab0 360 #:phases (modify-phases %standard-phases
bf867709 361 (delete 'configure)) ; no configure script
21b2ec4d 362 #:make-flags (list (string-append "PREFIX=" %output))))
5d47eab0
EF
363 (home-page "http://compression.ca/pbzip2/")
364 (synopsis "Parallel bzip2 implementation")
365 (description
366 "Pbzip2 is a parallel implementation of the bzip2 block-sorting file
367compressor that uses pthreads and achieves near-linear speedup on SMP machines.
21b2ec4d 368The output of this version is fully compatible with bzip2 v1.0.2 (i.e. anything
5d47eab0
EF
369compressed with pbzip2 can be decompressed with bzip2).")
370 (license (license:non-copyleft "file://COPYING"
21b2ec4d 371 "See COPYING in the distribution."))))
5d47eab0 372
a268f085
LC
373(define-public xz
374 (package
375 (name "xz")
2738dd99 376 (version "5.2.3")
a268f085 377 (source (origin
87f5d366 378 (method url-fetch)
52d76b64
LC
379 (uri (list (string-append "http://tukaani.org/xz/xz-" version
380 ".tar.gz")
381 (string-append "http://multiprecision.org/guix/xz-"
382 version ".tar.gz")))
a268f085
LC
383 (sha256
384 (base32
2738dd99 385 "1jr8pxnz55ifc8cvp3ivgl79ph9iik5aypsc9cma228aglsqp4ki"))))
a268f085 386 (build-system gnu-build-system)
35b9e423 387 (synopsis "General-purpose data compression")
a268f085
LC
388 (description
389 "XZ Utils is free general-purpose data compression software with high
390compression ratio. XZ Utils were written for POSIX-like systems, but also
391work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils.
392
393The core of the XZ Utils compression code is based on LZMA SDK, but it has
394been modified quite a lot to be suitable for XZ Utils. The primary
395compression algorithm is currently LZMA2, which is used inside the .xz
396container format. With typical files, XZ Utils create 30 % smaller output
397than gzip and 15 % smaller output than bzip2.")
38bbd61d 398 (license (list license:gpl2+ license:lgpl2.1+)) ; bits of both
58891850 399 (home-page "https://tukaani.org/xz/")))
c6eac761
LC
400
401(define-public lzo
402 (package
403 (name "lzo")
7276eca4 404 (version "2.10")
c6eac761
LC
405 (source
406 (origin
407 (method url-fetch)
408 (uri (string-append "http://www.oberhumer.com/opensource/lzo/download/lzo-"
409 version ".tar.gz"))
410 (sha256
411 (base32
7276eca4 412 "0wm04519pd3g8hqpjqhfr72q8qmbiwqaxcs3cndny9h86aa95y60"))))
c6eac761 413 (build-system gnu-build-system)
165fd9d5 414 (arguments '(#:configure-flags '("--enable-shared")))
c6eac761
LC
415 (home-page "http://www.oberhumer.com/opensource/lzo")
416 (synopsis
e881752c 417 "Data compression library suitable for real-time data de-/compression")
c6eac761
LC
418 (description
419 "LZO is a data compression library which is suitable for data
420de-/compression in real-time. This means it favours speed over
421compression ratio.
422
423LZO is written in ANSI C. Both the source code and the compressed data
424format are designed to be portable across platforms.")
4a44e743 425 (license license:gpl2+)))
0f323dad 426
1a0a5509 427(define-public python-lzo
428 (package
429 (name "python-lzo")
430 (version "1.11")
431 (source
432 (origin
433 (method url-fetch)
434 (uri (pypi-uri "python-lzo" version))
435 (sha256
436 (base32
437 "11p3ifg14p086byhhin6azx5svlkg8dzw2b5abixik97xd6fm81q"))))
438 (build-system python-build-system)
439 (arguments
440 `(#:test-target "check"
441 #:phases
442 (modify-phases %standard-phases
443 (add-after 'unpack 'patch-setuppy
444 (lambda _
445 (substitute* "setup.py"
446 (("include_dirs.append\\(.*\\)")
447 (string-append "include_dirs.append('"
448 (assoc-ref %build-inputs "lzo")
449 "/include/lzo"
450 "')")))
451 #t)))))
452 (inputs
453 `(("lzo" ,lzo)))
454 (home-page "https://github.com/jd-boyd/python-lzo")
455 (synopsis "Python bindings for the LZO data compression library")
456 (description
457 "Python-LZO provides Python bindings for LZO, i.e. you can access
458the LZO library from your Python scripts thereby compressing ordinary
459Python strings.")
460 (license license:gpl2+)))
461
462(define-public python2-lzo
463 (package-with-python2 python-lzo))
464
a9f48ff0
EB
465(define-public lzop
466 (package
467 (name "lzop")
89d159fe 468 (version "1.04")
a9f48ff0
EB
469 (source
470 (origin
471 (method url-fetch)
472 (uri (string-append "http://www.lzop.org/download/lzop-"
473 version ".tar.gz"))
474 (sha256
475 (base32
89d159fe 476 "0h9gb8q7y54m9mvy3jvsmxf21yx8fc3ylzh418hgbbv0i8mbcwky"))))
a9f48ff0
EB
477 (build-system gnu-build-system)
478 (inputs `(("lzo" ,lzo)))
6f465a51 479 (home-page "https://www.lzop.org/")
a9f48ff0
EB
480 (synopsis "Compress or expand files")
481 (description
482 "Lzop is a file compressor which is very similar to gzip. Lzop uses the
483LZO data compression library for compression services, and its main advantages
484over gzip are much higher compression and decompression speed (at the cost of
485some compression ratio).")
486 (license license:gpl2+)))
487
0f323dad
LC
488(define-public lzip
489 (package
490 (name "lzip")
5ecc917d 491 (version "1.20")
0f323dad
LC
492 (source (origin
493 (method url-fetch)
494 (uri (string-append "mirror://savannah/lzip/lzip-"
495 version ".tar.gz"))
496 (sha256
497 (base32
5ecc917d 498 "0319q59kb8g324wnj7xzbr7vvlx5bcs13lr34j0zb3kqlyjq2fy9"))))
0f323dad 499 (build-system gnu-build-system)
340978d7 500 (home-page "https://www.nongnu.org/lzip/lzip.html")
0f323dad
LC
501 (synopsis "Lossless data compressor based on the LZMA algorithm")
502 (description
503 "Lzip is a lossless data compressor with a user interface similar to the
504one of gzip or bzip2. Lzip decompresses almost as fast as gzip and compresses
0963e3e4 505more than bzip2, which makes it well-suited for software distribution and data
0f323dad
LC
506archiving. Lzip is a clean implementation of the LZMA algorithm.")
507 (license license:gpl3+)))
b357faac 508
9d9fc399
TGR
509(define-public lziprecover
510 (package
511 (name "lziprecover")
910992e4 512 (version "1.20")
9d9fc399
TGR
513 (source (origin
514 (method url-fetch)
515 (uri (string-append "mirror://savannah/lzip/" name "/"
516 name "-" version ".tar.gz"))
517 (sha256
518 (base32
910992e4 519 "0fpnmdxayvd1ff0rk9606dvr431ji6b1v71km4ww244rih1rmmzz"))))
9d9fc399 520 (build-system gnu-build-system)
340978d7 521 (home-page "https://www.nongnu.org/lzip/lziprecover.html")
9d9fc399
TGR
522 (synopsis "Recover and decompress data from damaged lzip files")
523 (description
524 "Lziprecover is a data recovery tool and decompressor for files in the lzip
525compressed data format (.lz). It can test the integrity of lzip files, extract
526data from damaged ones, and repair most files with small errors (up to one
527single-byte error per member) entirely.
528
529Lziprecover is not a replacement for regular backups, but a last line of defence
530when even the backups are corrupt. It can recover files by merging the good
531parts of two or more damaged copies, such as can be easily produced by running
532@command{ddrescue} on a failing device.
533
534This package also includes @command{unzcrash}, a tool to test the robustness of
535decompressors when faced with corrupted input.")
536 (license (list license:bsd-2 ; arg_parser.{cc,h}
537 license:gpl2+)))) ; everything else
538
b357faac
AE
539(define-public sharutils
540 (package
541 (name "sharutils")
9a59ce24 542 (version "4.15.2")
b357faac
AE
543 (source
544 (origin
545 (method url-fetch)
546 (uri (string-append "mirror://gnu/sharutils/sharutils-"
547 version ".tar.xz"))
548 (sha256
549 (base32
9a59ce24 550 "16isapn8f39lnffc3dp4dan05b7x6mnc76v6q5nn8ysxvvvwy19b"))))
b357faac
AE
551 (build-system gnu-build-system)
552 (inputs
553 `(("which" ,which)))
554 (arguments
555 `(#:phases
dc1d3cde
KK
556 (modify-phases %standard-phases
557 (add-after 'patch-source-shebangs 'unpatch-source-shebang
558 ;; revert the patch-shebang phase on a script which is
559 ;; in fact test data
560 (lambda _
561 (substitute* "tests/shar-1.ok"
562 (((which "sh")) "/bin/sh"))
563 #t)))))
6fd52309 564 (home-page "https://www.gnu.org/software/sharutils/")
b357faac
AE
565 (synopsis "Archives in shell scripts, uuencode/uudecode")
566 (description
79c311b8
LC
567 "GNU sharutils is a package for creating and manipulating shell
568archives that can be readily emailed. A shell archive is a file that can be
e881752c 569processed by a Bourne-type shell to unpack the original collection of files.
79c311b8 570This package is mostly for compatibility and historical interest.")
b357faac 571 (license license:gpl3+)))
28469ab0 572
646898b3
RW
573(define-public sfarklib
574 (package
575 (name "sfarklib")
979f9e8a 576 (version "2.24")
646898b3 577 (source (origin
979f9e8a
RW
578 (method url-fetch)
579 (uri (string-append "https://github.com/raboof/sfArkLib/archive/"
580 version ".tar.gz"))
581 (file-name (string-append name "-" version ".tar.gz"))
646898b3
RW
582 (sha256
583 (base32
979f9e8a 584 "0bzs2d98rk1xw9qwpnc7gmlbxwmwc3dg1rpn310afy9pq1k9clzi"))))
646898b3
RW
585 (build-system gnu-build-system)
586 (arguments
587 `(#:tests? #f ;no "check" target
588 #:phases
589 (modify-phases %standard-phases
590 (replace 'configure
591 (lambda* (#:key outputs #:allow-other-keys)
592 (substitute* "Makefile"
593 (("/usr/local") (assoc-ref outputs "out")))
594 #t)))))
595 (inputs
596 `(("zlib" ,zlib)))
597 (home-page "https://github.com/raboof/sfArkLib")
598 (synopsis "Library for SoundFont decompression")
599 (description
600 "SfArkLib is a C++ library for decompressing SoundFont files compressed
601with the sfArk algorithm.")
602 (license license:gpl3+)))
603
b5ad1659 604(define-public sfarkxtc
698bd297 605 (let ((commit "b5e0a2ba3921f019d74d4b92bd31c36dd19d2cf1"))
b5ad1659
RW
606 (package
607 (name "sfarkxtc")
698bd297 608 (version (string-take commit 10))
b5ad1659
RW
609 (source (origin
610 ;; There are no release tarballs, so we just fetch the latest
611 ;; commit at this time.
612 (method git-fetch)
613 (uri (git-reference
614 (url "https://github.com/raboof/sfarkxtc.git")
698bd297 615 (commit commit)))
eafe96ea 616 (file-name (git-file-name name version))
b5ad1659
RW
617 (sha256
618 (base32
619 "0f5x6i46qfl6ry21s7g2p4sd4b2r1g4fb03yqi2vv4kq3saryhvj"))))
620 (build-system gnu-build-system)
621 (arguments
622 `(#:tests? #f ;no "check" target
623 #:phases
624 (modify-phases %standard-phases
625 (replace 'configure
626 (lambda* (#:key outputs #:allow-other-keys)
627 (substitute* "Makefile"
628 (("/usr/local") (assoc-ref outputs "out")))
629 #t)))))
630 (inputs
631 `(("zlib" ,zlib)
632 ("sfarklib" ,sfarklib)))
633 (home-page "https://github.com/raboof/sfarkxtc")
634 (synopsis "Basic sfArk decompressor")
635 (description "SfArk extractor converts SoundFonts in the compressed legacy
636sfArk file format to the uncompressed sf2 format.")
698bd297 637 (license license:gpl3+))))
b5ad1659 638
27f76fe6
TUBK
639(define-public libmspack
640 (package
641 (name "libmspack")
9fa0c0e6 642 (version "0.6")
27f76fe6
TUBK
643 (source
644 (origin
645 (method url-fetch)
646 (uri (string-append "http://www.cabextract.org.uk/libmspack/libmspack-"
647 version "alpha.tar.gz"))
648 (sha256
9fa0c0e6 649 (base32 "08gr2pcinas6bdqz3k0286g5cnksmcx813skmdwyca6bmj1fxnqy"))))
27f76fe6
TUBK
650 (build-system gnu-build-system)
651 (home-page "http://www.cabextract.org.uk/libmspack/")
652 (synopsis "Compression tools for some formats used by Microsoft")
653 (description
654 "The purpose of libmspack is to provide both compression and
655decompression of some loosely related file formats used by Microsoft.")
656 (license license:lgpl2.1+)))
73f542c3
EB
657
658(define-public perl-compress-raw-bzip2
659 (package
660 (name "perl-compress-raw-bzip2")
c0b7b797 661 (version "2.074")
73f542c3
EB
662 (source
663 (origin
664 (method url-fetch)
665 (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/"
666 "Compress-Raw-Bzip2-" version ".tar.gz"))
667 (sha256
668 (base32
c0b7b797 669 "0b5jwqf15zr787acnx8sfyy2zavdd7gfkd98n1dgy8fs6r8yb8a4"))))
73f542c3
EB
670 (build-system perl-build-system)
671 ;; TODO: Use our bzip2 package.
672 (home-page "http://search.cpan.org/dist/Compress-Raw-Bzip2")
673 (synopsis "Low-level interface to bzip2 compression library")
674 (description "This module provides a Perl interface to the bzip2
675compression library.")
2f3108ad 676 (license license:perl-license)))
8e18514a
EB
677
678(define-public perl-compress-raw-zlib
679 (package
680 (name "perl-compress-raw-zlib")
79425167 681 (version "2.076")
8e18514a
EB
682 (source
683 (origin
684 (method url-fetch)
685 (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/"
686 "Compress-Raw-Zlib-" version ".tar.gz"))
687 (sha256
688 (base32
79425167 689 "1al2h0i6mspldmlf5c09fy5a4j8swsxd31v6zi8zx9iyqk1lw7in"))))
8e18514a
EB
690 (build-system perl-build-system)
691 (inputs
692 `(("zlib" ,zlib)))
693 (arguments
694 `(#:phases (modify-phases %standard-phases
695 (add-before
40b084a3 696 'configure 'configure-zlib
8e18514a
EB
697 (lambda* (#:key inputs #:allow-other-keys)
698 (call-with-output-file "config.in"
699 (lambda (port)
700 (format port "
701BUILD_ZLIB = False
702INCLUDE = ~a/include
703LIB = ~:*~a/lib
704OLD_ZLIB = False
705GZIP_OS_CODE = AUTO_DETECT"
706 (assoc-ref inputs "zlib")))))))))
707 (home-page "http://search.cpan.org/dist/Compress-Raw-Zlib")
708 (synopsis "Low-level interface to zlib compression library")
709 (description "This module provides a Perl interface to the zlib
710compression library.")
2f3108ad 711 (license license:perl-license)))
8aaafd34
EB
712
713(define-public perl-io-compress
714 (package
715 (name "perl-io-compress")
c70b50ef 716 (version "2.074")
8aaafd34
EB
717 (source
718 (origin
719 (method url-fetch)
720 (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/"
721 "IO-Compress-" version ".tar.gz"))
722 (sha256
723 (base32
c70b50ef 724 "1wlpy2026djfmq0bjync531yq6s695jf7bcnpvjphrasi776igdl"))))
8aaafd34
EB
725 (build-system perl-build-system)
726 (propagated-inputs
c70b50ef
EF
727 `(("perl-compress-raw-zlib" ,perl-compress-raw-zlib) ; >=2.074
728 ("perl-compress-raw-bzip2" ,perl-compress-raw-bzip2))) ; >=2.074
8aaafd34
EB
729 (home-page "http://search.cpan.org/dist/IO-Compress")
730 (synopsis "IO Interface to compressed files/buffers")
731 (description "IO-Compress provides a Perl interface to allow reading and
732writing of compressed data created with the zlib and bzip2 libraries.")
2f3108ad 733 (license license:perl-license)))
82aa2a28
LF
734
735(define-public lz4
736 (package
737 (name "lz4")
528d1292 738 (version "1.8.1.2")
82aa2a28
LF
739 (source
740 (origin
741 (method url-fetch)
b496bfea 742 (uri (string-append "https://github.com/lz4/lz4/archive/"
fc89cb69 743 "v" version ".tar.gz"))
82aa2a28 744 (sha256
b496bfea 745 (base32
528d1292 746 "1y93h6dyi3026gvpzdv310ldcylnnhwf32n75mdjf8x9fvkskwqj"))
82aa2a28
LF
747 (file-name (string-append name "-" version ".tar.gz"))))
748 (build-system gnu-build-system)
fc89cb69 749 (native-inputs `(("valgrind" ,valgrind))) ; for tests
82aa2a28
LF
750 (arguments
751 `(#:test-target "test"
82aa2a28 752 #:make-flags (list "CC=gcc"
0dd6d21a 753 (string-append "prefix=" (assoc-ref %outputs "out")))
82aa2a28 754 #:phases (modify-phases %standard-phases
fc89cb69 755 (delete 'configure)))) ; no configure script
00d9124d 756 (home-page "http://www.lz4.org")
82aa2a28
LF
757 (synopsis "Compression algorithm focused on speed")
758 (description "LZ4 is a lossless compression algorithm, providing
759compression speed at 400 MB/s per core (0.16 Bytes/cycle). It also features an
760extremely fast decoder, with speed in multiple GB/s per core (0.71 Bytes/cycle).
761A high compression derivative, called LZ4_HC, is also provided. It trades CPU
762time for compression ratio.")
b7585ca3 763 ;; The libraries (lz4, lz4hc, and xxhash) are BSD licenced. The command
82aa2a28
LF
764 ;; line interface programs (lz4, fullbench, fuzzer, datagen) are GPL2+.
765 (license (list license:bsd-2 license:gpl2+))))
dd8d6d65 766
1ae60db8 767(define-public python-lz4
768 (package
769 (name "python-lz4")
e9f6a935 770 (version "0.10.1")
1ae60db8 771 (source
772 (origin
773 (method url-fetch)
774 (uri (pypi-uri "lz4" version))
775 (sha256
776 (base32
e9f6a935 777 "0ghv1xbaq693kgww1x9c22bplz479ls9szjsaa4ig778ls834hm0"))))
1ae60db8 778 (build-system python-build-system)
779 (native-inputs
e9f6a935
TGR
780 `(("python-nose" ,python-nose)
781 ("python-setuptools-scm" ,python-setuptools-scm)))
1ae60db8 782 (home-page "https://github.com/python-lz4/python-lz4")
b316caaa 783 (synopsis "LZ4 bindings for Python")
1ae60db8 784 (description
785 "This package provides python bindings for the lz4 compression library
786by Yann Collet. The project contains bindings for the LZ4 block format and
787the LZ4 frame format.")
788 (license license:bsd-3)))
789
790(define-public python2-lz4
791 (package-with-python2 python-lz4))
792
e7c76b06
RW
793(define-public python-lzstring
794 (package
795 (name "python-lzstring")
796 (version "1.0.3")
797 (source
798 (origin
799 (method url-fetch)
800 (uri (pypi-uri "lzstring" version))
801 (sha256
802 (base32
803 "1d3ck454y41mii0gcjabpmp2skb7n0f9zk232gycqdv8z2jxakfm"))))
804 (build-system python-build-system)
805 (propagated-inputs
806 `(("python-future" ,python-future)))
807 (home-page "https://github.com/gkovacs/lz-string-python")
808 (synopsis "String compression")
809 (description "Lz-string is a string compressor library for Python.")
810 (license license:expat)))
811
812(define-public python2-lzstring
813 (package-with-python2 python-lzstring))
814
dd8d6d65
SB
815(define-public squashfs-tools
816 (package
817 (name "squashfs-tools")
818 (version "4.3")
819 (source (origin
820 (method url-fetch)
de67e922
LF
821 (uri (string-append "mirror://sourceforge/squashfs/squashfs/"
822 "squashfs" version "/"
dd8d6d65
SB
823 "squashfs" version ".tar.gz"))
824 (sha256
825 (base32
826 "1xpklm0y43nd9i6jw43y2xh5zvlmj9ar2rvknh0bh7kv8c95aq0d"))))
827 (build-system gnu-build-system)
828 (arguments
829 '(#:tests? #f ; no check target
830 #:make-flags
831 (list "CC=gcc"
832 "XZ_SUPPORT=1"
833 "LZO_SUPPORT=1"
834 "LZ4_SUPPORT=1"
835 (string-append "INSTALL_DIR=" %output "/bin"))
836 #:phases
837 (modify-phases %standard-phases
838 (replace 'configure
839 (lambda _
840 (chdir "squashfs-tools"))))))
841 (inputs
842 `(("lz4" ,lz4)
843 ("lzo" ,lzo)
844 ("xz" ,xz)
845 ("zlib" ,zlib)))
846 (home-page "http://squashfs.sourceforge.net/")
8f65585b 847 (synopsis "Tools to create and extract squashfs file systems")
dd8d6d65 848 (description
8f65585b 849 "Squashfs is a highly compressed read-only file system for Linux. It uses
dd8d6d65
SB
850zlib to compress files, inodes, and directories. All blocks are packed to
851minimize the data overhead, and block sizes of between 4K and 1M are supported.
852It is intended to be used for archival use, for live CDs, and for embedded
853systems where low overhead is needed. This package allows you to create and
8f65585b 854extract such file systems.")
dd8d6d65 855 (license license:gpl2+)))
820dc3f5
JM
856
857(define-public pigz
858 (package
859 (name "pigz")
9dae73c3 860 (version "2.4")
820dc3f5
JM
861 (source (origin
862 (method url-fetch)
863 (uri (string-append "http://zlib.net/pigz/"
864 name "-" version ".tar.gz"))
865 (sha256
866 (base32
9dae73c3 867 "0wsgw5vwl23jrnpsvd8v3xcp5k4waw5mk0164fynjhkv58i1dy54"))))
820dc3f5
JM
868 (build-system gnu-build-system)
869 (arguments
870 `(#:phases
871 (modify-phases %standard-phases
872 (delete 'configure)
873 (replace 'install
874 (lambda* (#:key outputs #:allow-other-keys)
875 (let* ((out (assoc-ref outputs "out"))
876 (bin (string-append out "/bin"))
877 (man (string-append out "/share/man/man1")))
878 (install-file "pigz" bin)
879 (symlink "pigz" (string-append bin "/unpigz"))
880 (install-file "pigz.1" man)
881 #t))))
882 #:make-flags (list "CC=gcc")
883 #:test-target "tests"))
884 (inputs `(("zlib" ,zlib)))
7f1773ea 885 (home-page "https://zlib.net/pigz/")
820dc3f5
JM
886 (synopsis "Parallel implementation of gzip")
887 (description
888 "This package provides a parallel implementation of gzip that exploits
889multiple processors and multiple cores when compressing data.")
890
891 ;; Things under zopfli/ are under ASL2.0, but 4 files at the top-level,
892 ;; written by Mark Adler, are under another non-copyleft license.
893 (license license:asl2.0)))
23f3cbb8
BW
894
895(define-public pixz
896 (package
897 (name "pixz")
898 (version "1.0.6")
899 (source (origin
900 (method url-fetch)
901 (uri (string-append
902 "https://github.com/vasi/pixz/releases/download/v" version
903 "/pixz-" version ".tar.xz"))
904 (sha256
905 (base32
906 "1s3j7zw6j5zi3fhdxg287ndr3wf6swac7z21mqd1pyiln530gi82"))))
907 (build-system gnu-build-system)
908 (native-inputs
909 `(("pkg-config" ,pkg-config)
910 ("libarchive" ,libarchive)))
911 (home-page "https://github.com/vasi/pixz")
912 (synopsis "Parallel indexing implementation of LZMA")
913 (description
914 "The existing XZ Utils provide great compression in the .xz file format,
915but they produce just one big block of compressed data. Pixz instead produces
916a collection of smaller blocks which makes random access to the original data
917possible and can compress in parallel. This is especially useful for large
918tarballs.")
919 (license license:bsd-2)))
69d9792a
EB
920
921(define-public brotli
922 (let ((commit "e992cce7a174d6e2b3486616499d26bb0bad6448")
923 (revision "1"))
924 (package
925 (name "brotli")
926 (version (string-append "0.1-" revision "."
927 (string-take commit 7)))
928 (source (origin
929 (method git-fetch)
930 (uri (git-reference
931 (url "https://github.com/bagder/libbrotli.git")
932 (commit commit)
933 (recursive? #t)))
934 (file-name (string-append name "-" version ".tar.xz"))
935 (sha256
936 (base32
937 "1qxxsasvwbbbh6dl3138y9h3fg0q2v7xdk5jjc690bdg7g1wrj6n"))
938 (modules '((guix build utils)))
6cbee49d
MW
939 (snippet '(begin
940 ;; This is a recursive submodule that is
941 ;; unnecessary for this package, so delete it.
942 (delete-file-recursively "brotli/terryfy")
943 #t))))
69d9792a
EB
944 (build-system gnu-build-system)
945 (native-inputs
946 `(("autoconf" ,autoconf)
947 ("automake" ,automake)
948 ("libtool" ,libtool)))
949 (arguments
950 `(#:phases (modify-phases %standard-phases
951 (add-after 'unpack 'autogen
952 (lambda _
953 (mkdir "m4")
ded1e983 954 (invoke "autoreconf" "-vfi"))))))
69d9792a
EB
955 (home-page "https://github.com/bagder/libbrotli/")
956 (synopsis "Implementation of the Brotli compression algorithm")
957 (description
958 "Brotli is a general-purpose lossless compression algorithm. It is
959similar in speed to deflate but offers denser compression. This package
960provides encoder and a decoder libraries: libbrotlienc and libbrotlidec,
961respectively, based on the reference implementation from Google.")
962 (license license:expat))))
3fd4b90d
DM
963
964(define-public cabextract
965 (package
966 (name "cabextract")
967 (version "1.6")
968 (source (origin
969 (method url-fetch)
970 (uri (string-append
971 "http://cabextract.org.uk/cabextract-" version ".tar.gz"))
972 (sha256
973 (base32
974 "1ysmmz25fjghq7mxb2anyyvr1ljxqxzi4piwjhk0sdamcnsn3rnf"))))
975 (build-system gnu-build-system)
976 (arguments '(#:configure-flags '("--with-external-libmspack")))
977 (native-inputs
978 `(("pkg-config" ,pkg-config)))
979 (inputs
980 `(("libmspack" ,libmspack)))
981 (home-page "http://www.cabextract.org.uk/")
982 (synopsis "Tool to unpack Cabinet archives")
983 (description "Extracts files out of Microsoft Cabinet (.cab) archives")
984 ;; Some source files specify gpl2+, lgpl2+, however COPYING is gpl3.
985 (license license:gpl3+)))
0b073506
TGR
986
987(define-public xdelta
988 (package
989 (name "xdelta")
990 (version "3.1.0")
991 (source
992 (origin
993 (method url-fetch)
994 (uri (string-append "https://github.com/jmacd/xdelta/archive/v"
995 version ".tar.gz"))
996 (sha256
997 (base32
998 "17g2pbbqy6h20qgdjq7ykib7kg5ajh8fwbsfgyjqg8pwg19wy5bm"))
999 (file-name (string-append name "-" version ".tar.gz"))
1000 (snippet
1001 ;; This file isn't freely distributable and has no effect on building.
6cbee49d
MW
1002 '(begin
1003 (delete-file "xdelta3/draft-korn-vcdiff.txt")
1004 #t))))
0b073506
TGR
1005 (build-system gnu-build-system)
1006 (native-inputs
1007 `(("autoconf" ,autoconf)
1008 ("automake" ,automake)))
1009 (arguments
1010 `(#:phases
1011 (modify-phases %standard-phases
1012 (add-after 'unpack 'enter-build-directory
0a4d9eb7 1013 (lambda _ (chdir "xdelta3") #t))
d10092b8 1014 (add-after 'enter-build-directory 'autoconf
0a4d9eb7 1015 (lambda _ (invoke "autoreconf" "-vfi"))))))
69b7fa3e 1016 (home-page "http://xdelta.org")
0b073506
TGR
1017 (synopsis "Delta encoder for binary files")
1018 (description "xdelta encodes only the differences between two binary files
1019using the VCDIFF algorithm and patch file format described in RFC 3284. It can
1020also be used to apply such patches. xdelta is similar to @command{diff} and
1021@command{patch}, but is not limited to plain text and does not generate
1022human-readable output.")
1023 (license license:asl2.0)))
389eb3fa
TGR
1024
1025(define-public lrzip
1026 (package
1027 (name "lrzip")
666619d0 1028 (version "0.631")
389eb3fa
TGR
1029 (source
1030 (origin
1031 (method url-fetch)
1032 (uri (string-append
1033 "http://ck.kolivas.org/apps/lrzip/lrzip-" version ".tar.bz2"))
1034 (sha256
1035 (base32
5400fdfd
TGR
1036 "0mb449vmmwpkalq732jdyginvql57nxyd31sszb108yps1lf448d"))
1037 (patches (search-patches "lrzip-CVE-2017-8842.patch"))))
389eb3fa
TGR
1038 (build-system gnu-build-system)
1039 (native-inputs
1040 `(;; nasm is only required when building for 32-bit x86 platforms
1041 ,@(if (string-prefix? "i686" (or (%current-target-system)
1042 (%current-system)))
1043 `(("nasm" ,nasm))
1044 '())
1045 ("perl" ,perl)))
1046 (inputs
1047 `(("bzip2" ,bzip2)
1048 ("lzo" ,lzo)
1049 ("zlib" ,zlib)))
1050 (home-page "http://ck.kolivas.org/apps/lrzip/")
1051 (synopsis "Large file compressor with a very high compression ratio")
1052 (description "lrzip is a compression utility that uses long-range
1053redundancy reduction to improve the subsequent compression ratio of
1054larger files. It can then further compress the result with the ZPAQ or
1055LZMA algorithms for maximum compression, or LZO for maximum speed. This
1056choice between size or speed allows for either better compression than
1057even LZMA can provide, or a higher speed than gzip while compressing as
1058well as bzip2.")
1059 (license (list license:gpl3+
1060 license:public-domain)))) ; most files in lzma/
e4c2136d 1061
9869bb12
JL
1062(define-public bitshuffle
1063 (package
1064 (name "bitshuffle")
6370fb2d 1065 (version "0.3.4")
9869bb12
JL
1066 (source (origin
1067 (method url-fetch)
1068 (uri (pypi-uri "bitshuffle" version))
1069 (sha256
1070 (base32
6370fb2d 1071 "0ydawb01ghsvmw0lraczhrgvkjj97bpg98f1qqs1cnfp953mdd5v"))))
9869bb12
JL
1072 (build-system python-build-system)
1073 (arguments
6370fb2d 1074 `(#:tests? #f)) ; fail: https://github.com/h5py/h5py/issues/769
9869bb12
JL
1075 (inputs
1076 `(("numpy" ,python-numpy)
1077 ("h5py" ,python-h5py)
1078 ("hdf5" ,hdf5)))
1079 (native-inputs
1080 `(("cython" ,python-cython)))
1081 (home-page "https://github.com/kiyo-masui/bitshuffle")
1082 (synopsis "Filter for improving compression of typed binary data")
1083 (description "Bitshuffle is an algorithm that rearranges typed, binary data
1084for improving compression, as well as a python/C package that implements this
1085algorithm within the Numpy framework.")
1086 (license license:expat)))
1087
e4c2136d
DC
1088(define-public snappy
1089 (package
1090 (name "snappy")
5a437357 1091 (version "1.1.7")
e4c2136d
DC
1092 (source (origin
1093 (method url-fetch)
5a437357
MB
1094 (uri (string-append "https://github.com/google/snappy/archive/"
1095 version ".tar.gz"))
1096 (file-name (string-append "snappy-" version ".tar.gz"))
e4c2136d
DC
1097 (sha256
1098 (base32
5a437357
MB
1099 "1m7rcdqzkys5lspj8jcsaah8w33zh28s771bw0ga2lgzfgl05yix"))))
1100 (build-system cmake-build-system)
1101 (arguments
1102 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
e4c2136d
DC
1103 (home-page "https://github.com/google/snappy")
1104 (synopsis "Fast compressor/decompressor")
5a437357 1105 (description "Snappy is a compression/decompression library. It does not
e4c2136d 1106aim for maximum compression, or compatibility with any other compression library;
5a437357 1107instead, it aims for very high speeds and reasonable compression. For instance,
e4c2136d
DC
1108compared to the fastest mode of zlib, Snappy is an order of magnitude faster
1109for most inputs, but the resulting compressed files are anywhere from 20% to
1110100% bigger.")
1111 (license license:asl2.0)))
adbd7faf 1112
cea83466
JL
1113(define bitshuffle-for-snappy
1114 (package
1115 (inherit bitshuffle)
1116 (name "bitshuffle-for-snappy")
1117 (build-system gnu-build-system)
1118 (arguments
1119 `(#:tests? #f
1120 #:phases
1121 (modify-phases %standard-phases
1122 (replace 'configure
1123 (lambda* (#:key outputs #:allow-other-keys)
1124 (with-output-to-file "Makefile"
1125 (lambda _
04e91134
RW
1126 (format #t "\
1127libbitshuffle.so: src/bitshuffle.o src/bitshuffle_core.o src/iochain.o lz4/lz4.o
1128\tgcc -O3 -ffast-math -std=c99 -o $@ -shared -fPIC $^
1129
1130%.o: %.c
1131\tgcc -O3 -ffast-math -std=c99 -fPIC -Isrc -Ilz4 -c $< -o $@
1132
1133PREFIX:=~a
1134LIBDIR:=$(PREFIX)/lib
1135INCLUDEDIR:=$(PREFIX)/include
1136
1137install: libbitshuffle.so
1138\tinstall -dm755 $(LIBDIR)
1139\tinstall -dm755 $(INCLUDEDIR)
1140\tinstall -m755 libbitshuffle.so $(LIBDIR)
1141\tinstall -m644 src/bitshuffle.h $(INCLUDEDIR)
1142\tinstall -m644 src/bitshuffle_core.h $(INCLUDEDIR)
1143\tinstall -m644 src/iochain.h $(INCLUDEDIR)
1144\tinstall -m644 lz4/lz4.h $(INCLUDEDIR)
1145" (assoc-ref outputs "out"))))
1146 #t)))))
cea83466
JL
1147 (inputs '())
1148 (native-inputs '())))
1149
1150(define-public java-snappy
1151 (package
1152 (name "java-snappy")
8293d21c 1153 (version "1.1.7")
cea83466
JL
1154 (source (origin
1155 (method url-fetch)
1156 (uri (string-append "https://github.com/xerial/snappy-java/archive/"
1157 version ".tar.gz"))
1158 (file-name (string-append name "-" version ".tar.gz"))
1159 (sha256
1160 (base32
8293d21c 1161 "0q4kxz2n97czf6g5gzq0d8yz22cgiaj7wp51rzsswh3bi99bpgg5"))))
cea83466
JL
1162 (build-system ant-build-system)
1163 (arguments
1164 `(#:jar-name "snappy.jar"
1165 #:source-dir "src/main/java"
1166 #:phases
1167 (modify-phases %standard-phases
1168 (add-before 'build 'remove-binaries
1169 (lambda _
1170 (delete-file "lib/org/xerial/snappy/OSInfo.class")
1171 (delete-file-recursively "src/main/resources/org/xerial/snappy/native")
1172 #t))
1173 (add-before 'build 'build-jni
1174 (lambda _
1175 ;; Rebuild one of the binaries we removed earlier
74d29bed 1176 (invoke "javac" "src/main/java/org/xerial/snappy/OSInfo.java"
cea83466
JL
1177 "-d" "lib")
1178 ;; Link to the dynamic bitshuffle and snappy, not the static ones
1179 (substitute* "Makefile.common"
1180 (("-shared")
1181 "-shared -lbitshuffle -lsnappy"))
1182 (substitute* "Makefile"
1183 ;; Don't try to use git, don't download bitshuffle source
1184 ;; and don't build it.
1185 (("\\$\\(SNAPPY_GIT_UNPACKED\\) ")
1186 "")
1187 ((": \\$\\(SNAPPY_GIT_UNPACKED\\)")
1188 ":")
1189 (("\\$\\(BITSHUFFLE_UNPACKED\\) ")
1190 "")
1191 ((": \\$\\(SNAPPY_SOURCE_CONFIGURED\\)") ":")
1192 ;; What we actually want to build
1193 (("SNAPPY_OBJ:=.*")
1194 "SNAPPY_OBJ:=$(addprefix $(SNAPPY_OUT)/, \
1195 SnappyNative.o BitShuffleNative.o)\n")
1196 ;; Since we removed the directory structure in "native" during
1197 ;; the previous phase, we need to recreate it.
1198 (("NAME\\): \\$\\(SNAPPY_OBJ\\)")
1199 "NAME): $(SNAPPY_OBJ)\n\t@mkdir -p $(@D)"))
1200 ;; Finally we can run the Makefile to build the dynamic library.
8293d21c
MB
1201 ;; Use the -nocmake target to avoid a dependency on cmake,
1202 ;; which in turn requires the "git_unpacked" directory.
1203 (invoke "make" "native-nocmake")))
cea83466
JL
1204 ;; Once we have built the shared library, we need to place it in the
1205 ;; "build" directory so it can be added to the jar file.
1206 (add-after 'build-jni 'copy-jni
1207 (lambda _
1208 (copy-recursively "src/main/resources/org/xerial/snappy/native"
1209 "build/classes/org/xerial/snappy/native")))
1210 (add-before 'check 'fix-failing
1211 (lambda _
8293d21c
MB
1212 (with-directory-excursion "src/test/java/org/xerial/snappy"
1213 ;; This package assumes maven build, which puts results in "target".
1214 ;; We put them in "build" instead, so fix that.
1215 (substitute* "SnappyLoaderTest.java"
1216 (("target/classes") "build/classes"))
1217 ;; This requires Hadoop, which is not in Guix yet.
1218 (delete-file "SnappyHadoopCompatibleOutputStreamTest.java"))
1219 #t)))))
cea83466
JL
1220 (inputs
1221 `(("osgi-framework" ,java-osgi-framework)))
1222 (propagated-inputs
1223 `(("bitshuffle" ,bitshuffle-for-snappy)
1224 ("snappy" ,snappy)))
1225 (native-inputs
1226 `(("junit" ,java-junit)
1227 ("hamcrest" ,java-hamcrest-core)
1228 ("xerial-core" ,java-xerial-core)
1229 ("classworlds" ,java-plexus-classworlds)
8293d21c
MB
1230 ("commons-lang" ,java-commons-lang)
1231 ("commons-io" ,java-commons-io)
cea83466
JL
1232 ("perl" ,perl)))
1233 (home-page "https://github.com/xerial/snappy-java")
1234 (synopsis "Compression/decompression algorithm in Java")
1235 (description "Snappy-java is a Java port of the snappy, a fast C++
1236compresser/decompresser.")
1237 (license license:asl2.0)))
1238
933ad809
RW
1239(define-public java-snappy-1
1240 (package
1241 (inherit java-snappy)
1242 (version "1.0.3-rc3")
1243 (source (origin
1244 (method url-fetch)
1245 (uri (string-append "https://github.com/xerial/snappy-java/archive/"
1246 "snappy-java-" version ".tar.gz"))
1247 (sha256
1248 (base32
1249 "08hsxlqidiqck0q57fshwyv3ynyxy18vmhrai9fyc8mz17m7gsa3"))))
1250 (arguments
1251 `(#:jar-name "snappy.jar"
1252 #:source-dir "src/main/java"
1253 #:phases
1254 (modify-phases %standard-phases
1255 (add-before 'build 'remove-binaries
1256 (lambda _
1257 (delete-file "lib/org/xerial/snappy/OSInfo.class")
1258 (delete-file-recursively "src/main/resources/org/xerial/snappy/native")
1259 #t))
1260 (add-before 'build 'build-jni
1261 (lambda _
1262 ;; Rebuild one of the binaries we removed earlier
74d29bed 1263 (invoke "javac" "src/main/java/org/xerial/snappy/OSInfo.java"
933ad809
RW
1264 "-d" "lib")
1265 ;; Link to the dynamic snappy, not the static ones
1266 (substitute* "Makefile.common"
1267 (("-shared") "-shared -lsnappy"))
1268 (substitute* "Makefile"
1269 ;; Don't download the sources here.
1270 (("\\$\\(SNAPPY_UNPACKED\\) ") "")
1271 ((": \\$\\(SNAPPY_UNPACKED\\) ") ":")
1272 ;; What we actually want to build
1273 (("SNAPPY_OBJ:=.*")
1274 "SNAPPY_OBJ:=$(addprefix $(SNAPPY_OUT)/, SnappyNative.o)\n")
1275 ;; Since we removed the directory structure in "native" during
1276 ;; the previous phase, we need to recreate it.
1277 (("NAME\\): \\$\\(SNAPPY_OBJ\\)")
1278 "NAME): $(SNAPPY_OBJ)\n\t@mkdir -p $(@D)"))
1279 ;; Finally we can run the Makefile to build the dynamic library.
74d29bed 1280 (invoke "make" "native")))
933ad809
RW
1281 ;; Once we have built the shared library, we need to place it in the
1282 ;; "build" directory so it can be added to the jar file.
1283 (add-after 'build-jni 'copy-jni
1284 (lambda _
1285 (copy-recursively "src/main/resources/org/xerial/snappy/native"
1286 "build/classes/org/xerial/snappy/native")
1287 #t))
1288 (add-before 'check 'fix-tests
1289 (lambda _
1290 (mkdir-p "src/test/resources/org/xerial/snappy/")
1291 (copy-recursively "src/test/java/org/xerial/snappy/testdata"
1292 "src/test/resources/org/xerial/snappy/testdata")
1293 (install-file "src/test/java/org/xerial/snappy/alice29.txt"
1294 "src/test/resources/org/xerial/snappy/")
1295 #t)))))))
1296
823997e9
JL
1297(define-public java-iq80-snappy
1298 (package
1299 (name "java-iq80-snappy")
1300 (version "0.4")
1301 (source (origin
1302 (method url-fetch)
1303 (uri (string-append "https://github.com/dain/snappy/archive/snappy-"
1304 version ".tar.gz"))
1305 (sha256
1306 (base32
1307 "0rb3zhci7w9wzd65lfnk7p3ip0n6gb58a9qpx8n7r0231gahyamf"))))
1308 (build-system ant-build-system)
1309 (arguments
1310 `(#:jar-name "iq80-snappy.jar"
1311 #:source-dir "src/main/java"
1312 #:test-dir "src/test"
1313 #:jdk ,icedtea-8
1314 #:phases
1315 (modify-phases %standard-phases
1316 (replace 'check
1317 (lambda _
1318 (define (test class)
831016bd
MW
1319 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
1320 ":build/classes"
1321 ":build/test-classes")
1322 "-Dtest.resources.dir=src/test/resources"
1323 "org.testng.TestNG" "-testclass"
1324 class))
1325 (invoke "ant" "compile-tests")
1326 (test "org.iq80.snappy.SnappyFramedStreamTest")
1327 (test "org.iq80.snappy.SnappyStreamTest")))
823997e9
JL
1328 (add-before 'build 'remove-hadoop-dependency
1329 (lambda _
1330 ;; We don't have hadoop
1331 (delete-file "src/main/java/org/iq80/snappy/HadoopSnappyCodec.java")
1332 (delete-file "src/test/java/org/iq80/snappy/TestHadoopSnappyCodec.java")
1333 #t)))))
1334 (home-page "https://github.com/dain/snappy")
1335 (native-inputs
1336 `(("guava" ,java-guava)
1337 ("java-snappy" ,java-snappy)
1338 ("hamcrest" ,java-hamcrest-core)
1339 ("testng" ,java-testng)))
107a14f9
TGR
1340 (synopsis "Java port of the Snappy (de)compressor")
1341 (description
1342 "Iq80-snappy is a port of the Snappy compressor and decompressor rewritten
1343in pure Java. This compression code produces a byte-for-byte exact copy of the
1344output created by the original C++ code, and is extremely fast.")
823997e9
JL
1345 (license license:asl2.0)))
1346
776d2fb1
RW
1347(define-public java-jbzip2
1348 (package
1349 (name "java-jbzip2")
1350 (version "0.9.1")
1351 (source (origin
1352 (method url-fetch)
1353 (uri (string-append "https://storage.googleapis.com/"
1354 "google-code-archive-source/v2/"
1355 "code.google.com/jbzip2/"
1356 "source-archive.zip"))
1357 (file-name (string-append name "-" version ".zip"))
1358 (sha256
1359 (base32
1360 "0ncmhlqmrfmj96nqf6p77b9ws35lcfsvpfxzwxi2asissc83z1l3"))))
1361 (build-system ant-build-system)
1362 (native-inputs
1363 `(("unzip" ,unzip)
1364 ("java-junit" ,java-junit)))
1365 (arguments
1366 `(#:tests? #f ; no tests
1367 #:jar-name "jbzip2.jar"
1368 #:source-dir "tags/release-0.9.1/src"
1369 #:phases
1370 (modify-phases %standard-phases
1371 (add-after 'unpack 'fix-encoding-problems
1372 (lambda _
1373 ;; Some of the files we're patching are
1374 ;; ISO-8859-1-encoded, so choose it as the default
1375 ;; encoding so the byte encoding is preserved.
1376 (with-fluids ((%default-port-encoding #f))
1377 (substitute* "tags/release-0.9.1/src/org/itadaki/bzip2/HuffmanAllocator.java"
1378 (("Milidi.") "Milidiu")))
1379 #t)))))
1380 (home-page "https://code.google.com/archive/p/jbzip2/")
1381 (synopsis "Java bzip2 compression/decompression library")
1382 (description "Jbzip2 is a Java bzip2 compression/decompression library.
1383It can be used as a replacement for the Apache @code{CBZip2InputStream} /
1384@code{CBZip2OutputStream} classes.")
1385 (license license:expat)))
1386
adbd7faf
KK
1387(define-public p7zip
1388 (package
1389 (name "p7zip")
1390 (version "16.02")
1391 (source (origin
1392 (method url-fetch)
1393 (uri (string-append "mirror://sourceforge/" name "/" name "/"
1394 version "/" name "_" version
1395 "_src_all.tar.bz2"))
1396 (sha256
1397 (base32
1398 "07rlwbbgszq8i7m8jh3x6j2w2hc9a72dc7fmqawnqkwlwb00mcjy"))
1399 (modules '((guix build utils)))
1400 (snippet
1401 '(begin
1402 ;; Remove non-free source files
1403 (for-each delete-file
1404 (append
1405 (find-files "CPP/7zip/Compress" "Rar.*")
1406 (find-files "CPP/7zip/Crypto" "Rar.*")
1407 (find-files "DOC/unRarLicense.txt")
1408 (find-files "Utils/file_Codecs_Rar_so.py")))
1409 (delete-file-recursively "CPP/7zip/Archive/Rar")
1410 (delete-file-recursively "CPP/7zip/Compress/Rar")
1411 #t))
1ac675a5 1412 (patches (search-patches "p7zip-CVE-2016-9296.patch"
a630c647 1413 "p7zip-CVE-2017-17969.patch"
1ac675a5 1414 "p7zip-remove-unused-code.patch"))))
adbd7faf
KK
1415 (build-system gnu-build-system)
1416 (arguments
1417 `(#:make-flags
1418 (list (string-append "DEST_HOME=" (assoc-ref %outputs "out")) "all3")
1419 #:phases
1420 (modify-phases %standard-phases
1421 (replace 'configure
1422 (lambda* (#:key system outputs #:allow-other-keys)
1423 (zero? (system* "cp"
1424 (let ((system ,(or (%current-target-system)
1425 (%current-system))))
1426 (cond
1427 ((string-prefix? "x86_64" system)
1428 "makefile.linux_amd64_asm")
1429 ((string-prefix? "i686" system)
1430 "makefile.linux_x86_asm_gcc_4.X")
1431 (else
1432 "makefile.linux_any_cpu_gcc_4.X")))
1433 "makefile.machine"))))
1434 (replace 'check
1435 (lambda _
1436 (and (zero? (system* "make" "test"))
1437 (zero? (system* "make" "test_7z"))
1438 (zero? (system* "make" "test_7zr"))))))))
1439 (inputs
1440 (let ((system (or (%current-target-system)
1441 (%current-system))))
1442 `(,@(cond ((string-prefix? "x86_64" system)
1443 `(("yasm" ,yasm)))
1444 ((string-prefix? "i686" system)
1445 `(("nasm" ,nasm)))
1446 (else '())))))
1447 (home-page "http://p7zip.sourceforge.net/")
1448 (synopsis "Command-line file archiver with high compression ratio")
1449 (description "p7zip is a command-line port of 7-Zip, a file archiver that
1450handles the 7z format which features very high compression ratios.")
1451 (license (list license:lgpl2.1+
1452 license:gpl2+
1453 license:public-domain))))
618089f9
MB
1454
1455(define-public gzstream
1456 (package
1457 (name "gzstream")
1458 (version "1.5")
1459 (source (origin
1460 (method url-fetch)
1461 (uri
1462 ;; No versioned URL, but last release was in 2003.
1463 "http://www.cs.unc.edu/Research/compgeom/gzstream/gzstream.tgz")
1464 (file-name (string-append name "-" version ".tgz"))
1465 (sha256
1466 (base32
1467 "00y19pqjsdj5zcrx4p9j56pl73vayfwnb7y2hvp423nx0cwv5b4r"))
1468 (modules '((guix build utils)))
1469 (snippet
1470 ;; Remove pre-compiled object.
6cbee49d
MW
1471 '(begin
1472 (delete-file "gzstream.o")
1473 #t))))
618089f9
MB
1474 (build-system gnu-build-system)
1475 (arguments
1476 `(#:test-target "test"
1477 #:phases
1478 (modify-phases %standard-phases
1479 (delete 'configure)
1480 (replace 'install
1481 (lambda* (#:key outputs #:allow-other-keys)
1482 (let* ((out (assoc-ref outputs "out"))
1483 (lib (string-append out "/lib"))
1484 (include (string-append out "/include")))
1485 (install-file "libgzstream.a" lib)
1486 (install-file "gzstream.h" include)
1487 #t))))))
1488 (propagated-inputs `(("zlib" ,zlib)))
1489 (home-page "http://www.cs.unc.edu/Research/compgeom/gzstream/")
1490 (synopsis "Compressed C++ iostream")
1491 (description "gzstream is a small library for providing zlib
1492functionality in a C++ iostream.")
1493 (license license:lgpl2.1+)))
36df995c
TGR
1494
1495(define-public zpaq
1496 (package
1497 (name "zpaq")
1498 (version "7.15")
1499 (source
1500 (origin
1501 (method url-fetch/zipbomb)
1502 (uri (string-append "http://mattmahoney.net/dc/zpaq"
1503 (string-delete #\. version) ".zip"))
1504 (sha256
1505 (base32
1506 "066l94yyladlfzri877nh2dhkvspagjn3m5bmv725fmhkr9c4pp8"))
1507 (modules '((guix build utils)))
1508 (snippet
1509 ;; Delete irrelevant pre-compiled binaries.
6cbee49d
MW
1510 '(begin
1511 (for-each delete-file (find-files "." "\\.exe$"))
1512 #t))))
36df995c
TGR
1513 (build-system gnu-build-system)
1514 (arguments
1515 `(#:phases
1516 (modify-phases %standard-phases
1517 (delete 'configure)) ; no ‘configure’ script
1518 #:make-flags
1519 (list
1520 (string-append "CPPFLAGS=-Dunix"
1521 ,(match (or (%current-target-system)
1522 (%current-system))
1523 ("x86_64-linux" "")
1524 ("i686-linux" "")
1525 (_ " -DNOJIT")))
1526 ;; These should be safe, lowest-common-denominator instruction sets,
1527 ;; allowing for some optimisation while remaining reproducible.
effd7198 1528 (string-append "CXXFLAGS=-O3 -DNDEBUG"
36df995c
TGR
1529 ,(match (or (%current-target-system)
1530 (%current-system))
effd7198
EF
1531 ("x86_64-linux" " -march=nocona -mtune=generic")
1532 ("i686-linux" " -march=i686 -mtune=generic")
1533 ("armhf-linux" " -mtune=generic-armv7-a")
36df995c
TGR
1534 (_ "")))
1535 (string-append "PREFIX="
1536 (assoc-ref %outputs "out")))))
1537 (native-inputs
1538 `(("perl" ,perl))) ; for pod2man
1539 (home-page "http://mattmahoney.net/dc/zpaq.html")
1540 (synopsis "Incremental journaling archiver")
1541 (description "ZPAQ is a command-line archiver for realistic situations with
1542many duplicate and already compressed files. It backs up only those files
1543modified since the last update. All previous versions remain untouched and can
1544be independently recovered. Identical files are only stored once (known as
1545@dfn{de-duplication}). Archives can also be encrypted.
1546
1547ZPAQ is intended to back up user data, not entire operating systems. It ignores
1548owner and group IDs, ACLs, extended attributes, or special file types like
1549devices, sockets, or named pipes. It does not follow or restore symbolic links
1550or junctions, and always follows hard links.")
1551 (license (list license:public-domain
1552 ;; libzpaq.cpp contains a mix of public-domain and
1553 ;; expat-licenced (or ‘MIT’) code.
1554 license:expat))))
0da8313c 1555
9e6ada8f
MR
1556(define-public unshield
1557 (package
1558 (name "unshield")
1559 (version "1.4.2")
1560 (source
1561 (origin (method url-fetch)
1562 (uri (string-append "http://github.com/twogood/unshield/archive/"
1563 version ".tar.gz"))
277be74f 1564 (file-name (string-append name "-" version ".tar.gz"))
9e6ada8f
MR
1565 (sha256
1566 (base32
1567 "0x7ps644yp5dka2zhb8w0ifqmw3d255jafpzfwv8xbcpgq6fmm2x"))))
1568 (build-system cmake-build-system)
1569 (inputs
1570 `(("zlib" ,zlib)
1571 ("openssl" ,openssl)
1572 ;; test data that is otherwise downloaded with curl
1573 ("unshield-avigomanager11b22.zip"
1574 ,(origin
1575 (method url-fetch)
a5fa1a1a
MR
1576 (uri (string-append "https://www.dropbox.com/s/8r4b6752swe3nhu/"
1577 "unshield-avigomanager11b22.zip?dl=1"))
9e6ada8f
MR
1578 (sha256
1579 (base32 "0fwq7lih04if68wpwpsk5wjqyvh32db76a41sq6gbx4dn1lc3ddn"))
1580 (file-name "unshield-avigomanager11b22.zip")))
1581 ("unshield-the-feeble-files-spanish.zip"
1582 ,(origin
1583 (method url-fetch)
a5fa1a1a
MR
1584 (uri (string-append "https://www.dropbox.com/s/1ng0z9kfxc7eb1e/"
1585 "unshield-the-feeble-files-spanish.zip?dl=1"))
9e6ada8f
MR
1586 (sha256
1587 (base32 "1k5cw6vnpja8yjlnhx5124xrw9i8s1l539hfdqqrqz3l5gn0bnyd"))
1588 (file-name "unshield-the-feeble-files-spanish.zip")))))
1589 (native-inputs
1590 `(("unzip" ,unzip)))
1591 (arguments
1592 `(#:out-of-source? #f
1593 #:phases
1594 (modify-phases %standard-phases
1595 (add-before 'check 'pre-check
1596 (lambda* (#:key inputs #:allow-other-keys)
1597 (for-each (lambda (i)
1598 (copy-file (assoc-ref inputs i)
1599 (string-append "test/v0/" i)))
1600 '("unshield-avigomanager11b22.zip"
1601 "unshield-the-feeble-files-spanish.zip"))
1602 (substitute* (find-files "test/" "/*\\.sh")
1603 ;; Tests expect the unshield binary in a specific
1604 ;; location.
1605 (("/var/tmp/unshield/bin/unshield")
1606 (string-append (getcwd) "/src/unshield"))
1607 ;; We no longer need to download the data.
1608 ((".?URL=.*$") "")
1609 (("curl -(|f)sSL -o test.zip .*") ""))
1610 (substitute* "test/v0/avigomanager.sh"
1611 (("test.zip")
1612 (string-append (getcwd)
1613 "/test/v0/unshield-avigomanager11b22.zip")))
1614 (substitute* "test/v0/the-feeble-files-spanish.sh"
1615 (("test.zip")
1616 (string-append (getcwd)
1617 "/test/v0/unshield-the-feeble-files-spanish.zip")))
1618 #t))
1619 (replace 'check
1620 (lambda _
1621 (zero? (system* "./run-tests.sh")))))))
1622 (home-page "https://github.com/twogood/unshield")
1623 (synopsis "Extract CAB files from InstallShield installers")
1624 (description
1625 "@command{unshield} is a tool and library for extracting @file{.cab}
1626 archives from InstallShield installers.")
1627 (license license:expat)))
1628
f6ac3101
TGR
1629(define-public zstd
1630 (package
1631 (name "zstd")
75176f1b 1632 (version "1.3.4")
f6ac3101
TGR
1633 (source (origin
1634 (method url-fetch)
1635 (uri (string-append "https://github.com/facebook/zstd/archive/v"
1636 version ".tar.gz"))
1637 (file-name (string-append name "-" version ".tar.gz"))
1638 (sha256
1639 (base32
75176f1b 1640 "1a85sqk4z5b2jfp7fqkr38ibql8mdzca32lf4i3bssyjimp1pr4j"))))
f6ac3101
TGR
1641 (build-system gnu-build-system)
1642 (arguments
1643 `(#:phases
1644 (modify-phases %standard-phases
1645 (delete 'configure)) ; no configure script
1646 #:make-flags
1647 (list "CC=gcc"
f45e314e
TGR
1648 (string-append "PREFIX=" (assoc-ref %outputs "out"))
1649 ;; Skip auto-detection of, and creating a dependency on, the build
1650 ;; environment's ‘xz’ for what amounts to a dubious feature anyway.
1651 "HAVE_LZMA=0"
1652 ;; Not currently detected, but be explicit & avoid surprises later.
1653 "HAVE_LZ4=0"
e8073063 1654 "HAVE_ZLIB=0")))
f6ac3101
TGR
1655 (home-page "http://zstd.net/")
1656 (synopsis "Zstandard real-time compression algorithm")
1657 (description "Zstandard (@command{zstd}) is a lossless compression algorithm
1658that combines very fast operation with a compression ratio comparable to that of
1659zlib. In most scenarios, both compression and decompression can be performed in
1660‘real time’. The compressor can be configured to provide the most suitable
1661trade-off between compression ratio and speed, without affecting decompression
1662speed.")
1663 (license (list license:bsd-3 ; the main top-level LICENSE file
16123d1d 1664 license:bsd-2 ; many files explicitly state 2-Clause
5a719dee 1665 license:gpl2 ; the main top-level COPYING file
16123d1d
TGR
1666 license:gpl3+ ; tests/gzip/*.sh
1667 license:expat ; lib/dictBuilder/divsufsort.[ch]
f6ac3101
TGR
1668 license:public-domain ; zlibWrapper/examples/fitblk*
1669 license:zlib)))) ; zlibWrapper/{gz*.c,gzguts.h}
0f03c531
TGR
1670
1671(define-public pzstd
1672 (package
1673 (name "pzstd")
1674 (version (package-version zstd))
1675 (source (package-source zstd))
1676 (build-system gnu-build-system)
1677 (native-inputs
c695fb76 1678 `(("googletest" ,googletest)))
0f03c531
TGR
1679 (arguments
1680 `(#:phases
1681 (modify-phases %standard-phases
1682 (add-after 'unpack 'enter-subdirectory
1683 (lambda _ (chdir "contrib/pzstd")))
1684 (delete 'configure) ; no configure script
1685 (add-before 'check 'compile-tests
1686 (lambda* (#:key make-flags #:allow-other-keys)
1687 (zero? (apply system* "make" "tests" make-flags))))
1688 (add-after 'install 'install-documentation
1689 (lambda* (#:key outputs #:allow-other-keys)
1690 (let* ((out (assoc-ref outputs "out"))
1691 (doc (string-append out "/share/doc/" ,name)))
1692 (mkdir-p doc)
1693 (install-file "README.md" doc)
1694 #t))))
1695 #:make-flags
1696 (list "CC=gcc"
1697 (string-append "PREFIX=" (assoc-ref %outputs "out")))))
1698 (home-page (package-home-page zstd))
1699 (synopsis "Threaded implementation of the Zstandard compression algorithm")
1700 (description "Parallel Zstandard (PZstandard or @command{pzstd}) is a
1701multi-threaded implementation of the @uref{http://zstd.net/, Zstandard
1702compression algorithm}. It is fully compatible with the original Zstandard file
1703format and command-line interface, and can be used as a drop-in replacement.
1704
1705Compression is distributed over multiple processor cores to improve performance,
1706as is the decompression of data compressed in this manner. Data compressed by
1707other implementations will only be decompressed by two threads: one performing
1708the actual decompression, the other input and output.")
1709 (license (package-license zstd))))
148585c2
AI
1710
1711(define-public zip
1712 (package
1713 (name "zip")
1714 (version "3.0")
1715 (source
1716 (origin
1717 (method url-fetch)
1718 (uri (string-append "mirror://sourceforge/infozip"
1719 "/Zip%203.x%20%28latest%29/3.0/zip30.tar.gz"))
1720 (sha256
1721 (base32
1722 "0sb3h3067pzf3a7mlxn1hikpcjrsvycjcnj9hl9b1c3ykcgvps7h"))))
1723 (build-system gnu-build-system)
1724 (inputs `(("bzip2" ,bzip2)))
1725 (arguments
1726 `(#:tests? #f ; no test target
1727 #:make-flags (let ((out (assoc-ref %outputs "out")))
1728 (list "-f" "unix/Makefile"
1729 (string-append "prefix=" out)
1730 (string-append "MANDIR=" out "/share/man/man1")))
148585c2
AI
1731 #:phases
1732 (modify-phases %standard-phases
1733 (replace 'build
1734 (lambda* (#:key (make-flags '()) #:allow-other-keys)
b0559d24 1735 (apply invoke "make" "generic_gcc" make-flags)))
148585c2
AI
1736 (delete 'configure))))
1737 (home-page "http://www.info-zip.org/Zip.html")
1738 (synopsis "Compression and file packing utility")
1739 (description
1740 "Zip is a compression and file packaging/archive utility. Zip is useful
1741for packaging a set of files for distribution, for archiving files, and for
1742saving disk space by temporarily compressing unused files or directories.
1743Zip puts one or more compressed files into a single ZIP archive, along with
1744information about the files (name, path, date, time of last modification,
1745protection, and check information to verify file integrity). An entire
1746directory structure can be packed into a ZIP archive with a single command.
1747
1748Zip has one compression method (deflation) and can also store files without
1749compression. Zip automatically chooses the better of the two for each file.
1750Compression ratios of 2:1 to 3:1 are common for text files.")
1751 (license (license:non-copyleft "file://LICENSE"
1752 "See LICENSE in the distribution."))))
1753
1754(define-public unzip
1755 (package (inherit zip)
1756 (name "unzip")
1757 (version "6.0")
1758 (source
1759 (origin
1760 (method url-fetch)
1761 (uri (string-append "mirror://sourceforge/infozip"
1762 "/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz"))
1763 (sha256
1764 (base32
1765 "0dxx11knh3nk95p2gg2ak777dd11pr7jx5das2g49l262scrcv83"))
1766 (patches (search-patches "unzip-CVE-2014-8139.patch"
1767 "unzip-CVE-2014-8140.patch"
1768 "unzip-CVE-2014-8141.patch"
1769 "unzip-CVE-2014-9636.patch"
1770 "unzip-CVE-2015-7696.patch"
1771 "unzip-CVE-2015-7697.patch"
1772 "unzip-allow-greater-hostver-values.patch"
1773 "unzip-initialize-symlink-flag.patch"
1774 "unzip-remove-build-date.patch"
1775 "unzip-attribs-overflow.patch"
1776 "unzip-overflow-on-invalid-input.patch"
1777 "unzip-format-secure.patch"
1778 "unzip-overflow-long-fsize.patch"))))
1779 (build-system gnu-build-system)
1780 ;; no inputs; bzip2 is not supported, since not compiled with BZ_NO_STDIO
1781 (arguments
1782 `(#:phases (modify-phases %standard-phases
1783 (delete 'configure)
190376a1
MW
1784 (add-after 'unpack 'fortify
1785 (lambda _
1786 ;; Mitigate CVE-2018-1000035, an exploitable buffer overflow.
1787 ;; This environment variable is recommended in 'unix/Makefile'
1788 ;; for passing flags to the C compiler.
1789 (setenv "LOCAL_UNZIP" "-D_FORTIFY_SOURCE=1")
1790 #t))
148585c2
AI
1791 (replace 'build
1792 (lambda* (#:key make-flags #:allow-other-keys)
fa76696b
MW
1793 (apply invoke "make"
1794 `("-j" ,(number->string
1795 (parallel-job-count))
1796 ,@make-flags
1797 "generic_gcc")))))
148585c2
AI
1798 #:make-flags (list "-f" "unix/Makefile"
1799 (string-append "prefix=" %output)
1800 (string-append "MANDIR=" %output "/share/man/man1"))))
1801 (home-page "http://www.info-zip.org/UnZip.html")
1802 (synopsis "Decompression and file extraction utility")
1803 (description
1804 "UnZip is an extraction utility for archives compressed in .zip format,
1805also called \"zipfiles\".
1806
1807UnZip lists, tests, or extracts files from a .zip archive. The default
1808behaviour (with no options) is to extract into the current directory, and
1809subdirectories below it, all files from the specified zipfile. UnZip
1810recreates the stored directory structure by default.")
1811 (license (license:non-copyleft "file://LICENSE"
1812 "See LICENSE in the distribution."))))
1813
1814(define-public zziplib
1815 (package
1816 (name "zziplib")
3f986ff6
MB
1817 (version "0.13.69")
1818 (home-page "https://github.com/gdraheim/zziplib")
148585c2
AI
1819 (source
1820 (origin
1821 (method url-fetch)
3f986ff6 1822 (uri (string-append home-page "/archive/v" version ".tar.gz"))
148585c2
AI
1823 (sha256
1824 (base32
3f986ff6 1825 "0i052a7shww0fzsxrdp3rd7g4mbzx7324a8ysbc0br7frpblcql4"))))
148585c2
AI
1826 (build-system gnu-build-system)
1827 (inputs
1828 `(("zlib" ,zlib)))
1829 (native-inputs `(("perl" ,perl) ; for the documentation
1830 ("pkg-config" ,pkg-config)
1831 ;; for the documentation; Python 3 not supported,
1832 ;; http://forums.gentoo.org/viewtopic-t-863161-start-0.html
1833 ("python" ,python-2)
1834 ("zip" ,zip))) ; to create test files
148585c2
AI
1835 (synopsis "Library for accessing zip files")
1836 (description
1837 "ZZipLib is a library based on zlib for accessing zip files.")
0d729c5b
MB
1838 ;; zziplib is dual licensed under LGPL2.0+ and MPL1.1. Some example source
1839 ;; files carry the Zlib license; see "docs/copying.html" for details.
1840 (license (list license:lgpl2.0+ license:mpl1.1))))
148585c2 1841
b6f024ad 1842(define-public perl-archive-zip
148585c2 1843 (package
b6f024ad 1844 (name "perl-archive-zip")
d5960bf7 1845 (version "1.60")
148585c2
AI
1846 (source
1847 (origin
1848 (method url-fetch)
1849 (uri (string-append
d5960bf7 1850 "mirror://cpan/authors/id/P/PH/PHRED/Archive-Zip-"
148585c2
AI
1851 version ".tar.gz"))
1852 (sha256
1853 (base32
d5960bf7 1854 "02y2ylq83hy9kgj57sc0239x65br9sm98c0chsm61s08yc2mpiza"))))
148585c2 1855 (build-system perl-build-system)
d5960bf7
TGR
1856 (native-inputs
1857 ;; For tests.
1858 `(("perl-test-mockmodule" ,perl-test-mockmodule)))
49ab09e6
TGR
1859 (synopsis "Provides an interface to Zip archive files")
1860 (description "The @code{Archive::Zip} module allows a Perl program to
1861create, manipulate, read, and write Zip archive files.")
d5960bf7 1862 (home-page "http://search.cpan.org/dist/Archive-Zip/")
148585c2 1863 (license license:perl-license)))
06de4aaf
TF
1864
1865(define-public libzip
1866 (package
1867 (name "libzip")
77e62ee0 1868 (version "1.3.2")
06de4aaf
TF
1869 (source (origin
1870 (method url-fetch)
1871 (uri (string-append
8d6c7456 1872 "https://libzip.org/download/" name "-" version ".tar.xz"))
06de4aaf
TF
1873 (sha256
1874 (base32
77e62ee0 1875 "11g1hvm2bxa2v5plakfzcwyk5hb5fz4kgrkp38l0xhnv21888xv2"))))
06de4aaf
TF
1876 (native-inputs
1877 `(("perl" ,perl)))
1878 (inputs
1879 `(("zlib" ,zlib)))
1880 (build-system gnu-build-system)
8d6c7456 1881 (home-page "https://libzip.org")
06de4aaf
TF
1882 (synopsis "C library for reading, creating, and modifying zip archives")
1883 (description "Libzip is a C library for reading, creating, and modifying
1884zip archives. Files can be added from data buffers, files, or compressed data
1885copied directly from other zip archives. Changes made without closing the
1886archive can be reverted.")
1887 (license license:bsd-3)))
ef5c40aa
SR
1888
1889(define-public atool
1890 (package
1891 (name "atool")
1892 (version "0.39.0")
1893 (source
1894 (origin
1895 (method url-fetch)
1896 (uri (string-append "http://savannah.nongnu.org/download/atool/atool-"
1897 version ".tar.gz"))
1898 (sha256
1899 (base32
1900 "0fvhzip2v08jgnlfpyj6rapan39xlsl1ksgq4lp8gfsai2ah1xma"))))
1901 (build-system gnu-build-system)
1902 (arguments
1903 `(#:phases
1904 (modify-phases %standard-phases
1905 (add-after 'unpack 'embed-absolute-file-name
1906 (lambda* (#:key inputs #:allow-other-keys)
1907 (substitute* "atool"
1908 (("(^\\$::cfg_path_file.*= )'file'" _ pre)
1909 (string-append pre "'" (assoc-ref inputs "file")
1910 "/bin/file'")))
1911 #t)))))
1912 (inputs
1913 `(("perl" ,perl)
1914 ("file" ,file)))
340978d7 1915 (home-page "https://www.nongnu.org/atool/")
ef5c40aa
SR
1916 (synopsis "Universal tool to manage file archives of various types")
1917 (description "The main command is @command{aunpack} which extracts files
1918from an archive. The other commands provided are @command{apack} (to create
1919archives), @command{als} (to list files in archives), and @command{acat} (to
1920extract files to standard out). As @command{atool} invokes external programs
1921to handle the archives, not all commands may be supported for a certain type
1922of archives.")
1923 (license license:gpl2+)))
b44ecca6
P
1924
1925(define-public perl-archive-extract
1926 (package
1927 (name "perl-archive-extract")
1928 (version "0.80")
1929 (source
1930 (origin
1931 (method url-fetch)
1932 (uri (string-append "mirror://cpan/authors/id/B/BI/BINGOS/Archive-Extract-"
1933 version ".tar.gz"))
1934 (sha256
1935 (base32
1936 "1x15j1q6w6z8hqyqgap0lz4qbq2174wfhksy1fdd653ccbaw5jr5"))))
1937 (build-system perl-build-system)
1938 (home-page "http://search.cpan.org/dist/Archive-Extract/")
1939 (synopsis "Generic archive extracting mechanism")
1940 (description "It allows you to extract any archive file of the type .tar,
1941.tar.gz, .gz, .Z, tar.bz2, .tbz, .bz2, .zip, .xz,, .txz, .tar.xz or .lzma
1942without having to worry how it does so, or use different interfaces for each
1943type by using either Perl modules, or command-line tools on your system.")
1944 (license license:perl-license)))
b80027e5
JL
1945
1946(define-public java-tukaani-xz
1947 (package
1948 (name "java-tukaani-xz")
1949 (version "1.6")
1950 (source (origin
1951 (method url-fetch)
1952 (uri (string-append "https://tukaani.org/xz/xz-java-" version ".zip"))
1953 (sha256
1954 (base32
1955 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
1956 (build-system ant-build-system)
1957 (arguments
1958 `(#:tests? #f; no tests
1959 #:phases
1960 (modify-phases %standard-phases
1961 (add-after 'unpack 'chdir
1962 (lambda _
1963 ;; Our build system enters the first directory in the archive, but
1964 ;; the package is not contained in a subdirectory
1965 (chdir "..")))
1966 (replace 'install
1967 (lambda* (#:key outputs #:allow-other-keys)
1968 ;; Do we want to install *Demo.jar?
1969 (install-file "build/jar/xz.jar"
1970 (string-append
1971 (assoc-ref outputs "out")
1972 "/share/java/xz.jar")))))))
1973 (native-inputs
1974 `(("unzip" ,unzip)))
1975 (home-page "https://tukaani.org")
1976 (synopsis "XZ in Java")
1977 (description "Tukaani-xz is an implementation of xz compression/decompression
1978algorithms in Java.")
1979 (license license:public-domain)))
34e8cf22
TGR
1980
1981(define-public lunzip
1982 (package
1983 (name "lunzip")
83e8a302 1984 (version "1.10")
34e8cf22
TGR
1985 (source
1986 (origin
1987 (method url-fetch)
b7fd77ef 1988 (uri (string-append "mirror://savannah/lzip/"
34e8cf22
TGR
1989 name "/" name "-" version ".tar.gz"))
1990 (sha256
83e8a302 1991 (base32 "1iw59br6nsxs7l1p875h8w3vxwr04xfhg5zyal64crvamhxkj5kl"))))
34e8cf22
TGR
1992 (build-system gnu-build-system)
1993 (arguments
1994 `(#:configure-flags
1995 (list "CC=gcc")))
340978d7 1996 (home-page "https://www.nongnu.org/lzip/lunzip.html")
34e8cf22
TGR
1997 (synopsis "Small, stand-alone lzip decompressor")
1998 (description
1999 "Lunzip is a decompressor for files in the lzip compression format (.lz),
2000written as a single small C tool with no dependencies. This makes it
2001well-suited to embedded and other systems without a C++ compiler, or for use in
2002applications such as software installers that need only to decompress files,
2003not compress them.
2004Lunzip is intended to be fully compatible with the regular lzip package.")
2005 (license (list license:bsd-2 ; carg_parser.[ch]
2006 license:gpl2+)))) ; everything else
5dca4c76
TGR
2007
2008(define-public clzip
2009 (package
2010 (name "clzip")
d6d1643b 2011 (version "1.10")
5dca4c76
TGR
2012 (source
2013 (origin
2014 (method url-fetch)
b7fd77ef 2015 (uri (string-append "mirror://savannah/lzip/"
5dca4c76
TGR
2016 name "/" name "-" version ".tar.gz"))
2017 (sha256
d6d1643b 2018 (base32 "03xcmhl3dya4jrwmsqh09ikimpb36fr3vkh2bwfzz1sbcns0cdg3"))))
5dca4c76
TGR
2019 (build-system gnu-build-system)
2020 (arguments
2021 `(#:configure-flags
2022 (list "CC=gcc")))
340978d7 2023 (home-page "https://www.nongnu.org/lzip/clzip.html")
5dca4c76
TGR
2024 (synopsis "Small, stand-alone lzip compressor and decompressor")
2025 (description
2026 "Clzip is a compressor and decompressor for files in the lzip compression
2027format (.lz), written as a single small C tool with no dependencies. This makes
2028it well-suited to embedded and other systems without a C++ compiler, or for use
2029in other applications like package managers.
2030Clzip is intended to be fully compatible with the regular lzip package.")
2031 (license (list license:bsd-2 ; carg_parser.[ch], lzd in clzip.texi
2032 license:gpl2+))))
2e3b1a92
TGR
2033
2034(define-public lzlib
2035 (package
2036 (name "lzlib")
d1c1d835 2037 (version "1.10")
2e3b1a92
TGR
2038 (source
2039 (origin
2040 (method url-fetch)
b7fd77ef 2041 (uri (string-append "mirror://savannah/lzip/"
2e3b1a92
TGR
2042 name "/" name "-" version ".tar.gz"))
2043 (sha256
d1c1d835 2044 (base32 "0hqhnj2lzqacdbmmnpy91lsm1rd9zlngs1q6s9pyahsv1a0bfshx"))))
2e3b1a92
TGR
2045 (build-system gnu-build-system)
2046 ;; The included minilzip binary is only ~16 smaller than the ‘real’ lzip.
2047 ;; It's used during the test suite, but don't be tempted to install it.
2048 (arguments
2049 `(#:configure-flags
2050 (list "CC=gcc"
2051 "--enable-shared"))) ; only static (.a) is built by default
340978d7 2052 (home-page "https://www.nongnu.org/lzip/lzlib.html")
2e3b1a92
TGR
2053 (synopsis "Lzip data compression C library")
2054 (description
2055 "Lzlib is a C library for in-memory LZMA compression and decompression in
2056the lzip format. It supports integrity checking of the decompressed data, and
2057all functions are thread-safe. The library should never crash, even in case of
2058corrupted input.")
2059 (license (list license:bsd-2 ; the library itself
2060 license:gpl2+)))) ; main.c (i.e. minilzip used by tests)
8c4ca853
TGR
2061
2062(define-public plzip
2063 (package
2064 (name "plzip")
10cac630 2065 (version "1.7")
8c4ca853
TGR
2066 (source
2067 (origin
2068 (method url-fetch)
b7fd77ef 2069 (uri (string-append "mirror://savannah/lzip/"
8c4ca853
TGR
2070 name "/" name "-" version ".tar.gz"))
2071 (sha256
10cac630 2072 (base32 "1dzjp9r7krwpsn224bhcqbzd5aj5b4556sdi9yzl2bzbk3fjrqlm"))))
8c4ca853
TGR
2073 (build-system gnu-build-system)
2074 (inputs
2075 `(("lzlib" ,lzlib)))
340978d7 2076 (home-page "https://www.nongnu.org/lzip/plzip.html")
8c4ca853
TGR
2077 (synopsis "Parallel lossless data compressor for the lzip format")
2078 (description
2079 "Plzip is a massively parallel (multi-threaded) lossless data compressor
2080and decompressor that uses the lzip file format (.lz). Files produced by plzip
2081are fully compatible with lzip and can be rescued with lziprecover.
2082On multiprocessor machines, plzip can compress and decompress large files much
2083faster than lzip, at the cost of a slightly reduced compression ratio (0.4% to
20842%). The number of usable threads is limited by file size: on files of only a
2085few MiB, plzip is no faster than lzip.
2086Files that were compressed with regular lzip will also not be decompressed
2087faster by plzip, unless the @code{-b} option was used: lzip usually produces
2088single-member files which can't be decompressed in parallel.")
2089 (license (list license:bsd-2 ; arg_parser.{cc,h}
2090 license:gpl2+)))) ; everything else
e294c05e
RH
2091
2092(define-public innoextract
2093 (package
2094 (name "innoextract")
2095 (version "1.6")
2096 (source
2097 (origin
2098 (method url-fetch)
2099 (uri (string-append "https://github.com/dscharrer/innoextract/archive/"
2100 version ".tar.gz"))
2101 (sha256
2102 (base32
2103 "08sp5vbfjvq1irhhraqkn5m2x1z209r4axhx7laf1adcw30ccapi"))
2104 (file-name (string-append name "-" version ".tar.gz"))))
2105 (build-system cmake-build-system)
2106 (arguments
2107 `(#:tests? #f)) ;; No tests available.
2108 (inputs `(("boost" ,boost)
2109 ("libiconv" ,libiconv)
2110 ("xz" ,xz)))
2111 (native-inputs `(("pkg-config" ,pkg-config)))
2112 (home-page "https://constexpr.org/innoextract/")
2113 (synopsis "Tool for extracting Inno Setup installers")
2114 (description "innoextract allows extracting Inno Setup installers under
2115non-Windows systems without running the actual installer using wine.")
2116 (license license:zlib)))
2ed0ef2f
LF
2117
2118(define-public google-brotli
2119 (package
2120 (name "google-brotli")
2121 (version "1.0.2")
2122 (source (origin
2123 (method url-fetch)
2124 (uri (string-append "https://github.com/google/brotli/archive/v"
2125 version ".tar.gz"))
2126 (sha256
2127 (base32
2128 "08kl9gww2058p1p7j9xqmcmrabcfihhj3fq984d7fi3bchb2mky2"))))
2129 (build-system cmake-build-system)
2130 (arguments
2131 `(#:phases
2132 (modify-phases %standard-phases
2133 (add-after 'install 'rename-static-libraries
2134 ;; The build tools put a 'static' suffix on the static libraries, but
2135 ;; other applications don't know how to find these.
2136 (lambda* (#:key outputs #:allow-other-keys)
2137 (let ((lib (string-append (assoc-ref %outputs "out") "/lib/")))
2138 (rename-file (string-append lib "libbrotlicommon-static.a")
2139 (string-append lib "libbrotlicommon.a"))
2140 (rename-file (string-append lib "libbrotlidec-static.a")
2141 (string-append lib "libbrotlidec.a"))
2142 (rename-file (string-append lib "libbrotlienc-static.a")
2143 (string-append lib "libbrotlienc.a"))
2144 #t))))
2145 #:configure-flags
2146 (list ;; Defaults to "lib64" on 64-bit archs.
2147 (string-append "-DCMAKE_INSTALL_LIBDIR="
2148 (assoc-ref %outputs "out") "/lib"))))
2149 (home-page "https://github.com/google/brotli")
2150 (synopsis "General-purpose lossless compression")
2151 (description "This package provides the reference implementation of Brotli,
2152a generic-purpose lossless compression algorithm that compresses data using a
2153combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd
2154order context modeling, with a compression ratio comparable to the best
2155currently available general-purpose compression methods. It is similar in speed
2156with @code{deflate} but offers more dense compression.
2157
2158The specification of the Brotli Compressed Data Format is defined in RFC 7932.")
2159 (license license:expat)))