gnu: tarlz: Update to 0.19.
[jackhill/guix/guix.git] / gnu / packages / compression.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2017, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2014, 2015, 2018 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, 2017, 2018, 2020 Ricardo Wurmus <rekado@elephly.net>
8 ;;; Copyright © 2015, 2017, 2018 Leo Famulari <leo@famulari.name>
9 ;;; Copyright © 2015 Jeff Mickey <j@codemac.net>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 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–2021 Tobias Geerinckx-Rice <me@tobias.gr>
14 ;;; Copyright © 2016 David Craven <david@craven.ch>
15 ;;; Copyright © 2016, 2019, 2020 Kei Kebreau <kkebreau@posteo.net>
16 ;;; Copyright © 2016, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
17 ;;; Copyright © 2017 Nikita <nikita@n0.is>
18 ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
19 ;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
20 ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
21 ;;; Copyright © 2017 Petter <petter@mykolab.ch>
22 ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
23 ;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
24 ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
25 ;;; Copyright © 2018, 2019 Pierre Neidhardt <mail@ambrevar.xyz>
26 ;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
27 ;;; Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
28 ;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
29 ;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>
30 ;;; Copyright © 2020 Lars-Dominik Braun <lars@6xq.net>
31 ;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
32 ;;; Copyright © 2020 Léo Le Bouter <lle-bout@zaclys.net>
33 ;;; Copyright © 2021 Antoine Côté <antoine.cote@posteo.net>
34 ;;;
35 ;;; This file is part of GNU Guix.
36 ;;;
37 ;;; GNU Guix is free software; you can redistribute it and/or modify it
38 ;;; under the terms of the GNU General Public License as published by
39 ;;; the Free Software Foundation; either version 3 of the License, or (at
40 ;;; your option) any later version.
41 ;;;
42 ;;; GNU Guix is distributed in the hope that it will be useful, but
43 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
44 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45 ;;; GNU General Public License for more details.
46 ;;;
47 ;;; You should have received a copy of the GNU General Public License
48 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
49
50 (define-module (gnu packages compression)
51 #:use-module ((guix licenses) #:prefix license:)
52 #:use-module (guix utils)
53 #:use-module (guix packages)
54 #:use-module (guix download)
55 #:use-module (guix git-download)
56 #:use-module (guix build-system cmake)
57 #:use-module (guix build-system glib-or-gtk)
58 #:use-module (guix build-system gnu)
59 #:use-module (guix build-system go)
60 #:use-module (guix build-system meson)
61 #:use-module (guix build-system python)
62 #:use-module (guix build-system trivial)
63 #:use-module (gnu packages)
64 #:use-module (gnu packages assembly)
65 #:use-module (gnu packages autotools)
66 #:use-module (gnu packages backup)
67 #:use-module (gnu packages base)
68 #:use-module (gnu packages boost)
69 #:use-module (gnu packages check)
70 #:use-module (gnu packages curl)
71 #:use-module (gnu packages documentation)
72 #:use-module (gnu packages file)
73 #:use-module (gnu packages gettext)
74 #:use-module (gnu packages glib)
75 #:use-module (gnu packages gnome)
76 #:use-module (gnu packages gnupg)
77 #:use-module (gnu packages gtk)
78 #:use-module (gnu packages man)
79 #:use-module (gnu packages maths)
80 #:use-module (gnu packages perl)
81 #:use-module (gnu packages pkg-config)
82 #:use-module (gnu packages python)
83 #:use-module (gnu packages qt)
84 #:use-module (gnu packages tls)
85 #:use-module (gnu packages valgrind)
86 #:use-module (gnu packages version-control)
87 #:use-module (gnu packages xml)
88 #:use-module (ice-9 match)
89 #:use-module ((srfi srfi-1) #:select (last)))
90
91 (define-public zlib
92 (package
93 (name "zlib")
94 (version "1.2.11")
95 (source
96 (origin
97 (method url-fetch)
98 (uri (list (string-append "http://zlib.net/zlib-"
99 version ".tar.gz")
100 (string-append "mirror://sourceforge/libpng/zlib/"
101 version "/zlib-" version ".tar.gz")))
102 (sha256
103 (base32
104 "18dighcs333gsvajvvgqp8l4cx7h1x7yx9gd5xacnk80spyykrf3"))))
105 (build-system gnu-build-system)
106 (outputs '("out" "static"))
107 (arguments
108 `(#:phases
109 (modify-phases %standard-phases
110 (replace 'configure
111 (lambda* (#:key outputs #:allow-other-keys)
112 ;; Zlib's home-made `configure' fails when passed
113 ;; extra flags like `--enable-fast-install', so we need to
114 ;; invoke it with just what it understand.
115 (let ((out (assoc-ref outputs "out")))
116 ;; 'configure' doesn't understand '--host'.
117 ,@(if (%current-target-system)
118 `((setenv "CHOST" ,(%current-target-system)))
119 '())
120 (invoke "./configure"
121 (string-append "--prefix=" out)))))
122 (add-after 'install 'move-static-library
123 (lambda* (#:key outputs #:allow-other-keys)
124 (let ((out (assoc-ref outputs "out"))
125 (static (assoc-ref outputs "static")))
126 (with-directory-excursion (string-append out "/lib")
127 (install-file "libz.a" (string-append static "/lib"))
128 (delete-file "libz.a")
129 #t)))))))
130 (home-page "https://zlib.net/")
131 (synopsis "Compression library")
132 (description
133 "zlib is designed to be a free, general-purpose, legally unencumbered --
134 that is, not covered by any patents -- lossless data-compression library for
135 use on virtually any computer hardware and operating system. The zlib data
136 format is itself portable across platforms. Unlike the LZW compression method
137 used in Unix compress(1) and in the GIF image format, the compression method
138 currently used in zlib essentially never expands the data. (LZW can double or
139 triple the file size in extreme cases.) zlib's memory footprint is also
140 independent of the input data and can be reduced, if necessary, at some cost
141 in compression.")
142 (license license:zlib)))
143
144 (define-public minizip
145 (package
146 (name "minizip")
147 (version (package-version zlib))
148 (source (package-source zlib))
149 (build-system gnu-build-system)
150 (arguments
151 `(#:phases
152 (modify-phases %standard-phases
153 (add-after 'unpack 'enter-source
154 (lambda _ (chdir "contrib/minizip") #t))
155 (add-after 'install 'remove-crypt-h
156 (lambda* (#:key outputs #:allow-other-keys)
157 ;; Remove <minizip/crypt.h> because it interferes with libc's
158 ;; <crypt.h> given that 'minizip.pc' says "-I…/include/minizip".
159 ;; Fedora does the same:
160 ;; <https://src.fedoraproject.org/rpms/zlib/c/4d2785ec3116947872f6f32dc4104e6d36d8a7a4?branch=master>.
161 (let ((out (assoc-ref outputs "out")))
162 (delete-file (string-append out "/include/minizip/crypt.h"))
163 #t))))))
164 (native-inputs
165 `(("autoconf" ,autoconf)
166 ("automake" ,automake)
167 ("libtool" ,libtool)))
168 (propagated-inputs `(("zlib" ,zlib)))
169 (home-page (package-home-page zlib))
170 (synopsis "Zip Compression library")
171 (description
172 "Minizip is a minimalistic library that supports compressing,
173 extracting and viewing ZIP archives. This version is extracted from
174 the @code{zlib} source.")
175 (license (package-license zlib))))
176
177 (define-public fastjar
178 (package
179 (name "fastjar")
180 (version "0.98")
181 (source (origin
182 (method url-fetch)
183 (uri (string-append "mirror://savannah/fastjar/fastjar-"
184 version ".tar.gz"))
185 (sha256
186 (base32
187 "0iginbz2m15hcsa3x4y7v3mhk54gr1r7m3ghx0pg4n46vv2snmpi"))))
188 (build-system gnu-build-system)
189 (inputs `(("zlib" ,zlib)))
190 (home-page "https://savannah.nongnu.org/projects/fastjar")
191 (synopsis "Replacement for Sun's 'jar' utility")
192 (description
193 "FastJar is an attempt to create a much faster replacement for Sun's
194 @code{jar} utility. Instead of being written in Java, FastJar is written in C.")
195 (license license:gpl2+)))
196
197 (define-public libtar
198 (package
199 (name "libtar")
200 (version "1.2.20")
201 (source (origin
202 (method url-fetch)
203 (uri (list
204 (string-append
205 "ftp://ftp.feep.net/pub/software/libtar/libtar-"
206 version ".tar.gz")
207 (string-append
208 "mirror://debian/pool/main/libt/libtar/libtar_"
209 version ".orig.tar.gz")))
210 (sha256
211 (base32
212 "02cihzl77ia0dcz7z2cga2412vyhhs5pa2355q4wpwbyga2lrwjh"))
213 (patches (search-patches "libtar-CVE-2013-4420.patch"))))
214 (build-system gnu-build-system)
215 (arguments `(#:tests? #f)) ; no "check" target
216 (native-inputs
217 `(("autoconf" ,autoconf)
218 ("automake" ,automake)
219 ("libtool" ,libtool)))
220 (inputs
221 `(("zlib" ,zlib)))
222 (synopsis "C library for manipulating POSIX tar files")
223 (description
224 "libtar is a C library for manipulating POSIX tar files. It handles
225 adding and extracting files to/from a tar archive.")
226 (home-page "https://repo.or.cz/libtar.git")
227 (license license:bsd-3)))
228
229 (define-public gzip
230 (package
231 (name "gzip")
232 (version "1.10")
233 (source (origin
234 (method url-fetch)
235 (uri (string-append "mirror://gnu/gzip/gzip-"
236 version ".tar.xz"))
237 (sha256
238 (base32
239 "1h6p374d3j8d4cdfydzls021xa2yby8myc0h8d6m8bc7k6ncq9c4"))))
240 (build-system gnu-build-system)
241 (synopsis "General file (de)compression (using lzw)")
242 (arguments
243 ;; FIXME: The test suite wants `less', and optionally Perl.
244 '(#:tests? #f
245 #:phases
246 (modify-phases %standard-phases
247 (add-after 'unpack 'patch-for-glibc-2.28
248 (lambda _
249 ;; Adjust the bundled gnulib to work with glibc 2.28. See e.g.
250 ;; "m4-gnulib-libio.patch". This is a phase rather than patch
251 ;; or snippet to work around <https://bugs.gnu.org/32347>.
252 (substitute* (find-files "lib" "\\.c$")
253 (("#if defined _IO_ftrylockfile")
254 "#if defined _IO_EOF_SEEN"))
255 (substitute* "lib/stdio-impl.h"
256 (("^/\\* BSD stdio derived implementations")
257 (string-append "#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN\n"
258 "# define _IO_IN_BACKUP 0x100\n"
259 "#endif\n\n"
260 "/* BSD stdio derived implementations")))
261 #t))
262 (add-after 'unpack 'use-absolute-name-of-gzip
263 (lambda* (#:key outputs #:allow-other-keys)
264 (substitute* "gunzip.in"
265 (("exec gzip")
266 (string-append "exec " (assoc-ref outputs "out")
267 "/bin/gzip")))
268 #t)))))
269 (description
270 "GNU Gzip provides data compression and decompression utilities; the
271 typical extension is \".gz\". Unlike the \"zip\" format, it compresses a single
272 file; as a result, it is often used in conjunction with \"tar\", resulting in
273 \".tar.gz\" or \".tgz\", etc.")
274 (license license:gpl3+)
275 (home-page "https://www.gnu.org/software/gzip/")))
276
277 (define-public bzip2
278 (package
279 (name "bzip2")
280 (version "1.0.8")
281 (source (origin
282 (method url-fetch)
283 (uri (string-append "https://sourceware.org/pub/bzip2/bzip2-"
284 version ".tar.gz"))
285 (sha256
286 (base32
287 "0s92986cv0p692icqlw1j42y9nld8zd83qwhzbqd61p1dqbh6nmb"))))
288 (build-system gnu-build-system)
289 (arguments
290 `(#:modules ((guix build gnu-build-system)
291 (guix build utils)
292 (ice-9 ftw)
293 (srfi srfi-1))
294 #:phases
295 (modify-phases %standard-phases
296 (add-after 'set-paths 'hide-input-bzip2
297 (lambda* (#:key inputs #:allow-other-keys)
298 (let ((bzip2 (assoc-ref inputs "bzip2")))
299 (if bzip2
300 ;; Prevent the build system from retaining a reference to
301 ;; BZIP2 from INPUTS.
302 (begin
303 (setenv "LIBRARY_PATH"
304 (string-join (delete (string-append bzip2 "/lib")
305 (string-split (getenv "LIBRARY_PATH")
306 #\:))
307 ":"))
308 (format #t "environment variable `LIBRARY_PATH' set to `~a'~%"
309 (getenv "LIBRARY_PATH")))
310 (format #t "no bzip2 found, nothing done~%"))
311 #t)))
312 (replace 'configure
313 (lambda* (#:key target #:allow-other-keys)
314 (when ,(%current-target-system)
315 ;; Cross-compilation: use the cross tools.
316 (substitute* (find-files "." "Makefile")
317 (("CC=.*$")
318 (string-append "CC = " target "-gcc\n"))
319 (("AR=.*$")
320 (string-append "AR = " target "-ar\n"))
321 (("RANLIB=.*$")
322 (string-append "RANLIB = " target "-ranlib\n"))
323 (("^all:(.*)test" _ prerequisites)
324 ;; Remove 'all' -> 'test' dependency.
325 (string-append "all:" prerequisites "\n"))))
326 #t))
327 (add-before 'build 'build-shared-lib
328 (lambda* (#:key inputs #:allow-other-keys)
329 (patch-makefile-SHELL "Makefile-libbz2_so")
330 (invoke "make" "-f" "Makefile-libbz2_so")))
331 (add-after 'install 'install-shared-lib
332 (lambda* (#:key outputs #:allow-other-keys)
333 ;; The Makefile above does not have an 'install' target, nor does
334 ;; it create all the (un)versioned symlinks, so we handle it here.
335 (let* ((out (assoc-ref outputs "out"))
336 (libdir (string-append out "/lib"))
337 (soname "libbz2.so")
338 ;; Locate the built library (e.g. "libbz2.so.1.0.6").
339 (lib (car (scandir "."
340 (lambda (file)
341 (and (string-prefix? soname file)
342 (eq? 'regular
343 (stat:type (lstat file))))))))
344 (soversion (string-drop lib (+ 1 (string-length soname)))))
345 (install-file lib libdir)
346 (with-directory-excursion libdir
347 ;; Create symlinks libbz2.so.1 -> libbz2.so.1.0, etc.
348 (let loop ((base soname)
349 (numbers (string-split soversion #\.)))
350 (unless (null? numbers)
351 (let ((so-file (string-append base "." (car numbers))))
352 (symlink so-file base)
353 (loop so-file (cdr numbers))))))
354 #t)))
355 (add-after 'install-shared-lib 'move-static-lib
356 (lambda* (#:key outputs #:allow-other-keys)
357 (let ((out (assoc-ref outputs "out"))
358 (static (assoc-ref outputs "static")))
359 (with-directory-excursion (string-append out "/lib")
360 (install-file "libbz2.a" (string-append static "/lib"))
361 (delete-file "libbz2.a")
362 #t))))
363 (add-after 'install-shared-lib 'patch-scripts
364 (lambda* (#:key outputs inputs #:allow-other-keys)
365 (let* ((out (assoc-ref outputs "out")))
366 (substitute* (string-append out "/bin/bzdiff")
367 (("/bin/rm") "rm")))
368 #t)))
369
370 #:make-flags (list (string-append "PREFIX="
371 (assoc-ref %outputs "out")))
372
373 ;; Don't attempt to run the tests when cross-compiling.
374 ,@(if (%current-target-system)
375 '(#:tests? #f)
376 '())))
377 (outputs '("out" "static"))
378 (synopsis "High-quality data compression program")
379 (description
380 "bzip2 is a freely available, patent free (see below), high-quality data
381 compressor. It typically compresses files to within 10% to 15% of the best
382 available techniques (the PPM family of statistical compressors), whilst
383 being around twice as fast at compression and six times faster at
384 decompression.")
385 (license (license:non-copyleft "file://LICENSE"
386 "See LICENSE in the distribution."))
387 (home-page "https://web.archive.org/web/20180801004107/http://www.bzip.org/")))
388
389 (define-public lbzip2
390 ;; The last 2.5 release is 4 years behind the newest commit (from 2018) and
391 ;; may create files that can't even be decompressed by newer bzip2 versions.
392 (let ((commit "b6dc48a7b9bfe6b340ed1f6d72133608ad57144b")
393 (revision "0"))
394 (package
395 (name "lbzip2")
396 (version (git-version "2.5" revision commit))
397 (source
398 (origin
399 (method git-fetch)
400 (uri (git-reference
401 (url "https://github.com/kjn/lbzip2")
402 (commit commit)))
403 (sha256
404 (base32 "140xp00dmjsr6c3dwb4dwf0pzlgf159igri321inbinsjiclkngy"))
405 (file-name (git-file-name name version))))
406 (build-system gnu-build-system)
407 (arguments
408 `(#:phases
409 (modify-phases %standard-phases
410 (add-after 'unpack 'unpack-gnulib
411 (lambda* (#:key inputs #:allow-other-keys)
412 (let ((gnulib (assoc-ref inputs "gnulib")))
413 (copy-recursively gnulib "lib")
414 (setenv "PATH" (string-append "lib:" (getenv "PATH")))
415 #t)))
416 (delete 'bootstrap) ; gnulib still has unpatched shebangs
417 (add-after 'patch-source-shebangs 'bootstrap
418 (lambda _
419 (invoke "sh" "build-aux/autogen.sh")
420 #t)))))
421 (native-inputs
422 `(("autoconf" ,autoconf)
423 ("automake" ,automake)
424 ("gnulib"
425 ,(let ((commit "2d431ac35c4943a3655c07ba91870d2323321b43"))
426 (origin
427 (method git-fetch)
428 (uri (git-reference
429 (url "git://git.savannah.gnu.org/gnulib.git")
430 (commit commit)))
431 (sha256
432 (base32 "1f0xr4w89bqvhzsfcflcagdixidrk41k00k7kpr91w9lazfis4kf"))
433 (file-name (git-file-name "gnulib" commit)))))
434 ("perl" ,perl)))
435 (synopsis "Parallel bzip2 compression utility")
436 (description
437 "lbzip2 is a multi-threaded compression utility with support for the
438 bzip2 compressed file format. lbzip2 can process standard bz2 files in
439 parallel. It uses POSIX threading model (pthreads), which allows it to take
440 full advantage of symmetric multiprocessing (SMP) systems. It has been proven
441 to scale linearly, even to over one hundred processor cores. lbzip2 is fully
442 compatible with bzip2 – both at file format and command line level.")
443 ;; lbzip2.org now looks fishy. There is no source code to be found.
444 ;; Reported upstream: <https://github.com/kjn/lbzip2/issues/26>.
445 (home-page "https://github.com/kjn/lbzip2")
446 (license license:gpl3+))))
447
448 (define-public pbzip2
449 (package
450 (name "pbzip2")
451 (version "1.1.13")
452 (source (origin
453 (method url-fetch)
454 (uri (string-append "https://launchpad.net/pbzip2/"
455 (version-major+minor version) "/" version
456 "/+download/" name "-" version ".tar.gz"))
457 (sha256
458 (base32
459 "1rnvgcdixjzbrmcr1nv9b6ccrjfrhryaj7jwz28yxxv6lam3xlcg"))))
460 (build-system gnu-build-system)
461 (inputs
462 `(("bzip2" ,bzip2)))
463 (arguments
464 `(#:tests? #f ; no tests
465 #:phases (modify-phases %standard-phases
466 (delete 'configure)) ; no configure script
467 #:make-flags (list (string-append "PREFIX=" %output))))
468 (home-page (string-append "https://web.archive.org/web/20180412020219/"
469 "http://compression.ca/pbzip2/"))
470 (synopsis "Parallel bzip2 implementation")
471 (description
472 "Pbzip2 is a parallel implementation of the bzip2 block-sorting file
473 compressor that uses pthreads and achieves near-linear speedup on SMP machines.
474 The output of this version is fully compatible with bzip2 v1.0.2 (i.e. anything
475 compressed with pbzip2 can be decompressed with bzip2).")
476 (license (license:non-copyleft "file://COPYING"
477 "See COPYING in the distribution."))))
478
479 (define-public xz
480 (package
481 (name "xz")
482 (version "5.2.4")
483 (source (origin
484 (method url-fetch)
485 (uri (list (string-append "http://tukaani.org/xz/xz-" version
486 ".tar.gz")
487 (string-append "http://multiprecision.org/guix/xz-"
488 version ".tar.gz")))
489 (sha256
490 (base32
491 "0ibi2zsfaz6l756spjwc5rayf4ckgc9hwmy8qinppcyk4svz64mm"))))
492 (build-system gnu-build-system)
493 (arguments
494 `(#:phases
495 (modify-phases %standard-phases
496 (add-after 'install 'move-static-lib
497 (lambda* (#:key outputs #:allow-other-keys)
498 (let ((out (assoc-ref outputs "out"))
499 (static (assoc-ref outputs "static")))
500 (mkdir-p (string-append static "/lib"))
501 (rename-file (string-append out "/lib/liblzma.a")
502 (string-append static "/lib/liblzma.a"))
503 ;; Remove reference to the static library from the .la file
504 ;; so Libtool does the right thing when both the shared and
505 ;; static library is available.
506 (substitute* (string-append out "/lib/liblzma.la")
507 (("^old_library='liblzma.a'") "old_library=''"))
508 #t))))))
509 (outputs '("out" "static"))
510 (synopsis "General-purpose data compression")
511 (description
512 "XZ Utils is free general-purpose data compression software with high
513 compression ratio. XZ Utils were written for POSIX-like systems, but also
514 work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils.
515
516 The core of the XZ Utils compression code is based on LZMA SDK, but it has
517 been modified quite a lot to be suitable for XZ Utils. The primary
518 compression algorithm is currently LZMA2, which is used inside the .xz
519 container format. With typical files, XZ Utils create 30 % smaller output
520 than gzip and 15 % smaller output than bzip2.")
521 (license (list license:gpl2+ license:lgpl2.1+)) ; bits of both
522 (home-page "https://tukaani.org/xz/")))
523
524 (define-public lhasa
525 (package
526 (name "lhasa")
527 (version "0.3.1")
528 (source (origin
529 (method url-fetch)
530 (uri (string-append
531 "https://github.com/fragglet/lhasa/releases/download/v"
532 version "/lhasa-" version ".tar.gz"))
533 (sha256
534 (base32
535 "092zi9av18ma20c6h9448k0bapvx2plnp292741dvfd9hmgqxc1z"))))
536 (build-system gnu-build-system)
537 (arguments
538 '(#:phases
539 (modify-phases %standard-phases
540 (add-before 'check 'set-up-test-environment
541 (lambda* (#:key inputs #:allow-other-keys)
542 (setenv "TZDIR" (string-append (assoc-ref inputs "tzdata")
543 "/share/zoneinfo"))
544 #t)))))
545 (native-inputs
546 `(("tzdata" ,tzdata-for-tests)))
547 (home-page "https://fragglet.github.com/lhasa/")
548 (synopsis "LHA archive decompressor")
549 (description "Lhasa is a replacement for the Unix LHA tool, for
550 decompressing .lzh (LHA / LHarc) and .lzs (LArc) archives. The backend for the
551 tool is a library, so that it can be reused for other purposes. Lhasa aims to
552 be compatible with as many types of lzh/lzs archives as possible. It also aims
553 to generate the same output as the (non-free) Unix LHA tool, so that it will
554 act as a free drop-in replacement.")
555 (license license:isc)))
556
557 (define-public lzo
558 (package
559 (name "lzo")
560 (version "2.10")
561 (source
562 (origin
563 (method url-fetch)
564 (uri (string-append "http://www.oberhumer.com/opensource/lzo/download/lzo-"
565 version ".tar.gz"))
566 (sha256
567 (base32
568 "0wm04519pd3g8hqpjqhfr72q8qmbiwqaxcs3cndny9h86aa95y60"))))
569 (build-system gnu-build-system)
570 (arguments '(#:configure-flags '("--enable-shared")))
571 (home-page "http://www.oberhumer.com/opensource/lzo")
572 (synopsis
573 "Data compression library suitable for real-time data de-/compression")
574 (description
575 "LZO is a data compression library which is suitable for data
576 de-/compression in real-time. This means it favours speed over
577 compression ratio.
578
579 LZO is written in ANSI C. Both the source code and the compressed data
580 format are designed to be portable across platforms.")
581 (license license:gpl2+)))
582
583 (define-public lzop
584 (package
585 (name "lzop")
586 (version "1.04")
587 (source
588 (origin
589 (method url-fetch)
590 (uri (string-append "http://www.lzop.org/download/lzop-"
591 version ".tar.gz"))
592 (sha256
593 (base32
594 "0h9gb8q7y54m9mvy3jvsmxf21yx8fc3ylzh418hgbbv0i8mbcwky"))))
595 (build-system gnu-build-system)
596 (inputs `(("lzo" ,lzo)))
597 (home-page "https://www.lzop.org/")
598 (synopsis "Compress or expand files")
599 (description
600 "Lzop is a file compressor which is very similar to gzip. Lzop uses the
601 LZO data compression library for compression services, and its main advantages
602 over gzip are much higher compression and decompression speed (at the cost of
603 some compression ratio).")
604 (license license:gpl2+)))
605
606 (define-public lzip
607 (package
608 (name "lzip")
609 (version "1.21")
610 (source (origin
611 (method url-fetch)
612 (uri (string-append "mirror://savannah/lzip/lzip-"
613 version ".tar.gz"))
614 (sha256
615 (base32
616 "12qdcw5k1cx77brv9yxi1h4dzwibhfmdpigrj43nfk8nscwm12z4"))))
617 (build-system gnu-build-system)
618 (home-page "https://www.nongnu.org/lzip/lzip.html")
619 (synopsis "Lossless data compressor based on the LZMA algorithm")
620 (description
621 "Lzip is a lossless data compressor with a user interface similar to the
622 one of gzip or bzip2. Lzip decompresses almost as fast as gzip and compresses
623 more than bzip2, which makes it well-suited for software distribution and data
624 archiving. Lzip is a clean implementation of the LZMA algorithm.")
625 (license license:gpl3+)))
626
627 (define-public lziprecover
628 (package
629 (name "lziprecover")
630 (version "1.22")
631 (source (origin
632 (method url-fetch)
633 (uri (string-append "mirror://savannah/lzip/lziprecover/"
634 "lziprecover-" version ".tar.gz"))
635 (sha256
636 (base32
637 "0qh8dnhr5rly2k9dnx43qqynqwqzi5kfb15pyd29qwppfl4qm5gx"))))
638 (build-system gnu-build-system)
639 (home-page "https://www.nongnu.org/lzip/lziprecover.html")
640 (synopsis "Recover and decompress data from damaged lzip files")
641 (description
642 "Lziprecover is a data recovery tool and decompressor for files in the lzip
643 compressed data format (.lz). It can test the integrity of lzip files, extract
644 data from damaged ones, and repair most files with small errors (up to one
645 single-byte error per member) entirely.
646
647 Lziprecover is not a replacement for regular backups, but a last line of defence
648 when even the backups are corrupt. It can recover files by merging the good
649 parts of two or more damaged copies, such as can be easily produced by running
650 @command{ddrescue} on a failing device.
651
652 This package also includes @command{unzcrash}, a tool to test the robustness of
653 decompressors when faced with corrupted input.")
654 (license (list license:bsd-2 ; arg_parser.{cc,h}
655 license:gpl2+)))) ; everything else
656
657 (define-public sharutils
658 (package
659 (name "sharutils")
660 (version "4.15.2")
661 (source
662 (origin
663 (method url-fetch)
664 (uri (string-append "mirror://gnu/sharutils/sharutils-"
665 version ".tar.xz"))
666 (patches (search-patches "sharutils-CVE-2018-1000097.patch"))
667 (sha256
668 (base32
669 "16isapn8f39lnffc3dp4dan05b7x6mnc76v6q5nn8ysxvvvwy19b"))
670 (modules '((guix build utils)))
671 (snippet
672 '(begin
673 (substitute* (find-files "lib" "\\.c$")
674 (("#if defined _IO_ftrylockfile")
675 "#if defined _IO_EOF_SEEN"))
676 (substitute* "lib/stdio-impl.h"
677 (("^/\\* BSD stdio derived implementations")
678 (string-append "#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN\n"
679 "# define _IO_IN_BACKUP 0x100\n"
680 "#endif\n\n"
681 "/* BSD stdio derived implementations")))
682 #t))))
683 (build-system gnu-build-system)
684 (inputs
685 `(("which" ,which)))
686 (arguments
687 `(#:phases
688 (modify-phases %standard-phases
689 (add-after 'patch-source-shebangs 'unpatch-source-shebang
690 ;; revert the patch-shebang phase on a script which is
691 ;; in fact test data
692 (lambda _
693 (substitute* "tests/shar-1.ok"
694 (((which "sh")) "/bin/sh"))
695 #t)))))
696 (home-page "https://www.gnu.org/software/sharutils/")
697 (synopsis "Archives in shell scripts, uuencode/uudecode")
698 (description
699 "GNU sharutils is a package for creating and manipulating shell
700 archives that can be readily emailed. A shell archive is a file that can be
701 processed by a Bourne-type shell to unpack the original collection of files.
702 This package is mostly for compatibility and historical interest.")
703 (license license:gpl3+)))
704
705 (define-public sfarklib
706 (package
707 (name "sfarklib")
708 (version "2.24")
709 (source (origin
710 (method git-fetch)
711 (uri (git-reference
712 (url "https://github.com/raboof/sfArkLib")
713 (commit version)))
714 (file-name (git-file-name name version))
715 (sha256
716 (base32
717 "0jrxy24gak7q5ml06p5jjgzk9i5r2mkfjk4ycirkp4kg7k5a237w"))))
718 (build-system gnu-build-system)
719 (arguments
720 `(#:tests? #f ;no "check" target
721 #:phases
722 (modify-phases %standard-phases
723 (replace 'configure
724 (lambda* (#:key outputs #:allow-other-keys)
725 (substitute* "Makefile"
726 (("/usr/local") (assoc-ref outputs "out")))
727 #t)))))
728 (inputs
729 `(("zlib" ,zlib)))
730 (home-page "https://github.com/raboof/sfArkLib")
731 (synopsis "Library for SoundFont decompression")
732 (description
733 "SfArkLib is a C++ library for decompressing SoundFont files compressed
734 with the sfArk algorithm.")
735 (license license:gpl3+)))
736
737 (define-public sfarkxtc
738 (let ((commit "13cd6f93725a90d91ec5ea75babf1dbd694ac463")
739 (revision "1"))
740 (package
741 (name "sfarkxtc")
742 (version (git-version "0" revision commit))
743 (source (origin
744 ;; There are no release tarballs, so we just fetch the latest
745 ;; commit at this time.
746 (method git-fetch)
747 (uri (git-reference
748 (url "https://github.com/raboof/sfarkxtc")
749 (commit commit)))
750 (file-name (git-file-name name version))
751 (sha256
752 (base32
753 "1mb1jyk1m11l1gppd9hmql9cyp55sdf7jk5rbc7acky1z4k4mv19"))))
754 (build-system gnu-build-system)
755 (arguments
756 `(#:tests? #f ;no "check" target
757 #:phases
758 (modify-phases %standard-phases
759 (replace 'configure
760 (lambda* (#:key outputs #:allow-other-keys)
761 (substitute* "Makefile"
762 (("/usr/local") (assoc-ref outputs "out")))
763 #t)))))
764 (inputs
765 `(("zlib" ,zlib)
766 ("sfarklib" ,sfarklib)))
767 (home-page "https://github.com/raboof/sfarkxtc")
768 (synopsis "Basic sfArk decompressor")
769 (description "SfArk extractor converts SoundFonts in the compressed legacy
770 sfArk file format to the uncompressed sf2 format.")
771 (license license:gpl3+))))
772
773 (define-public libmspack
774 (package
775 (name "libmspack")
776 (home-page "https://cabextract.org.uk/libmspack/")
777 (version "0.10.1")
778 (source
779 (origin
780 (method url-fetch)
781 (uri (string-append home-page name "-" version "alpha.tar.gz"))
782 (sha256
783 (base32 "13janaqsvm7aqc4agjgd4819pbgqv50j88bh5kci1z70wvg65j5s"))))
784 (build-system gnu-build-system)
785 (arguments
786 `(#:configure-flags '("--disable-static")))
787 (synopsis "Compression tools for some formats used by Microsoft")
788 (description
789 "The purpose of libmspack is to provide both compression and
790 decompression of some loosely related file formats used by Microsoft.")
791 (license license:lgpl2.1+)))
792
793 (define-public lz4
794 (package
795 (name "lz4")
796 (version "1.9.3")
797 (source
798 (origin
799 (method git-fetch)
800 (uri (git-reference (url "https://github.com/lz4/lz4")
801 (commit (string-append "v" version))))
802 (sha256
803 (base32 "1w02kazh1fps3sji2sn89fz862j1199c5ajrqcgl1bnlxj09kcbz"))
804 (file-name (git-file-name name version))))
805 (build-system gnu-build-system)
806 (outputs (list "out" "static"))
807 (native-inputs
808 `(;; For tests.
809 ("python" ,python)
810 ("valgrind" ,valgrind)))
811 (arguments
812 `(#:test-target "test"
813 #:make-flags (list (string-append "CC=" ,(cc-for-target))
814 (string-append "prefix=" (assoc-ref %outputs "out")))
815 #:phases
816 (modify-phases %standard-phases
817 (delete 'configure) ; no configure script
818 (add-before 'check 'disable-broken-test
819 (lambda _
820 (substitute* "tests/Makefile"
821 ;; This fails when $prefix is not a single top-level directory.
822 (("^test: (.*) test-install" _ targets)
823 (string-append "test: " targets)))
824 #t))
825 (add-after 'install 'move-static-library
826 (lambda* (#:key outputs #:allow-other-keys)
827 (let ((out (assoc-ref outputs "out"))
828 (static (assoc-ref outputs "static")))
829 (mkdir-p (string-append static "/lib"))
830 (rename-file (string-append out "/lib/liblz4.a")
831 (string-append static "/lib/liblz4.a"))
832 #t))))))
833 (home-page "https://www.lz4.org")
834 (synopsis "Compression algorithm focused on speed")
835 (description "LZ4 is a lossless compression algorithm, providing
836 compression speed at 400 MB/s per core (0.16 Bytes/cycle). It also features an
837 extremely fast decoder, with speed in multiple GB/s per core (0.71 Bytes/cycle).
838 A high compression derivative, called LZ4_HC, is also provided. It trades CPU
839 time for compression ratio.")
840 ;; The libraries (lz4, lz4hc, and xxhash) are BSD licenced. The command
841 ;; line interface programs (lz4, fullbench, fuzzer, datagen) are GPL2+.
842 (license (list license:bsd-2 license:gpl2+))))
843
844 (define-public squashfs-tools
845 (package
846 (name "squashfs-tools")
847 (version "4.4")
848 (source (origin
849 (method url-fetch)
850 (uri (string-append "mirror://sourceforge/squashfs/squashfs/"
851 "squashfs" version "/"
852 "squashfs" version ".tar.gz"))
853 (sha256
854 (base32
855 "0zmhvczscqz0mzh4b9m8m42asq14db0a6lc8clp5ljq5ybrv70d9"))))
856 (build-system gnu-build-system)
857 (arguments
858 `(#:tests? #f ; no check target
859 #:make-flags
860 (list (string-append "CC=" ,(cc-for-target))
861 "XZ_SUPPORT=1"
862 "LZO_SUPPORT=1"
863 "LZ4_SUPPORT=1"
864 (string-append "INSTALL_DIR=" %output "/bin"))
865 #:phases
866 (modify-phases %standard-phases
867 (replace 'configure
868 (lambda _
869 (chdir "squashfs-tools")
870 #t)))))
871 (inputs
872 `(("lz4" ,lz4)
873 ("lzo" ,lzo)
874 ("xz" ,xz)
875 ("zlib" ,zlib)))
876 (home-page "https://github.com/plougher/squashfs-tools")
877 (synopsis "Tools to create and extract squashfs file systems")
878 (description
879 "Squashfs is a highly compressed read-only file system for Linux. It uses
880 zlib to compress files, inodes, and directories. All blocks are packed to
881 minimize the data overhead, and block sizes of between 4K and 1M are supported.
882 It is intended to be used for archival use, for live CDs, and for embedded
883 systems where low overhead is needed. This package allows you to create and
884 extract such file systems.")
885 (license license:gpl2+)))
886
887 (define-public pigz
888 (package
889 (name "pigz")
890 (version "2.4")
891 (source (origin
892 (method url-fetch)
893 (uri (string-append "http://zlib.net/pigz/"
894 name "-" version ".tar.gz"))
895 (sha256
896 (base32
897 "0wsgw5vwl23jrnpsvd8v3xcp5k4waw5mk0164fynjhkv58i1dy54"))))
898 (build-system gnu-build-system)
899 (arguments
900 `(#:phases
901 (modify-phases %standard-phases
902 (delete 'configure)
903 (replace 'install
904 (lambda* (#:key outputs #:allow-other-keys)
905 (let* ((out (assoc-ref outputs "out"))
906 (bin (string-append out "/bin"))
907 (man (string-append out "/share/man/man1")))
908 (install-file "pigz" bin)
909 (symlink "pigz" (string-append bin "/unpigz"))
910 (install-file "pigz.1" man)
911 #t))))
912 #:make-flags
913 (list ,(string-append "CC=" (cc-for-target)))
914 #:test-target "tests"))
915 (inputs `(("zlib" ,zlib)))
916 (home-page "https://zlib.net/pigz/")
917 (synopsis "Parallel implementation of gzip")
918 (description
919 "This package provides a parallel implementation of gzip that exploits
920 multiple processors and multiple cores when compressing data.")
921
922 ;; Things under zopfli/ are under ASL2.0, but 4 files at the top-level,
923 ;; written by Mark Adler, are under another non-copyleft license.
924 (license license:asl2.0)))
925
926 (define-public pixz
927 (package
928 (name "pixz")
929 (version "1.0.7")
930 (source (origin
931 (method url-fetch)
932 (uri (string-append
933 "https://github.com/vasi/pixz/releases/download/v" version
934 "/pixz-" version ".tar.xz"))
935 (sha256
936 (base32
937 "1ifxr18f2h75gkcrkx8033kwmwmrcgxshpaawyc2n4dzn1p2rqz5"))))
938 (build-system gnu-build-system)
939 (native-inputs
940 `(("pkg-config" ,pkg-config)
941 ("libarchive" ,libarchive)))
942 (home-page "https://github.com/vasi/pixz")
943 (synopsis "Parallel indexing implementation of LZMA")
944 (description
945 "The existing XZ Utils provide great compression in the .xz file format,
946 but they produce just one big block of compressed data. Pixz instead produces
947 a collection of smaller blocks which makes random access to the original data
948 possible and can compress in parallel. This is especially useful for large
949 tarballs.")
950 (license license:bsd-2)))
951
952 (define-public bsdiff
953 (package
954 (name "bsdiff")
955 (version "4.3")
956 (home-page "https://www.daemonology.net/bsdiff/")
957 (source (origin
958 (method url-fetch)
959 (uri (string-append home-page name "-" version ".tar.gz"))
960 (sha256
961 (base32
962 "0j2zm3z271x5aw63mwhr3vymzn45p2vvrlrpm9cz2nywna41b0hq"))))
963 (build-system gnu-build-system)
964 (arguments
965 `(#:make-flags (list "INSTALL=install"
966 (string-append "CC=" ,(cc-for-target))
967 (string-append "PREFIX=" (assoc-ref %outputs "out")))
968 #:phases (modify-phases %standard-phases
969 (delete 'configure)
970 (add-before 'build 'fix-Makefile
971 (lambda _
972 (substitute* "Makefile"
973 ;; Adjust syntax to make it compatible with GNU Make.
974 (("^\\.") "")
975 ;; Help install(1) create the target directory.
976 (("\\$\\{PREFIX\\}") "-D -t ${PREFIX}"))
977 #t)))
978 #:tests? #f)) ;no tests
979 (inputs
980 `(("bzip2" ,bzip2)))
981 (synopsis "Patch binary files")
982 (description
983 "@command{bsdiff} and @command{bspatch} are tools for building and
984 applying patches to binary files. By using suffix sorting (specifically
985 Larsson and Sadakane's @code{qsufsort}) and taking advantage of how
986 executable files change, bsdiff routinely produces binary patches 50-80%
987 smaller than those produced by @code{Xdelta}.")
988 (license license:bsd-2)))
989
990 (define-public cabextract
991 (package
992 (name "cabextract")
993 (home-page "https://cabextract.org.uk/")
994 (version "1.9.1")
995 (source (origin
996 (method url-fetch)
997 (uri (string-append home-page "cabextract-" version ".tar.gz"))
998 (sha256
999 (base32
1000 "19qwhl2r8ip95q4vxzxg2kp4p125hjmc9762sns1dwwf7ikm7hmg"))
1001 (modules '((guix build utils)))
1002 (snippet
1003 '(begin
1004 ;; Delete bundled libmspack.
1005 (delete-file-recursively "mspack")
1006 #t))))
1007 (build-system gnu-build-system)
1008 (arguments
1009 '(#:configure-flags '("--with-external-libmspack")
1010 #:phases
1011 (modify-phases %standard-phases
1012 ;; cabextract needs some of libmspack's header files.
1013 ;; These are located in the "mspack" directory of libmspack.
1014 (add-before 'build 'unpack-libmspack
1015 (lambda* (#:key inputs #:allow-other-keys)
1016 (let ((dir-name "libmspack-src"))
1017 (mkdir dir-name)
1018 (invoke "tar" "-xvf" (assoc-ref inputs "libmspack-source")
1019 "-C" dir-name "--strip-components" "1")
1020 (rename-file (string-append dir-name "/mspack")
1021 "mspack")
1022 (delete-file-recursively dir-name)
1023 #t))))))
1024 (native-inputs
1025 `(("pkg-config" ,pkg-config)))
1026 (inputs
1027 `(("libmspack" ,libmspack)
1028 ("libmspack-source" ,(package-source libmspack))))
1029 (synopsis "Tool to unpack Cabinet archives")
1030 (description "Extracts files out of Microsoft Cabinet (.cab) archives")
1031 ;; Some source files specify gpl2+, lgpl2+, however COPYING is gpl3.
1032 (license license:gpl3+)))
1033
1034 (define-public libjcat
1035 (package
1036 (name "libjcat")
1037 (version "0.1.5")
1038 (source
1039 (origin
1040 (method git-fetch)
1041 (uri
1042 (git-reference
1043 (url "https://github.com/hughsie/libjcat")
1044 (commit version)))
1045 (file-name (git-file-name name version))
1046 (sha256
1047 (base32 "0rxyqikdhkh2nq1y0hy05df2kkxf3d2cp6lm5x1s5i717k6y3zy5"))))
1048 (build-system meson-build-system)
1049 (native-inputs
1050 `(("gobject-introspection" ,gobject-introspection)
1051 ("help2man" ,help2man)
1052 ("pkg-config" ,pkg-config)))
1053 (inputs
1054 `(("git" ,git)
1055 ("glib" ,glib)
1056 ("gnupg" ,gnupg)
1057 ("gnutls" ,gnutls)
1058 ("gpgme" ,gpgme)
1059 ("json-glib" ,json-glib)
1060 ("vala" ,vala)))
1061 (home-page "https://github.com/hughsie/libjcat")
1062 (synopsis "Library for reading and writing Jcat files")
1063 (description
1064 "This library allows reading and writing gzip-compressed JSON catalog
1065 files, which can be used to store GPG, PKCS-7 and SHA-256 checksums for each
1066 file.")
1067 (license license:lgpl2.1+)))
1068
1069 (define-public xdelta
1070 (package
1071 (name "xdelta")
1072 (version "3.1.0")
1073 (source
1074 (origin
1075 (method git-fetch)
1076 (uri (git-reference
1077 (url "https://github.com/jmacd/xdelta")
1078 (commit (string-append "v" version))))
1079 (file-name (git-file-name name version))
1080 (sha256
1081 (base32
1082 "09mmsalc7dwlvgrda56s2k927rpl3a5dzfa88aslkqcjnr790wjy"))
1083 (snippet
1084 ;; This file isn't freely distributable and has no effect on building.
1085 '(begin
1086 (delete-file "xdelta3/draft-korn-vcdiff.txt")
1087 #t))))
1088 (build-system gnu-build-system)
1089 (native-inputs
1090 `(("autoconf" ,autoconf)
1091 ("automake" ,automake)))
1092 (arguments
1093 `(#:phases
1094 (modify-phases %standard-phases
1095 (add-after 'unpack 'enter-build-directory
1096 (lambda _ (chdir "xdelta3") #t)))))
1097 (home-page "http://xdelta.org")
1098 (synopsis "Delta encoder for binary files")
1099 (description "xdelta encodes only the differences between two binary files
1100 using the VCDIFF algorithm and patch file format described in RFC 3284. It can
1101 also be used to apply such patches. xdelta is similar to @command{diff} and
1102 @command{patch}, but is not limited to plain text and does not generate
1103 human-readable output.")
1104 (license license:asl2.0)))
1105
1106 (define-public lrzip
1107 (package
1108 (name "lrzip")
1109 (version "0.631")
1110 (source
1111 (origin
1112 (method url-fetch)
1113 (uri (string-append
1114 "http://ck.kolivas.org/apps/lrzip/lrzip-" version ".tar.bz2"))
1115 (sha256
1116 (base32
1117 "0mb449vmmwpkalq732jdyginvql57nxyd31sszb108yps1lf448d"))
1118 (patches (search-patches "lrzip-CVE-2017-8842.patch"))))
1119 (build-system gnu-build-system)
1120 (native-inputs
1121 `(;; nasm is only required when building for 32-bit x86 platforms
1122 ,@(if (string-prefix? "i686" (or (%current-target-system)
1123 (%current-system)))
1124 `(("nasm" ,nasm))
1125 '())
1126 ("perl" ,perl)))
1127 (inputs
1128 `(("bzip2" ,bzip2)
1129 ("lzo" ,lzo)
1130 ("zlib" ,zlib)))
1131 (home-page "http://ck.kolivas.org/apps/lrzip/")
1132 (synopsis "Large file compressor with a very high compression ratio")
1133 (description "lrzip is a compression utility that uses long-range
1134 redundancy reduction to improve the subsequent compression ratio of
1135 larger files. It can then further compress the result with the ZPAQ or
1136 LZMA algorithms for maximum compression, or LZO for maximum speed. This
1137 choice between size or speed allows for either better compression than
1138 even LZMA can provide, or a higher speed than gzip while compressing as
1139 well as bzip2.")
1140 (license (list license:gpl3+
1141 license:public-domain)))) ; most files in lzma/
1142
1143 (define-public snappy
1144 (package
1145 (name "snappy")
1146 (version "1.1.8")
1147 (source
1148 (origin
1149 (method git-fetch)
1150 (uri (git-reference
1151 (url "https://github.com/google/snappy")
1152 (commit version)))
1153 (file-name (git-file-name name version))
1154 (sha256
1155 (base32 "1j0kslq2dvxgkcxl1gakhvsa731yrcvcaipcp5k8k7ayicvkv9jv"))
1156 (patches (search-patches "snappy-add-O2-flag-in-CmakeLists.txt.patch"))))
1157 (build-system cmake-build-system)
1158 (arguments
1159 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
1160 (home-page "https://github.com/google/snappy")
1161 (synopsis "Fast compressor/decompressor")
1162 (description "Snappy is a compression/decompression library. It does not
1163 aim for maximum compression, or compatibility with any other compression library;
1164 instead, it aims for very high speeds and reasonable compression. For instance,
1165 compared to the fastest mode of zlib, Snappy is an order of magnitude faster
1166 for most inputs, but the resulting compressed files are anywhere from 20% to
1167 100% bigger.")
1168 (license license:asl2.0)))
1169
1170 (define-public p7zip
1171 (package
1172 (name "p7zip")
1173 (version "16.02")
1174 (source (origin
1175 (method url-fetch)
1176 (uri (string-append "mirror://sourceforge/" name "/" name "/"
1177 version "/" name "_" version
1178 "_src_all.tar.bz2"))
1179 (sha256
1180 (base32
1181 "07rlwbbgszq8i7m8jh3x6j2w2hc9a72dc7fmqawnqkwlwb00mcjy"))
1182 (modules '((guix build utils)))
1183 (snippet
1184 '(begin
1185 ;; Remove non-free source files
1186 (for-each delete-file
1187 (append
1188 (find-files "CPP/7zip/Compress" "Rar.*")
1189 (find-files "CPP/7zip/Crypto" "Rar.*")
1190 (find-files "DOC/unRarLicense.txt")
1191 (find-files "Utils/file_Codecs_Rar_so.py")))
1192 (delete-file-recursively "CPP/7zip/Archive/Rar")
1193 (delete-file-recursively "CPP/7zip/Compress/Rar")
1194 #t))
1195 (patches (search-patches "p7zip-CVE-2016-9296.patch"
1196 "p7zip-CVE-2017-17969.patch"
1197 "p7zip-remove-unused-code.patch"))))
1198 (build-system gnu-build-system)
1199 (arguments
1200 `(#:make-flags
1201 (list (string-append "DEST_HOME=" (assoc-ref %outputs "out")) "all3")
1202 #:phases
1203 (modify-phases %standard-phases
1204 (replace 'configure
1205 (lambda* (#:key system outputs #:allow-other-keys)
1206 (invoke "cp"
1207 (let ((system ,(or (%current-target-system)
1208 (%current-system))))
1209 (cond
1210 ((string-prefix? "x86_64" system)
1211 "makefile.linux_amd64_asm")
1212 ((string-prefix? "i686" system)
1213 "makefile.linux_x86_asm_gcc_4.X")
1214 (else
1215 "makefile.linux_any_cpu_gcc_4.X")))
1216 "makefile.machine")))
1217 (replace 'check
1218 (lambda _
1219 (invoke "make" "test")
1220 (invoke "make" "test_7z")
1221 (invoke "make" "test_7zr"))))))
1222 (native-inputs
1223 (let ((system (or (%current-target-system)
1224 (%current-system))))
1225 `(,@(cond ((string-prefix? "x86_64" system)
1226 `(("yasm" ,yasm)))
1227 ((string-prefix? "i686" system)
1228 `(("nasm" ,nasm)))
1229 (else '())))))
1230 (home-page "http://p7zip.sourceforge.net/")
1231 (synopsis "Command-line file archiver with high compression ratio")
1232 (description "p7zip is a command-line port of 7-Zip, a file archiver that
1233 handles the 7z format which features very high compression ratios.")
1234 (license (list license:lgpl2.1+
1235 license:gpl2+
1236 license:public-domain))))
1237
1238 (define-public gzstream
1239 (package
1240 (name "gzstream")
1241 (version "1.5")
1242 (source (origin
1243 (method url-fetch)
1244 (uri
1245 ;; No versioned URL, but last release was in 2003.
1246 "http://www.cs.unc.edu/Research/compgeom/gzstream/gzstream.tgz")
1247 (file-name (string-append name "-" version ".tgz"))
1248 (sha256
1249 (base32
1250 "00y19pqjsdj5zcrx4p9j56pl73vayfwnb7y2hvp423nx0cwv5b4r"))
1251 (modules '((guix build utils)))
1252 (snippet
1253 ;; Remove pre-compiled object.
1254 '(begin
1255 (delete-file "gzstream.o")
1256 #t))))
1257 (build-system gnu-build-system)
1258 (arguments
1259 `(#:test-target "test"
1260 #:phases
1261 (modify-phases %standard-phases
1262 (delete 'configure)
1263 (replace 'install
1264 (lambda* (#:key outputs #:allow-other-keys)
1265 (let* ((out (assoc-ref outputs "out"))
1266 (lib (string-append out "/lib"))
1267 (include (string-append out "/include")))
1268 (install-file "libgzstream.a" lib)
1269 (install-file "gzstream.h" include)
1270 #t))))))
1271 (propagated-inputs `(("zlib" ,zlib)))
1272 (home-page "http://www.cs.unc.edu/Research/compgeom/gzstream/")
1273 (synopsis "Compressed C++ iostream")
1274 (description "gzstream is a small library for providing zlib
1275 functionality in a C++ iostream.")
1276 (license license:lgpl2.1+)))
1277
1278 (define-public zpaq
1279 (package
1280 (name "zpaq")
1281 (version "7.15")
1282 (source
1283 (origin
1284 (method url-fetch/zipbomb)
1285 (uri (string-append "http://mattmahoney.net/dc/zpaq"
1286 (string-delete #\. version) ".zip"))
1287 (sha256
1288 (base32
1289 "066l94yyladlfzri877nh2dhkvspagjn3m5bmv725fmhkr9c4pp8"))
1290 (modules '((guix build utils)))
1291 (snippet
1292 ;; Delete irrelevant pre-compiled binaries.
1293 '(begin
1294 (for-each delete-file (find-files "." "\\.exe$"))
1295 #t))))
1296 (build-system gnu-build-system)
1297 (arguments
1298 `(#:phases
1299 (modify-phases %standard-phases
1300 (delete 'configure)) ; no ‘configure’ script
1301 #:make-flags
1302 (list
1303 (string-append "CPPFLAGS=-Dunix"
1304 ,(match (or (%current-target-system)
1305 (%current-system))
1306 ("x86_64-linux" "")
1307 ("i686-linux" "")
1308 (_ " -DNOJIT")))
1309 ;; These should be safe, lowest-common-denominator instruction sets,
1310 ;; allowing for some optimisation while remaining reproducible.
1311 (string-append "CXXFLAGS=-O3 -DNDEBUG"
1312 ,(match (or (%current-target-system)
1313 (%current-system))
1314 ("x86_64-linux" " -march=nocona -mtune=generic")
1315 ("i686-linux" " -march=i686 -mtune=generic")
1316 ("armhf-linux" " -mtune=generic-armv7-a")
1317 (_ "")))
1318 (string-append "PREFIX="
1319 (assoc-ref %outputs "out")))))
1320 (native-inputs
1321 `(("perl" ,perl))) ; for pod2man
1322 (home-page "http://mattmahoney.net/dc/zpaq.html")
1323 (synopsis "Incremental journaling archiver")
1324 (description "ZPAQ is a command-line archiver for realistic situations with
1325 many duplicate and already compressed files. It backs up only those files
1326 modified since the last update. All previous versions remain untouched and can
1327 be independently recovered. Identical files are only stored once (known as
1328 @dfn{de-duplication}). Archives can also be encrypted.
1329
1330 ZPAQ is intended to back up user data, not entire operating systems. It ignores
1331 owner and group IDs, ACLs, extended attributes, or special file types like
1332 devices, sockets, or named pipes. It does not follow or restore symbolic links
1333 or junctions, and always follows hard links.")
1334 (license (list license:public-domain
1335 ;; libzpaq.cpp contains a mix of public-domain and
1336 ;; expat-licenced (or ‘MIT’) code.
1337 license:expat))))
1338
1339 (define-public unshield
1340 (package
1341 (name "unshield")
1342 (version "1.4.3")
1343 (source
1344 (origin (method git-fetch)
1345 (uri (git-reference
1346 (url "http://github.com/twogood/unshield")
1347 (commit version)))
1348 (file-name (git-file-name name version))
1349 (sha256
1350 (base32
1351 "19wn22vszhci8dfcixx5rliz7phx3lv5ablvhjlclvj75k2vsdqd"))))
1352 (build-system cmake-build-system)
1353 (inputs
1354 `(("zlib" ,zlib)
1355 ("openssl" ,openssl)
1356 ;; Test data that is otherwise downloaded with curl.
1357 ("unshield-avigomanager11b22.zip"
1358 ,(origin
1359 (method url-fetch)
1360 (uri (string-append
1361 "https://www.dropbox.com/s/8r4b6752swe3nhu/"
1362 "unshield-avigomanager11b22.zip?dl=1"))
1363 (sha256
1364 (base32 "0fwq7lih04if68wpwpsk5wjqyvh32db76a41sq6gbx4dn1lc3ddn"))
1365 (file-name "unshield-avigomanager11b22.zip")))
1366 ("unshield-baldurs_gate_patch_v1_1_4315_international.zip"
1367 ,(origin
1368 (method url-fetch)
1369 (uri (string-append
1370 "https://www.dropbox.com/s/9ruil8oi6amjbbk/"
1371 "unshield-baldurs_gate_patch_v1_1_4315_international.zip?dl=1"))
1372 (sha256
1373 (base32 "0spaxf6dardlhqxz3ys09fzamj007q3nfyw4xng6gh3qp9780maj"))
1374 (file-name "unshield-baldurs_gate_patch_v1_1_4315_international.zip")))
1375 ("unshield-the-feeble-files-spanish.zip"
1376 ,(origin
1377 (method url-fetch)
1378 (uri (string-append
1379 "https://www.dropbox.com/s/1ng0z9kfxc7eb1e/"
1380 "unshield-the-feeble-files-spanish.zip?dl=1"))
1381 (sha256
1382 (base32 "1k5cw6vnpja8yjlnhx5124xrw9i8s1l539hfdqqrqz3l5gn0bnyd"))
1383 (file-name "unshield-the-feeble-files-spanish.zip")))))
1384 (native-inputs
1385 `(("unzip" ,unzip)))
1386 (arguments
1387 `(#:out-of-source? #f
1388 #:phases
1389 (modify-phases %standard-phases
1390 (add-before 'check 'pre-check
1391 (lambda* (#:key inputs #:allow-other-keys)
1392 (for-each (lambda (i)
1393 (copy-file (assoc-ref inputs i)
1394 (string-append "test/v0/" i)))
1395 '("unshield-avigomanager11b22.zip"
1396 "unshield-baldurs_gate_patch_v1_1_4315_international.zip"
1397 "unshield-the-feeble-files-spanish.zip"))
1398 (substitute* (find-files "test/" "/*\\.sh")
1399 ;; Tests expect the unshield binary in a specific
1400 ;; location.
1401 (("/var/tmp/unshield/bin/unshield")
1402 (string-append (getcwd) "/src/unshield"))
1403 ;; We no longer need to download the data.
1404 ((".?URL=.*$") "")
1405 (("curl -(|f)sSL -o test.zip .*") ""))
1406 (substitute* "test/v0/avigomanager.sh"
1407 (("test.zip")
1408 (string-append (getcwd)
1409 "/test/v0/unshield-avigomanager11b22.zip")))
1410 (substitute* "test/v0/baldurs_gate_patch_v1_1_4315_international.sh"
1411 (("test.zip")
1412 (string-append
1413 (getcwd)
1414 "/test/v0/unshield-baldurs_gate_patch_v1_1_4315_international.zip")))
1415 (substitute* "test/v0/the-feeble-files-spanish.sh"
1416 (("test.zip")
1417 (string-append (getcwd)
1418 "/test/v0/unshield-the-feeble-files-spanish.zip")))
1419 #t))
1420 (replace 'check
1421 (lambda _
1422 (invoke "./run-tests.sh"))))))
1423 (home-page "https://github.com/twogood/unshield")
1424 (synopsis "Extract CAB files from InstallShield installers")
1425 (description
1426 "@command{unshield} is a tool and library for extracting @file{.cab}
1427 archives from InstallShield installers.")
1428 (license license:expat)))
1429
1430 (define-public zstd
1431 (package
1432 (name "zstd")
1433 (version "1.4.4")
1434 (source
1435 (origin
1436 (method url-fetch)
1437 (uri (string-append "https://github.com/facebook/zstd/releases/download/"
1438 "v" version "/zstd-" version ".tar.gz"))
1439 (sha256
1440 (base32 "05ckxap00qvc0j51d3ci38150cxsw82w7s9zgd5fgzspnzmp1vsr"))))
1441 (build-system gnu-build-system)
1442 (outputs '("out" ;1.2MiB executables and documentation
1443 "lib" ;1.2MiB shared library and headers
1444 "static")) ;1.2MiB static library
1445 (arguments
1446 `(#:phases
1447 (modify-phases %standard-phases
1448 (delete 'configure) ;no configure script
1449 (add-after 'install 'adjust-library-locations
1450 (lambda* (#:key outputs #:allow-other-keys)
1451 (let* ((out (assoc-ref outputs "out"))
1452 (lib (assoc-ref outputs "lib"))
1453 (static (assoc-ref outputs "static"))
1454 (shared-libs (string-append lib "/lib"))
1455 (static-libs (string-append static "/lib")))
1456 ;; Move the static library to its own output to save ~1MiB.
1457 (mkdir-p static-libs)
1458 (for-each (lambda (ar)
1459 (link ar (string-append static-libs "/"
1460 (basename ar)))
1461 (delete-file ar))
1462 (find-files shared-libs "\\.a$"))
1463
1464 ;; Make sure the pkg-config file refers to the right output.
1465 (substitute* (string-append shared-libs "/pkgconfig/libzstd.pc")
1466 (("^prefix=.*")
1467 (string-append "prefix=" lib "\n")))
1468
1469 #t))))
1470 #:make-flags
1471 ;; TODO: Integrate in next rebuild cycle.
1472 (list ,(if (%current-target-system)
1473 (string-append "CC=" (cc-for-target))
1474 "CC=gcc")
1475 (string-append "PREFIX=" (assoc-ref %outputs "out"))
1476 (string-append "LIBDIR=" (assoc-ref %outputs "lib") "/lib")
1477 (string-append "INCLUDEDIR=" (assoc-ref %outputs "lib") "/include")
1478 ;; Skip auto-detection of, and creating a dependency on, the build
1479 ;; environment's ‘xz’ for what amounts to a dubious feature anyway.
1480 "HAVE_LZMA=0"
1481 ;; Not currently detected, but be explicit & avoid surprises later.
1482 "HAVE_LZ4=0"
1483 "HAVE_ZLIB=0")))
1484 (home-page "https://facebook.github.io/zstd/")
1485 (synopsis "Zstandard real-time compression algorithm")
1486 (description "Zstandard (@command{zstd}) is a lossless compression algorithm
1487 that combines very fast operation with a compression ratio comparable to that of
1488 zlib. In most scenarios, both compression and decompression can be performed in
1489 ‘real time’. The compressor can be configured to provide the most suitable
1490 trade-off between compression ratio and speed, without affecting decompression
1491 speed.")
1492 (license (list license:bsd-3 ; the main top-level LICENSE file
1493 license:bsd-2 ; many files explicitly state 2-Clause
1494 license:gpl2 ; the main top-level COPYING file
1495 license:gpl3+ ; tests/gzip/*.sh
1496 license:expat ; lib/dictBuilder/divsufsort.[ch]
1497 license:public-domain ; zlibWrapper/examples/fitblk*
1498 license:zlib)))) ; zlibWrapper/{gz*.c,gzguts.h}
1499
1500 (define-public pzstd
1501 (package
1502 (name "pzstd")
1503 (version (package-version zstd))
1504 (source (package-source zstd))
1505 (build-system gnu-build-system)
1506 (inputs
1507 `(,@(if (%current-target-system)
1508 `(("googletest" ,googletest))
1509 '())))
1510 (native-inputs
1511 `(,@(if (%current-system)
1512 `(("googletest" ,googletest))
1513 '())))
1514 (arguments
1515 `(#:phases
1516 (modify-phases %standard-phases
1517 (add-after 'unpack 'enter-subdirectory
1518 (lambda _ (chdir "contrib/pzstd") #t))
1519 (delete 'configure) ; no configure script
1520 (add-before 'check 'compile-tests
1521 (lambda* (#:key make-flags #:allow-other-keys)
1522 (apply invoke "make" "tests" make-flags)))
1523 (add-after 'install 'install-documentation
1524 (lambda* (#:key outputs #:allow-other-keys)
1525 (let* ((out (assoc-ref outputs "out"))
1526 (doc (string-append out "/share/doc/" ,name)))
1527 (mkdir-p doc)
1528 (install-file "README.md" doc)
1529 #t))))
1530 #:make-flags
1531 (list (string-append "CC=" ,(cc-for-target))
1532 (string-append "CXX=" ,(cxx-for-target))
1533 (string-append "PREFIX=" (assoc-ref %outputs "out")))))
1534 (home-page (package-home-page zstd))
1535 (synopsis "Threaded implementation of the Zstandard compression algorithm")
1536 (description "Parallel Zstandard (PZstandard or @command{pzstd}) is a
1537 multi-threaded implementation of the @uref{http://zstd.net/, Zstandard
1538 compression algorithm}. It is fully compatible with the original Zstandard file
1539 format and command-line interface, and can be used as a drop-in replacement.
1540
1541 Compression is distributed over multiple processor cores to improve performance,
1542 as is the decompression of data compressed in this manner. Data compressed by
1543 other implementations will only be decompressed by two threads: one performing
1544 the actual decompression, the other input and output.")
1545 (license (package-license zstd))))
1546
1547 (define-public zip
1548 (package
1549 (name "zip")
1550 (version "3.0")
1551 (source
1552 (origin
1553 (method url-fetch)
1554 (uri (string-append "mirror://sourceforge/infozip"
1555 "/Zip%203.x%20%28latest%29/3.0/zip30.tar.gz"))
1556 (sha256
1557 (base32
1558 "0sb3h3067pzf3a7mlxn1hikpcjrsvycjcnj9hl9b1c3ykcgvps7h"))))
1559 (build-system gnu-build-system)
1560 (inputs `(("bzip2" ,bzip2)))
1561 (arguments
1562 `(#:tests? #f ; no test target
1563 #:make-flags (let ((out (assoc-ref %outputs "out")))
1564 (list "-f" "unix/Makefile"
1565 (string-append "prefix=" out)
1566 (string-append "MANDIR=" out "/share/man/man1")))
1567 #:phases
1568 (modify-phases %standard-phases
1569 (replace 'build
1570 (lambda* (#:key (make-flags '()) #:allow-other-keys)
1571 (apply invoke "make" "generic_gcc" make-flags)))
1572 (delete 'configure))))
1573 (home-page "http://www.info-zip.org/Zip.html")
1574 (synopsis "Compression and file packing utility")
1575 (description
1576 "Zip is a compression and file packaging/archive utility. Zip is useful
1577 for packaging a set of files for distribution, for archiving files, and for
1578 saving disk space by temporarily compressing unused files or directories.
1579 Zip puts one or more compressed files into a single ZIP archive, along with
1580 information about the files (name, path, date, time of last modification,
1581 protection, and check information to verify file integrity). An entire
1582 directory structure can be packed into a ZIP archive with a single command.
1583
1584 Zip has one compression method (deflation) and can also store files without
1585 compression. Zip automatically chooses the better of the two for each file.
1586 Compression ratios of 2:1 to 3:1 are common for text files.")
1587 (license (license:non-copyleft "file://LICENSE"
1588 "See LICENSE in the distribution."))))
1589
1590 (define-public unzip
1591 (package (inherit zip)
1592 (name "unzip")
1593 (version "6.0")
1594 (source
1595 (origin
1596 (method url-fetch)
1597 (uri (string-append "mirror://sourceforge/infozip"
1598 "/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz"))
1599 (sha256
1600 (base32
1601 "0dxx11knh3nk95p2gg2ak777dd11pr7jx5das2g49l262scrcv83"))
1602 (patches (search-patches "unzip-CVE-2014-8139.patch"
1603 "unzip-CVE-2014-8140.patch"
1604 "unzip-CVE-2014-8141.patch"
1605 "unzip-CVE-2014-9636.patch"
1606 "unzip-CVE-2015-7696.patch"
1607 "unzip-CVE-2015-7697.patch"
1608 "unzip-allow-greater-hostver-values.patch"
1609 "unzip-initialize-symlink-flag.patch"
1610 "unzip-remove-build-date.patch"
1611 "unzip-attribs-overflow.patch"
1612 "unzip-overflow-on-invalid-input.patch"
1613 "unzip-format-secure.patch"
1614 "unzip-overflow-long-fsize.patch"))))
1615 (build-system gnu-build-system)
1616 ;; no inputs; bzip2 is not supported, since not compiled with BZ_NO_STDIO
1617 (arguments
1618 `(#:phases (modify-phases %standard-phases
1619 (delete 'configure)
1620 (add-after 'unpack 'fortify
1621 (lambda _
1622 ;; Mitigate CVE-2018-1000035, an exploitable buffer overflow.
1623 ;; This environment variable is recommended in 'unix/Makefile'
1624 ;; for passing flags to the C compiler.
1625 (setenv "LOCAL_UNZIP" "-D_FORTIFY_SOURCE=1")
1626 #t))
1627 (replace 'build
1628 (lambda* (#:key make-flags #:allow-other-keys)
1629 (apply invoke "make"
1630 `("-j" ,(number->string
1631 (parallel-job-count))
1632 ,@make-flags
1633 "generic_gcc")))))
1634 #:make-flags (list "-f" "unix/Makefile"
1635 (string-append "prefix=" %output)
1636 (string-append "MANDIR=" %output "/share/man/man1"))))
1637 (home-page "http://www.info-zip.org/UnZip.html")
1638 (synopsis "Decompression and file extraction utility")
1639 (description
1640 "UnZip is an extraction utility for archives compressed in .zip format,
1641 also called \"zipfiles\".
1642
1643 UnZip lists, tests, or extracts files from a .zip archive. The default
1644 behaviour (with no options) is to extract into the current directory, and
1645 subdirectories below it, all files from the specified zipfile. UnZip
1646 recreates the stored directory structure by default.")
1647 (license (license:non-copyleft "file://LICENSE"
1648 "See LICENSE in the distribution."))))
1649
1650 (define-public ziptime
1651 (let ((commit "2a5bc9dfbf7c6a80e5f7cb4dd05b4036741478bc")
1652 (revision "0"))
1653 (package
1654 (name "ziptime")
1655 (version (git-version "0.0.0" revision commit))
1656 (source
1657 (origin
1658 (method git-fetch)
1659 (uri (git-reference
1660 (url "https://android.googlesource.com/platform/build")
1661 (commit commit)))
1662 (file-name (git-file-name name version))
1663 (sha256
1664 (base32 "0hrn61b3a97dlc4iqc28rwx8k8zf7ycbwzqqp93vj34zy5a541kn"))))
1665 (build-system gnu-build-system)
1666 (arguments
1667 `(#:tests? #f ; no test suite
1668 #:phases
1669 (modify-phases %standard-phases
1670 (add-after 'unpack 'change-directory
1671 (lambda _
1672 (chdir "tools/ziptime")))
1673 (delete 'configure) ; nothing to configure
1674 (replace 'build
1675 ;; There is no Makefile, only an ‘Android.bp’ file. Ignore it.
1676 (lambda _
1677 (let ((c++ ,(cxx-for-target)))
1678 (apply invoke c++ "-O2" "-o" "ziptime"
1679 (find-files "." "\\.cpp$")))))
1680 (replace 'install
1681 (lambda* (#:key outputs #:allow-other-keys)
1682 (let* ((out (assoc-ref outputs "out"))
1683 (bin (string-append out "/bin"))
1684 (doc (string-append out "/share/doc/" ,name "-" ,version)))
1685 (install-file "ziptime" bin)
1686 (install-file "README.txt" doc)))))))
1687 ;; There is no separate home page for this tiny bundled build tool.
1688 (home-page (string-append "https://android.googlesource.com/platform/build/"
1689 "+/master/tools/ziptime/README.txt"))
1690 (synopsis "Normalize @file{.zip} archive header timestamps")
1691 (description
1692 "Ziptime helps make @file{.zip} archives reproducible by replacing
1693 timestamps in the file header with a fixed time (1 January 2008).
1694
1695 ``Extra fields'' are not changed, so you'll need to use the @code{-X} option to
1696 @command{zip} to prevent it from storing the ``universal time'' field.")
1697 (license license:asl2.0))))
1698
1699 (define-public zziplib
1700 (package
1701 (name "zziplib")
1702 (version "0.13.69")
1703 (home-page "https://github.com/gdraheim/zziplib")
1704 (source (origin
1705 (method git-fetch)
1706 (uri (git-reference (url home-page)
1707 (commit (string-append "v" version))))
1708 (file-name (git-file-name name version))
1709 (patches (search-patches "zziplib-CVE-2018-16548.patch"))
1710 (sha256
1711 (base32
1712 "0fbk9k7ryas2wh2ykwkvm1pbi40i88rfvc3dydh9xyd7w2jcki92"))))
1713 (build-system gnu-build-system)
1714 (arguments
1715 `(#:phases (modify-phases %standard-phases
1716 (add-before 'check 'make-files-writable
1717 (lambda _
1718 (for-each make-file-writable
1719 (find-files "test" #:directories? #t))
1720 #t)))
1721
1722 ;; XXX: The default test target attempts to download external resources and
1723 ;; fails without error: <https://github.com/gdraheim/zziplib/issues/53>.
1724 ;; To prevent confusing log messages, just run a simple zip test that works.
1725 #:test-target "check-readme"))
1726 (inputs
1727 `(("zlib" ,zlib)))
1728 (native-inputs `(("perl" ,perl) ; for the documentation
1729 ("pkg-config" ,pkg-config)
1730 ;; for the documentation; Python 3 not supported,
1731 ;; http://forums.gentoo.org/viewtopic-t-863161-start-0.html
1732 ("python" ,python-2)
1733 ("zip" ,zip))) ; to create test files
1734 (synopsis "Library for accessing zip files")
1735 (description
1736 "ZZipLib is a library based on zlib for accessing zip files.")
1737 ;; zziplib is dual licensed under LGPL2.0+ and MPL1.1. Some example source
1738 ;; files carry the Zlib license; see "docs/copying.html" for details.
1739 (license (list license:lgpl2.0+ license:mpl1.1))))
1740
1741 (define-public libzip
1742 (package
1743 (name "libzip")
1744 (version "1.7.3")
1745 (source (origin
1746 (method url-fetch)
1747 (uri (string-append
1748 "https://libzip.org/download/libzip-" version ".tar.xz"))
1749 (sha256
1750 (base32
1751 "0ck1dk7zn5qzpgxklg0r26nfsf04xb6c46gsig060hkvvgzp6156"))))
1752 (native-inputs
1753 `(("perl" ,perl)))
1754 (inputs
1755 `(("gnutls" ,gnutls)
1756 ("liblzma" ,xz)
1757 ("openssl" ,openssl)
1758 ("zlib" ,zlib)))
1759 (build-system cmake-build-system)
1760 (home-page "https://libzip.org")
1761 (synopsis "C library for reading, creating, and modifying zip archives")
1762 (description "Libzip is a C library for reading, creating, and modifying
1763 zip archives. Files can be added from data buffers, files, or compressed data
1764 copied directly from other zip archives. Changes made without closing the
1765 archive can be reverted.")
1766 (license license:bsd-3)))
1767
1768 (define-public atool
1769 (package
1770 (name "atool")
1771 (version "0.39.0")
1772 (source
1773 (origin
1774 (method url-fetch)
1775 (uri (string-append "mirror://savannah/atool/atool-"
1776 version ".tar.gz"))
1777 (sha256
1778 (base32
1779 "0fvhzip2v08jgnlfpyj6rapan39xlsl1ksgq4lp8gfsai2ah1xma"))))
1780 (build-system gnu-build-system)
1781 (arguments
1782 `(#:phases
1783 (modify-phases %standard-phases
1784 (add-after 'unpack 'embed-absolute-file-name
1785 (lambda* (#:key inputs #:allow-other-keys)
1786 (substitute* "atool"
1787 (("(^\\$::cfg_path_file.*= )'file'" _ pre)
1788 (string-append pre "'" (assoc-ref inputs "file")
1789 "/bin/file'")))
1790 #t)))))
1791 (inputs
1792 `(("perl" ,perl)
1793 ("file" ,file)))
1794 (home-page "https://www.nongnu.org/atool/")
1795 (synopsis "Universal tool to manage file archives of various types")
1796 (description "The main command is @command{aunpack} which extracts files
1797 from an archive. The other commands provided are @command{apack} (to create
1798 archives), @command{als} (to list files in archives), and @command{acat} (to
1799 extract files to standard out). As @command{atool} invokes external programs
1800 to handle the archives, not all commands may be supported for a certain type
1801 of archives.")
1802 (license license:gpl2+)))
1803
1804 (define-public lunzip
1805 (package
1806 (name "lunzip")
1807 (version "1.11")
1808 (source
1809 (origin
1810 (method url-fetch)
1811 (uri (string-append "mirror://savannah/lzip/lunzip/"
1812 "lunzip-" version ".tar.gz"))
1813 (sha256
1814 (base32 "19zq3gmlbia2krq4k4zs1j0xjdv7nsdzqvfb0pyca5n53h2mzb91"))))
1815 (build-system gnu-build-system)
1816 (arguments
1817 `(#:configure-flags
1818 (list ,(string-append "CC=" (cc-for-target)))))
1819 (home-page "https://www.nongnu.org/lzip/lunzip.html")
1820 (synopsis "Small, stand-alone lzip decompressor")
1821 (description
1822 "Lunzip is a decompressor for files in the lzip compression format (.lz),
1823 written as a single small C tool with no dependencies. This makes it
1824 well-suited to embedded and other systems without a C++ compiler, or for use in
1825 applications such as software installers that need only to decompress files,
1826 not compress them.
1827 Lunzip is intended to be fully compatible with the regular lzip package.")
1828 (license (list license:bsd-2 ; carg_parser.[ch]
1829 license:gpl2+)))) ; everything else
1830
1831 (define-public clzip
1832 (package
1833 (name "clzip")
1834 (version "1.11")
1835 (source
1836 (origin
1837 (method url-fetch)
1838 (uri (string-append "mirror://savannah/lzip/clzip/"
1839 "clzip-" version ".tar.gz"))
1840 (sha256
1841 (base32 "1h14dmc9fi10gcdpdpbgq1bwvcxvivppilj64pf720x8mw915mfr"))))
1842 (build-system gnu-build-system)
1843 (arguments
1844 `(#:configure-flags
1845 (list ,(string-append "CC=" (cc-for-target)))))
1846 (home-page "https://www.nongnu.org/lzip/clzip.html")
1847 (synopsis "Small, stand-alone lzip compressor and decompressor")
1848 (description
1849 "Clzip is a compressor and decompressor for files in the lzip compression
1850 format (.lz), written as a single small C tool with no dependencies. This makes
1851 it well-suited to embedded and other systems without a C++ compiler, or for use
1852 in other applications like package managers.
1853 Clzip is intended to be fully compatible with the regular lzip package.")
1854 (license (list license:bsd-2 ; carg_parser.[ch], lzd in clzip.texi
1855 license:gpl2+))))
1856
1857 (define-public lzlib
1858 (package
1859 (name "lzlib")
1860 (version "1.12")
1861 (source
1862 (origin
1863 (method url-fetch)
1864 (uri (string-append "mirror://savannah/lzip/lzlib/"
1865 "lzlib-" version ".tar.gz"))
1866 (sha256
1867 (base32 "1c9pwd6by8is4z8bs6j306jyy6pgm2dvsn4fr7fg2b5m5qj88pcf"))))
1868 (build-system gnu-build-system)
1869 (arguments
1870 `(#:configure-flags
1871 (list (string-append "CC=" ,(cc-for-target))
1872 "--disable-static"
1873 "--enable-shared"))) ; only static (.a) is built by default
1874 (home-page "https://www.nongnu.org/lzip/lzlib.html")
1875 (synopsis "Lzip data compression C library")
1876 (description
1877 "Lzlib is a C library for in-memory LZMA compression and decompression in
1878 the lzip format. It supports integrity checking of the decompressed data, and
1879 all functions are thread-safe. The library should never crash, even in case of
1880 corrupted input.")
1881 (license (list license:bsd-2 ; the library itself
1882 license:gpl2+)))) ; main.c (i.e. minilzip used by tests)
1883
1884 (define-public plzip
1885 (package
1886 (name "plzip")
1887 (version "1.9")
1888 (source
1889 (origin
1890 (method url-fetch)
1891 (uri (string-append "mirror://savannah/lzip/plzip/"
1892 "plzip-" version ".tar.gz"))
1893 (sha256
1894 (base32 "19zinpx7hssl6r3vilpvq2s7wha3545xan8b0vcvsxnyipdx3n0l"))))
1895 (build-system gnu-build-system)
1896 (inputs
1897 `(("lzlib" ,lzlib)))
1898 (home-page "https://www.nongnu.org/lzip/plzip.html")
1899 (synopsis "Parallel lossless data compressor for the lzip format")
1900 (description
1901 "Plzip is a massively parallel (multi-threaded) lossless data compressor
1902 and decompressor that uses the lzip file format (.lz). Files produced by plzip
1903 are fully compatible with lzip and can be rescued with lziprecover.
1904 On multiprocessor machines, plzip can compress and decompress large files much
1905 faster than lzip, at the cost of a slightly reduced compression ratio (0.4% to
1906 2%). The number of usable threads is limited by file size: on files of only a
1907 few MiB, plzip is no faster than lzip.
1908 Files that were compressed with regular lzip will also not be decompressed
1909 faster by plzip, unless the @code{-b} option was used: lzip usually produces
1910 single-member files which can't be decompressed in parallel.")
1911 (license (list license:bsd-2 ; arg_parser.{cc,h}
1912 license:gpl2+)))) ; everything else
1913
1914 (define-public innoextract
1915 (package
1916 (name "innoextract")
1917 (version "1.9")
1918 (source
1919 (origin
1920 (method url-fetch)
1921 (uri (string-append "https://constexpr.org/innoextract/files/"
1922 "innoextract-" version "/"
1923 "/innoextract-" version ".tar.gz"))
1924 (sha256
1925 (base32 "09l1z1nbl6ijqqwszdwch9mqr54qb7df0wp2sd77v17dq6gsci33"))))
1926 (build-system cmake-build-system)
1927 (arguments
1928 `(#:tests? #f))
1929 (inputs `(("boost" ,boost)
1930 ("libiconv" ,libiconv)
1931 ("xz" ,xz)))
1932 (native-inputs `(("pkg-config" ,pkg-config)))
1933 (home-page "https://constexpr.org/innoextract/")
1934 (synopsis "Tool for extracting Inno Setup installers")
1935 (description "innoextract allows extracting Inno Setup installers under
1936 non-Windows systems without running the actual installer using wine.")
1937 (license license:zlib)))
1938
1939 (define-public google-brotli
1940 (package
1941 (name "google-brotli")
1942 (version "1.0.9")
1943 (source
1944 (origin
1945 (method git-fetch)
1946 (uri (git-reference
1947 (url "https://github.com/google/brotli")
1948 (commit (string-append "v" version))))
1949 (file-name (git-file-name name version))
1950 (sha256
1951 (base32 "1fikasxf7r2dwlk8mv8w7nmjkn0jw5ic31ky3mvpkdzwgd4xfndl"))
1952 (modules '((guix build utils)))
1953 (snippet
1954 '(begin
1955 ;; Cherry-picked from upstream since the latest release
1956 ;; https://github.com/google/brotli/commit/09b0992b6acb7faa6fd3b23f9bc036ea117230fc
1957 (substitute* (find-files "scripts" "^lib.*pc\\.in")
1958 (("-R\\$\\{libdir\\} ") ""))
1959 #t))))
1960 (build-system cmake-build-system)
1961 (arguments
1962 `(#:phases
1963 (modify-phases %standard-phases
1964 (add-after 'install 'rename-static-libraries
1965 ;; The build tools put a 'static' suffix on the static libraries, but
1966 ;; other applications don't know how to find these.
1967 (lambda* (#:key outputs #:allow-other-keys)
1968 (let ((lib (string-append (assoc-ref %outputs "out") "/lib/")))
1969 (rename-file (string-append lib "libbrotlicommon-static.a")
1970 (string-append lib "libbrotlicommon.a"))
1971 (rename-file (string-append lib "libbrotlidec-static.a")
1972 (string-append lib "libbrotlidec.a"))
1973 (rename-file (string-append lib "libbrotlienc-static.a")
1974 (string-append lib "libbrotlienc.a"))
1975 #t))))
1976 #:configure-flags
1977 (list ;; Defaults to "lib64" on 64-bit archs.
1978 (string-append "-DCMAKE_INSTALL_LIBDIR="
1979 (assoc-ref %outputs "out") "/lib"))))
1980 (home-page "https://github.com/google/brotli")
1981 (synopsis "General-purpose lossless compression")
1982 (description "This package provides the reference implementation of Brotli,
1983 a generic-purpose lossless compression algorithm that compresses data using a
1984 combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd
1985 order context modeling, with a compression ratio comparable to the best
1986 currently available general-purpose compression methods. It is similar in speed
1987 with @code{deflate} but offers more dense compression.
1988
1989 The specification of the Brotli Compressed Data Format is defined in RFC 7932.")
1990 (license license:expat)))
1991
1992 (define-public brotli
1993 ;; We used to provide an older version under the name "brotli".
1994 (deprecated-package "brotli" google-brotli))
1995
1996 (define-public python-google-brotli
1997 (package
1998 (inherit google-brotli)
1999 (name "python-google-brotli")
2000 (build-system python-build-system)
2001 (arguments '())
2002 (synopsis "Python interface to google-brotli")
2003 (description "@code{python-google-brotli} provides a Python interface to
2004 @code{google-brotli}, an implementation of the Brotli lossless compression
2005 algorithm.")))
2006
2007 (define-public ucl
2008 (package
2009 (name "ucl")
2010 (version "1.03")
2011 (source (origin
2012 (method url-fetch)
2013 (uri (string-append "https://www.oberhumer.com/opensource/"
2014 name "/download/" name "-" version ".tar.gz"))
2015 (sha256
2016 (base32
2017 "0j036lkwsxvm15gr29n8wn07cqq79dswjs9k54939ms5zngjjrdq"))))
2018 (build-system gnu-build-system)
2019 (arguments
2020 `(;; UCL 1.03 fails to build with newer C standards.
2021 #:configure-flags '("CFLAGS=-std=gnu90"
2022 "--enable-shared" "--disable-static")))
2023 (home-page "https://www.oberhumer.com/opensource/ucl/")
2024 (synopsis "Portable lossless data compression library")
2025 (description "UCL implements a number of compression algorithms that
2026 achieve an excellent compression ratio while allowing fast decompression.
2027 Decompression requires no additional memory.
2028
2029 Compared to LZO, the UCL algorithms achieve a better compression ratio but
2030 decompression is a little bit slower.")
2031 (license license:gpl2+)))
2032
2033 (define-public upx
2034 (package
2035 (name "upx")
2036 (version "3.96")
2037 (source (origin
2038 (method url-fetch)
2039 (uri (string-append "https://github.com/upx/upx/releases/download/v"
2040 version "/upx-" version "-src.tar.xz"))
2041 (sha256
2042 (base32
2043 "051pk5jk8fcfg5mpgzj43z5p4cn7jy5jbyshyn78dwjqr7slsxs7"))))
2044 (build-system gnu-build-system)
2045 (native-inputs
2046 `(("perl" ,perl)))
2047 (inputs
2048 `(("ucl" ,ucl)
2049 ("zlib" ,zlib)))
2050 (arguments
2051 `(#:make-flags
2052 (list "all")
2053 #:phases
2054 (modify-phases %standard-phases
2055 (delete 'configure) ; no configure script
2056 (delete 'check) ; no test suite
2057 (add-before 'build 'patch-exec-bin-sh
2058 (lambda _
2059 (substitute* (list "Makefile"
2060 "src/Makefile")
2061 (("/bin/sh") (which "sh")))
2062 #t))
2063 (replace 'install
2064 (lambda* (#:key outputs #:allow-other-keys)
2065 (let* ((out (assoc-ref outputs "out"))
2066 (bin (string-append out "/bin")))
2067 (mkdir-p bin)
2068 (copy-file "src/upx.out" (string-append bin "/upx")))
2069 #t)))))
2070 (home-page "https://upx.github.io/")
2071 (synopsis "Compression tool for executables")
2072 (description
2073 "The Ultimate Packer for eXecutables (UPX) is an executable file
2074 compressor. UPX typically reduces the file size of programs and shared
2075 libraries by around 50%--70%, thus reducing disk space, network load times,
2076 download times, and other distribution and storage costs.")
2077 (license license:gpl2+)))
2078
2079 (define-public quazip
2080 (package
2081 (name "quazip")
2082 (version "0.9.1")
2083 (source (origin
2084 (method git-fetch)
2085 (uri (git-reference
2086 (url "https://github.com/stachenov/quazip")
2087 (commit (string-append "v" version))))
2088 (file-name (git-file-name name version))
2089 (sha256
2090 (base32
2091 "11icgwv2xyxhd1hm1add51xv54zwkcqkg85d1xqlgiigvbm196iq"))))
2092 (build-system cmake-build-system)
2093 (arguments
2094 `(#:tests? #f)) ;no test
2095 (native-inputs
2096 `(("doxygen" ,doxygen)))
2097 (inputs
2098 `(("qtbase" ,qtbase)
2099 ("zlib" ,zlib)))
2100 (home-page "https://stachenov.github.io/quazip/index.html")
2101 (synopsis "Qt/C++ wrapper for Minizip")
2102 (description "QuaZIP is a simple C++ wrapper over Gilles Vollant's
2103 ZIP/UNZIP package that can be used to access ZIP archives. It uses
2104 Trolltech's Qt toolkit.
2105
2106 QuaZIP allows you to access files inside ZIP archives using QIODevice
2107 API, and that means that you can also use QTextStream, QDataStream or
2108 whatever you would like to use on your zipped files.
2109
2110 QuaZIP provides complete abstraction of the ZIP/UNZIP API, for both
2111 reading from and writing to ZIP archives. ")
2112 ;; Project is distributed under LGPL, but "quazip/z*" "quazip/unzip.*" are
2113 ;; distributed under zlib terms.
2114 (license (list license:lgpl2.1+ license:zlib))))
2115
2116 (define-public zutils
2117 (package
2118 (name "zutils")
2119 (version "1.10")
2120 (source
2121 (origin
2122 (method url-fetch)
2123 (uri (string-append "mirror://savannah/zutils/zutils-" version ".tar.lz"))
2124 (sha256
2125 (base32 "15dimqp8zlqaaa2l46r22srp1py38mlmn69ph1j5fmrd54w43m0d"))))
2126 (build-system gnu-build-system)
2127 (arguments
2128 `(#:configure-flags
2129 (list "--sysconfdir=/etc")
2130 #:phases
2131 (modify-phases %standard-phases
2132 (add-before 'check 'disable-failing-tests
2133 ;; XXX https://lists.nongnu.org/archive/html/zutils-bug/2020-07/msg00005.html
2134 (lambda _
2135 (substitute* "testsuite/check.sh"
2136 (("\"\\$\\{ZGREP\\}\" -N -L \"GNU\"") "true")
2137 (("\"\\$\\{ZGREP\\}\" -N -L \"nx_pattern\"") "false"))
2138 #t))
2139 (replace 'install
2140 (lambda* (#:key make-flags outputs #:allow-other-keys)
2141 (apply invoke "make" "install"
2142 (string-append "sysconfdir=" (assoc-ref outputs "out")
2143 "/etc")
2144 make-flags))))))
2145 (native-inputs
2146 ;; Needed to extract the source tarball and run the test suite.
2147 `(("lzip" ,lzip)))
2148 (home-page "https://www.nongnu.org/zutils/zutils.html")
2149 (synopsis "Utilities that transparently operate on compressed files")
2150 (description
2151 "Zutils is a collection of utilities able to process any combination of
2152 compressed and uncompressed files transparently. If any given file, including
2153 standard input, is compressed, its decompressed content is used instead.
2154
2155 @command{zcat}, @command{zcmp}, @command{zdiff}, and @command{zgrep} are
2156 improved replacements for the shell scripts provided by GNU gzip.
2157 @command{ztest} tests the integrity of supported compressed files.
2158 @command{zupdate} recompresses files with lzip, similar to gzip's
2159 @command{znew}.
2160
2161 Supported compression formats are bzip2, gzip, lzip, and xz. Zutils uses
2162 external compressors: the compressor to be used for each format is configurable
2163 at run time, and must be installed separately.")
2164 (license (list license:bsd-2 ; arg_parser.{cc,h}
2165 license:gpl2+)))) ; the rest
2166
2167 (define-public makeself-safeextract
2168 (let ((commit "1a95e121fa8e3c02d307ae37b9b7834e616c3683"))
2169 (package
2170 (name "makeself-safeextract")
2171 (version (git-version "0.0.0" "1" commit))
2172 (home-page "https://github.com/ssokolow/makeself_safeextract")
2173 (source
2174 (origin
2175 (method git-fetch)
2176 (uri (git-reference
2177 (url home-page)
2178 (commit commit)))
2179 (file-name (git-file-name name version))
2180 (sha256
2181 (base32
2182 "1anlinaj9lvfi8bn00wp11vzqq0f9sig4fm9yrspisx31v0z4a2c"))))
2183 (build-system trivial-build-system)
2184 (inputs
2185 `(("python" ,python-2)
2186 ("p7zip" ,p7zip)
2187 ("unzip" ,unzip)))
2188 (arguments
2189 `(#:modules ((guix build utils))
2190 #:builder
2191 (begin
2192 (use-modules (guix build utils))
2193 (let* ((name "makeself_safeextract")
2194 (source (string-append (assoc-ref %build-inputs "source")
2195 "/" name ".py"))
2196 (bin (string-append (assoc-ref %outputs "out") "/bin"))
2197 (target (string-append bin "/" name))
2198 (python (string-append (assoc-ref %build-inputs "python") "/bin"))
2199 (7z (string-append (assoc-ref %build-inputs "p7zip") "/bin/7z"))
2200 (unzip (string-append (assoc-ref %build-inputs "unzip") "/bin/unzip")))
2201 (setenv "PATH" (string-append (getenv "PATH") ":" python))
2202 (mkdir-p bin)
2203 (copy-file source target)
2204 (substitute* target
2205 (("'7z'") (format #f "'~a'" 7z))
2206 (("'unzip'") (format #f "'~a'" unzip)))
2207 (patch-shebang target)))))
2208 (synopsis "Extract makeself and mojo archives without running untrusted code")
2209 (description "This package provides a script to unpack self-extracting
2210 archives generated by @command{makeself} or @command{mojo} without running the
2211 possibly untrusted extraction shell script.")
2212 (license license:gpl3+))))
2213
2214 (define-public ncompress
2215 (package
2216 (name "ncompress")
2217 (version "4.2.4.6")
2218 (source (origin
2219 (method git-fetch)
2220 (uri (git-reference
2221 (url "https://github.com/vapier/ncompress")
2222 (commit (string-append "v" version))))
2223 (patches (search-patches "ncompress-fix-softlinks.patch"))
2224 (file-name (string-append name "-" version ".tar.gz"))
2225 (sha256
2226 (base32
2227 "1a4yir1ilafz0nzxdwigj204j4yy2zljbc501nsaqqm3dxdap8zn"))))
2228 (arguments
2229 '(#:make-flags (list "CC=gcc"
2230 (string-append "BINDIR=" %output "/bin")
2231 (string-append "MANDIR=" %output "/share/man/man1"))
2232 #:phases (modify-phases %standard-phases
2233 (delete 'configure))))
2234 (build-system gnu-build-system)
2235 (home-page "https://github.com/vapier/ncompress/")
2236 (synopsis "Original Lempel-Ziv compress/uncompress programs")
2237 (description "(N)compress provides the original compress and uncompress
2238 programs that used to be the de facto UNIX standard for compressing and
2239 uncompressing files. These programs implement a fast, simple Lempel-Ziv (LZW)
2240 file compression algorithm.")
2241 (license license:gpl2+)))
2242
2243 (define-public xarchiver
2244 (package
2245 (name "xarchiver")
2246 (version "0.5.4.16")
2247 (source
2248 (origin
2249 (method git-fetch)
2250 (uri (git-reference
2251 (url "https://github.com/ib/xarchiver")
2252 (commit version)))
2253 (file-name (git-file-name name version))
2254 (sha256
2255 (base32 "0nblyk65w1in0zpfbyzy6dw4x0fzx3q7xs85dby5ap4w0gjz9s44"))))
2256 (build-system glib-or-gtk-build-system)
2257 (native-inputs
2258 `(("gettext" ,gettext-minimal)
2259 ("intltool" ,intltool)
2260 ("libxslt" ,libxslt)
2261 ("pkg-config" ,pkg-config)))
2262 (inputs
2263 `(("adwaita-icon-theme" ,adwaita-icon-theme) ; hard-coded theme
2264 ("gtk+" ,gtk+)))
2265 (home-page "https://github.com/ib/xarchiver")
2266 (synopsis "Graphical front-end for archive operations")
2267 (description "Xarchiver is a front-end to various command line archiving
2268 tools. It uses GTK+ tool-kit and is designed to be desktop-environment
2269 independent. Supported formats are 7z, ARJ, bzip2, gzip, LHA, lzma, lzop,
2270 RAR, RPM, DEB, tar, and ZIP. It cannot perform functions for archives, whose
2271 archiver is not installed.")
2272 (license license:gpl2+)))
2273
2274 (define-public tarsplitter
2275 (package
2276 (name "tarsplitter")
2277 (version "2.2.0")
2278 (source (origin
2279 (method git-fetch)
2280 (uri (git-reference
2281 (url "https://github.com/AQUAOSOTech/tarsplitter")
2282 (commit (string-append "v" version))))
2283 (file-name (git-file-name name version))
2284 (sha256
2285 (base32
2286 "17qkg95r97kcrs17b0mcqswx99280ni47j5yx8xa7nl3bdhm6325"))))
2287 (build-system go-build-system)
2288 (arguments
2289 `(#:import-path "github.com/AQUAOSOTech/tarsplitter"
2290 #:install-source? #f
2291 #:phases
2292 (modify-phases %standard-phases
2293 (add-after 'install 'install-documentation
2294 (lambda* (#:key import-path outputs #:allow-other-keys)
2295 (let* ((source (string-append "src/" import-path))
2296 (out (assoc-ref outputs "out"))
2297 (doc (string-append out "/share/doc/" ,name "-" ,version)))
2298 (with-directory-excursion source
2299 (install-file "README.md" doc))
2300 #t))))))
2301 (home-page "https://github.com/AQUAOSOTech/tarsplitter")
2302 (synopsis "Multithreaded tar utility")
2303 (description
2304 "Archive huge numbers of files, or split massive tar archives into smaller
2305 chunks.")
2306 (license license:expat)))
2307
2308 (define-public c-blosc
2309 (package
2310 (name "c-blosc")
2311 (version "1.18.1")
2312 (source (origin
2313 (method git-fetch)
2314 (uri (git-reference
2315 (url "https://github.com/Blosc/c-blosc")
2316 (commit (string-append "v" version))))
2317 (file-name (git-file-name name version))
2318 (sha256
2319 (base32
2320 "1ywq8j70149859vvs19wgjq89d6xsvvmvm2n1dmkzpchxgrvnw70"))))
2321 (build-system cmake-build-system)
2322 (home-page "https://blosc.org")
2323 (synopsis "Blocking, shuffling and lossless compression library")
2324 (description
2325 "Blosc is a high performance compressor optimized for binary data. It has
2326 been designed to transmit data to the processor cache faster than the
2327 traditional, non-compressed, direct memory fetch approach via a
2328 @code{memcpy()} system call. Blosc is meant not only to reduce the size of
2329 large datasets on-disk or in-memory, but also to accelerate memory-bound
2330 computations.")
2331 ;; Blosc itself is released under BSD-3 but it incorporates code under
2332 ;; other non-copyleft licenses.
2333 (license license:bsd-3)))
2334
2335 (define-public ecm
2336 (package
2337 (name "ecm")
2338 (version "1.0.3")
2339 (source (origin
2340 (method git-fetch)
2341 (uri (git-reference
2342 (url "https://github.com/alucryd/ecm-tools")
2343 (commit (string-append "v" version))))
2344 (file-name (git-file-name name version))
2345 (sha256
2346 (base32
2347 "1rvyx5gcy8lfklgj80szlz3312x45wzx0d9jsgwyvy8f6m4nnb0c"))))
2348 (build-system gnu-build-system)
2349 (arguments
2350 `(#:tests? #f ; no check target
2351 #:make-flags
2352 (list (string-append "CC=" ,(cc-for-target))
2353 (string-append "DESTDIR=" (assoc-ref %outputs "out")))
2354 #:phases
2355 (modify-phases %standard-phases
2356 (replace 'configure
2357 (lambda _
2358 (substitute* "Makefile"
2359 (("\\$\\(DESTDIR\\)/usr") "$(DESTDIR)"))
2360 #t)))))
2361 (home-page "https://github.com/alucryd/ecm-tools")
2362 (synopsis "Error code modeler")
2363 (description "ECM is a utility that converts ECM files, i.e., CD data files
2364 with their error correction data losslessly rearranged for better compression,
2365 to their original, binary CD format.")
2366 (license license:gpl3+)))
2367
2368 (define-public tarlz
2369 (package
2370 (name "tarlz")
2371 (version "0.19")
2372 (source
2373 (origin
2374 (method url-fetch)
2375 (uri (string-append "mirror://savannah/lzip/tarlz/"
2376 "tarlz-" version ".tar.lz"))
2377 (sha256
2378 (base32 "09xal55973ivzpaja93jcc1pfla8gb3vrk8dx7pj9qvvz5aynf9n"))))
2379 (build-system gnu-build-system)
2380 (native-inputs
2381 `(("lzip" ,lzip)))
2382 (inputs
2383 `(("lzlib" ,lzlib)))
2384 (home-page "https://www.nongnu.org/lzip/tarlz.html")
2385 (synopsis "Combination of the tar archiver and the lzip compressor")
2386 (description
2387 "Tarlz is a massively parallel (multi-threaded) combined implementation of
2388 the tar archiver and the lzip compressor. Tarlz creates, lists, and extracts
2389 archives in a simplified and safer variant of the POSIX pax format compressed
2390 with lzip, keeping the alignment between tar members and lzip members. The
2391 resulting multimember tar.lz archive is fully backward compatible with standard
2392 tar tools like GNU tar, which treat it like any other tar.lz archive. Tarlz
2393 can append files to the end of such compressed archives.")
2394 (license license:gpl2+)))