gnu: xarchiver: Update to 0.5.4.17.
[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 `(;; Not designed for parallel testing.
813 ;; See https://github.com/lz4/lz4/issues/957#issuecomment-737419821
814 #:parallel-tests? #f
815 #:test-target "test"
816 #:make-flags (list (string-append "CC=" ,(cc-for-target))
817 (string-append "prefix=" (assoc-ref %outputs "out")))
818 #:phases
819 (modify-phases %standard-phases
820 (delete 'configure) ; no configure script
821 (add-before 'check 'disable-broken-test
822 (lambda _
823 (substitute* "tests/Makefile"
824 ;; This fails when $prefix is not a single top-level directory.
825 (("^test: (.*) test-install" _ targets)
826 (string-append "test: " targets)))
827 #t))
828 (add-after 'install 'move-static-library
829 (lambda* (#:key outputs #:allow-other-keys)
830 (let ((out (assoc-ref outputs "out"))
831 (static (assoc-ref outputs "static")))
832 (mkdir-p (string-append static "/lib"))
833 (rename-file (string-append out "/lib/liblz4.a")
834 (string-append static "/lib/liblz4.a"))
835 #t))))))
836 (home-page "https://www.lz4.org")
837 (synopsis "Compression algorithm focused on speed")
838 (description "LZ4 is a lossless compression algorithm, providing
839 compression speed at 400 MB/s per core (0.16 Bytes/cycle). It also features an
840 extremely fast decoder, with speed in multiple GB/s per core (0.71 Bytes/cycle).
841 A high compression derivative, called LZ4_HC, is also provided. It trades CPU
842 time for compression ratio.")
843 ;; The libraries (lz4, lz4hc, and xxhash) are BSD licenced. The command
844 ;; line interface programs (lz4, fullbench, fuzzer, datagen) are GPL2+.
845 (license (list license:bsd-2 license:gpl2+))))
846
847 (define-public squashfs-tools
848 (package
849 (name "squashfs-tools")
850 (version "4.4")
851 (source (origin
852 (method url-fetch)
853 (uri (string-append "mirror://sourceforge/squashfs/squashfs/"
854 "squashfs" version "/"
855 "squashfs" version ".tar.gz"))
856 (sha256
857 (base32
858 "0zmhvczscqz0mzh4b9m8m42asq14db0a6lc8clp5ljq5ybrv70d9"))))
859 (build-system gnu-build-system)
860 (arguments
861 `(#:tests? #f ; no check target
862 #:make-flags
863 (list (string-append "CC=" ,(cc-for-target))
864 "XZ_SUPPORT=1"
865 "LZO_SUPPORT=1"
866 "LZ4_SUPPORT=1"
867 (string-append "INSTALL_DIR=" %output "/bin"))
868 #:phases
869 (modify-phases %standard-phases
870 (replace 'configure
871 (lambda _
872 (chdir "squashfs-tools")
873 #t)))))
874 (inputs
875 `(("lz4" ,lz4)
876 ("lzo" ,lzo)
877 ("xz" ,xz)
878 ("zlib" ,zlib)))
879 (home-page "https://github.com/plougher/squashfs-tools")
880 (synopsis "Tools to create and extract squashfs file systems")
881 (description
882 "Squashfs is a highly compressed read-only file system for Linux. It uses
883 zlib to compress files, inodes, and directories. All blocks are packed to
884 minimize the data overhead, and block sizes of between 4K and 1M are supported.
885 It is intended to be used for archival use, for live CDs, and for embedded
886 systems where low overhead is needed. This package allows you to create and
887 extract such file systems.")
888 (license license:gpl2+)))
889
890 (define-public pigz
891 (package
892 (name "pigz")
893 (version "2.4")
894 (source (origin
895 (method url-fetch)
896 (uri (string-append "http://zlib.net/pigz/"
897 name "-" version ".tar.gz"))
898 (sha256
899 (base32
900 "0wsgw5vwl23jrnpsvd8v3xcp5k4waw5mk0164fynjhkv58i1dy54"))))
901 (build-system gnu-build-system)
902 (arguments
903 `(#:phases
904 (modify-phases %standard-phases
905 (delete 'configure)
906 (replace 'install
907 (lambda* (#:key outputs #:allow-other-keys)
908 (let* ((out (assoc-ref outputs "out"))
909 (bin (string-append out "/bin"))
910 (man (string-append out "/share/man/man1")))
911 (install-file "pigz" bin)
912 (symlink "pigz" (string-append bin "/unpigz"))
913 (install-file "pigz.1" man)
914 #t))))
915 #:make-flags
916 (list ,(string-append "CC=" (cc-for-target)))
917 #:test-target "tests"))
918 (inputs `(("zlib" ,zlib)))
919 (home-page "https://zlib.net/pigz/")
920 (synopsis "Parallel implementation of gzip")
921 (description
922 "This package provides a parallel implementation of gzip that exploits
923 multiple processors and multiple cores when compressing data.")
924
925 ;; Things under zopfli/ are under ASL2.0, but 4 files at the top-level,
926 ;; written by Mark Adler, are under another non-copyleft license.
927 (license license:asl2.0)))
928
929 (define-public pixz
930 (package
931 (name "pixz")
932 (version "1.0.7")
933 (source (origin
934 (method url-fetch)
935 (uri (string-append
936 "https://github.com/vasi/pixz/releases/download/v" version
937 "/pixz-" version ".tar.xz"))
938 (sha256
939 (base32
940 "1ifxr18f2h75gkcrkx8033kwmwmrcgxshpaawyc2n4dzn1p2rqz5"))))
941 (build-system gnu-build-system)
942 (native-inputs
943 `(("pkg-config" ,pkg-config)
944 ("libarchive" ,libarchive)))
945 (home-page "https://github.com/vasi/pixz")
946 (synopsis "Parallel indexing implementation of LZMA")
947 (description
948 "The existing XZ Utils provide great compression in the .xz file format,
949 but they produce just one big block of compressed data. Pixz instead produces
950 a collection of smaller blocks which makes random access to the original data
951 possible and can compress in parallel. This is especially useful for large
952 tarballs.")
953 (license license:bsd-2)))
954
955 (define-public bsdiff
956 (package
957 (name "bsdiff")
958 (version "4.3")
959 (home-page "https://www.daemonology.net/bsdiff/")
960 (source (origin
961 (method url-fetch)
962 (uri (string-append home-page name "-" version ".tar.gz"))
963 (sha256
964 (base32
965 "0j2zm3z271x5aw63mwhr3vymzn45p2vvrlrpm9cz2nywna41b0hq"))))
966 (build-system gnu-build-system)
967 (arguments
968 `(#:make-flags (list "INSTALL=install"
969 (string-append "CC=" ,(cc-for-target))
970 (string-append "PREFIX=" (assoc-ref %outputs "out")))
971 #:phases (modify-phases %standard-phases
972 (delete 'configure)
973 (add-before 'build 'fix-Makefile
974 (lambda _
975 (substitute* "Makefile"
976 ;; Adjust syntax to make it compatible with GNU Make.
977 (("^\\.") "")
978 ;; Help install(1) create the target directory.
979 (("\\$\\{PREFIX\\}") "-D -t ${PREFIX}"))
980 #t)))
981 #:tests? #f)) ;no tests
982 (inputs
983 `(("bzip2" ,bzip2)))
984 (synopsis "Patch binary files")
985 (description
986 "@command{bsdiff} and @command{bspatch} are tools for building and
987 applying patches to binary files. By using suffix sorting (specifically
988 Larsson and Sadakane's @code{qsufsort}) and taking advantage of how
989 executable files change, bsdiff routinely produces binary patches 50-80%
990 smaller than those produced by @code{Xdelta}.")
991 (license license:bsd-2)))
992
993 (define-public cabextract
994 (package
995 (name "cabextract")
996 (home-page "https://cabextract.org.uk/")
997 (version "1.9.1")
998 (source (origin
999 (method url-fetch)
1000 (uri (string-append home-page "cabextract-" version ".tar.gz"))
1001 (sha256
1002 (base32
1003 "19qwhl2r8ip95q4vxzxg2kp4p125hjmc9762sns1dwwf7ikm7hmg"))
1004 (modules '((guix build utils)))
1005 (snippet
1006 '(begin
1007 ;; Delete bundled libmspack.
1008 (delete-file-recursively "mspack")
1009 #t))))
1010 (build-system gnu-build-system)
1011 (arguments
1012 '(#:configure-flags '("--with-external-libmspack")
1013 #:phases
1014 (modify-phases %standard-phases
1015 ;; cabextract needs some of libmspack's header files.
1016 ;; These are located in the "mspack" directory of libmspack.
1017 (add-before 'build 'unpack-libmspack
1018 (lambda* (#:key inputs #:allow-other-keys)
1019 (let ((dir-name "libmspack-src"))
1020 (mkdir dir-name)
1021 (invoke "tar" "-xvf" (assoc-ref inputs "libmspack-source")
1022 "-C" dir-name "--strip-components" "1")
1023 (rename-file (string-append dir-name "/mspack")
1024 "mspack")
1025 (delete-file-recursively dir-name)
1026 #t))))))
1027 (native-inputs
1028 `(("pkg-config" ,pkg-config)))
1029 (inputs
1030 `(("libmspack" ,libmspack)
1031 ("libmspack-source" ,(package-source libmspack))))
1032 (synopsis "Tool to unpack Cabinet archives")
1033 (description "Extracts files out of Microsoft Cabinet (.cab) archives")
1034 ;; Some source files specify gpl2+, lgpl2+, however COPYING is gpl3.
1035 (license license:gpl3+)))
1036
1037 (define-public libjcat
1038 (package
1039 (name "libjcat")
1040 (version "0.1.6")
1041 (source
1042 (origin
1043 (method git-fetch)
1044 (uri
1045 (git-reference
1046 (url "https://github.com/hughsie/libjcat")
1047 (commit version)))
1048 (file-name (git-file-name name version))
1049 (sha256
1050 (base32 "1a2z34m8611xvna9kwch8ralxx7c9mk4rm9vrxx7p9hr8sbqbsaz"))))
1051 (build-system meson-build-system)
1052 (native-inputs
1053 `(("gobject-introspection" ,gobject-introspection)
1054 ("help2man" ,help2man)
1055 ("pkg-config" ,pkg-config)))
1056 (inputs
1057 `(("git" ,git)
1058 ("glib" ,glib)
1059 ("gnupg" ,gnupg)
1060 ("gnutls" ,gnutls)
1061 ("gpgme" ,gpgme)
1062 ("json-glib" ,json-glib)
1063 ("vala" ,vala)))
1064 (home-page "https://github.com/hughsie/libjcat")
1065 (synopsis "Library for reading and writing Jcat files")
1066 (description
1067 "This library allows reading and writing gzip-compressed JSON catalog
1068 files, which can be used to store GPG, PKCS-7 and SHA-256 checksums for each
1069 file.")
1070 (license license:lgpl2.1+)))
1071
1072 (define-public xdelta
1073 (package
1074 (name "xdelta")
1075 (version "3.1.0")
1076 (source
1077 (origin
1078 (method git-fetch)
1079 (uri (git-reference
1080 (url "https://github.com/jmacd/xdelta")
1081 (commit (string-append "v" version))))
1082 (file-name (git-file-name name version))
1083 (sha256
1084 (base32
1085 "09mmsalc7dwlvgrda56s2k927rpl3a5dzfa88aslkqcjnr790wjy"))
1086 (snippet
1087 ;; This file isn't freely distributable and has no effect on building.
1088 '(begin
1089 (delete-file "xdelta3/draft-korn-vcdiff.txt")
1090 #t))))
1091 (build-system gnu-build-system)
1092 (native-inputs
1093 `(("autoconf" ,autoconf)
1094 ("automake" ,automake)))
1095 (arguments
1096 `(#:phases
1097 (modify-phases %standard-phases
1098 (add-after 'unpack 'enter-build-directory
1099 (lambda _ (chdir "xdelta3") #t)))))
1100 (home-page "http://xdelta.org")
1101 (synopsis "Delta encoder for binary files")
1102 (description "xdelta encodes only the differences between two binary files
1103 using the VCDIFF algorithm and patch file format described in RFC 3284. It can
1104 also be used to apply such patches. xdelta is similar to @command{diff} and
1105 @command{patch}, but is not limited to plain text and does not generate
1106 human-readable output.")
1107 (license license:asl2.0)))
1108
1109 (define-public lrzip
1110 (package
1111 (name "lrzip")
1112 (version "0.631")
1113 (source
1114 (origin
1115 (method url-fetch)
1116 (uri (string-append
1117 "http://ck.kolivas.org/apps/lrzip/lrzip-" version ".tar.bz2"))
1118 (sha256
1119 (base32
1120 "0mb449vmmwpkalq732jdyginvql57nxyd31sszb108yps1lf448d"))
1121 (patches (search-patches "lrzip-CVE-2017-8842.patch"))))
1122 (build-system gnu-build-system)
1123 (native-inputs
1124 `(;; nasm is only required when building for 32-bit x86 platforms
1125 ,@(if (string-prefix? "i686" (or (%current-target-system)
1126 (%current-system)))
1127 `(("nasm" ,nasm))
1128 '())
1129 ("perl" ,perl)))
1130 (inputs
1131 `(("bzip2" ,bzip2)
1132 ("lzo" ,lzo)
1133 ("zlib" ,zlib)))
1134 (home-page "http://ck.kolivas.org/apps/lrzip/")
1135 (synopsis "Large file compressor with a very high compression ratio")
1136 (description "lrzip is a compression utility that uses long-range
1137 redundancy reduction to improve the subsequent compression ratio of
1138 larger files. It can then further compress the result with the ZPAQ or
1139 LZMA algorithms for maximum compression, or LZO for maximum speed. This
1140 choice between size or speed allows for either better compression than
1141 even LZMA can provide, or a higher speed than gzip while compressing as
1142 well as bzip2.")
1143 (license (list license:gpl3+
1144 license:public-domain)))) ; most files in lzma/
1145
1146 (define-public snappy
1147 (package
1148 (name "snappy")
1149 (version "1.1.8")
1150 (source
1151 (origin
1152 (method git-fetch)
1153 (uri (git-reference
1154 (url "https://github.com/google/snappy")
1155 (commit version)))
1156 (file-name (git-file-name name version))
1157 (sha256
1158 (base32 "1j0kslq2dvxgkcxl1gakhvsa731yrcvcaipcp5k8k7ayicvkv9jv"))
1159 (patches (search-patches "snappy-add-O2-flag-in-CmakeLists.txt.patch"))))
1160 (build-system cmake-build-system)
1161 (arguments
1162 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
1163 (home-page "https://github.com/google/snappy")
1164 (synopsis "Fast compressor/decompressor")
1165 (description "Snappy is a compression/decompression library. It does not
1166 aim for maximum compression, or compatibility with any other compression library;
1167 instead, it aims for very high speeds and reasonable compression. For instance,
1168 compared to the fastest mode of zlib, Snappy is an order of magnitude faster
1169 for most inputs, but the resulting compressed files are anywhere from 20% to
1170 100% bigger.")
1171 (license license:asl2.0)))
1172
1173 (define-public p7zip
1174 (package
1175 (name "p7zip")
1176 (version "16.02")
1177 (source (origin
1178 (method url-fetch)
1179 (uri (string-append "mirror://sourceforge/" name "/" name "/"
1180 version "/" name "_" version
1181 "_src_all.tar.bz2"))
1182 (sha256
1183 (base32
1184 "07rlwbbgszq8i7m8jh3x6j2w2hc9a72dc7fmqawnqkwlwb00mcjy"))
1185 (modules '((guix build utils)))
1186 (snippet
1187 '(begin
1188 ;; Remove non-free source files
1189 (for-each delete-file
1190 (append
1191 (find-files "CPP/7zip/Compress" "Rar.*")
1192 (find-files "CPP/7zip/Crypto" "Rar.*")
1193 (find-files "DOC/unRarLicense.txt")
1194 (find-files "Utils/file_Codecs_Rar_so.py")))
1195 (delete-file-recursively "CPP/7zip/Archive/Rar")
1196 (delete-file-recursively "CPP/7zip/Compress/Rar")
1197 #t))
1198 (patches (search-patches "p7zip-CVE-2016-9296.patch"
1199 "p7zip-CVE-2017-17969.patch"
1200 "p7zip-remove-unused-code.patch"))))
1201 (build-system gnu-build-system)
1202 (arguments
1203 `(#:make-flags
1204 (list (string-append "DEST_HOME=" (assoc-ref %outputs "out")) "all3")
1205 #:phases
1206 (modify-phases %standard-phases
1207 (replace 'configure
1208 (lambda* (#:key system outputs #:allow-other-keys)
1209 (invoke "cp"
1210 (let ((system ,(or (%current-target-system)
1211 (%current-system))))
1212 (cond
1213 ((string-prefix? "x86_64" system)
1214 "makefile.linux_amd64_asm")
1215 ((string-prefix? "i686" system)
1216 "makefile.linux_x86_asm_gcc_4.X")
1217 (else
1218 "makefile.linux_any_cpu_gcc_4.X")))
1219 "makefile.machine")))
1220 (replace 'check
1221 (lambda _
1222 (invoke "make" "test")
1223 (invoke "make" "test_7z")
1224 (invoke "make" "test_7zr"))))))
1225 (native-inputs
1226 (let ((system (or (%current-target-system)
1227 (%current-system))))
1228 `(,@(cond ((string-prefix? "x86_64" system)
1229 `(("yasm" ,yasm)))
1230 ((string-prefix? "i686" system)
1231 `(("nasm" ,nasm)))
1232 (else '())))))
1233 (home-page "http://p7zip.sourceforge.net/")
1234 (synopsis "Command-line file archiver with high compression ratio")
1235 (description "p7zip is a command-line port of 7-Zip, a file archiver that
1236 handles the 7z format which features very high compression ratios.")
1237 (license (list license:lgpl2.1+
1238 license:gpl2+
1239 license:public-domain))))
1240
1241 (define-public gzstream
1242 (package
1243 (name "gzstream")
1244 (version "1.5")
1245 (source (origin
1246 (method url-fetch)
1247 (uri
1248 ;; No versioned URL, but last release was in 2003.
1249 "http://www.cs.unc.edu/Research/compgeom/gzstream/gzstream.tgz")
1250 (file-name (string-append name "-" version ".tgz"))
1251 (sha256
1252 (base32
1253 "00y19pqjsdj5zcrx4p9j56pl73vayfwnb7y2hvp423nx0cwv5b4r"))
1254 (modules '((guix build utils)))
1255 (snippet
1256 ;; Remove pre-compiled object.
1257 '(begin
1258 (delete-file "gzstream.o")
1259 #t))))
1260 (build-system gnu-build-system)
1261 (arguments
1262 `(#:test-target "test"
1263 #:phases
1264 (modify-phases %standard-phases
1265 (delete 'configure)
1266 (replace 'install
1267 (lambda* (#:key outputs #:allow-other-keys)
1268 (let* ((out (assoc-ref outputs "out"))
1269 (lib (string-append out "/lib"))
1270 (include (string-append out "/include")))
1271 (install-file "libgzstream.a" lib)
1272 (install-file "gzstream.h" include)
1273 #t))))))
1274 (propagated-inputs `(("zlib" ,zlib)))
1275 (home-page "http://www.cs.unc.edu/Research/compgeom/gzstream/")
1276 (synopsis "Compressed C++ iostream")
1277 (description "gzstream is a small library for providing zlib
1278 functionality in a C++ iostream.")
1279 (license license:lgpl2.1+)))
1280
1281 (define-public zpaq
1282 (package
1283 (name "zpaq")
1284 (version "7.15")
1285 (source
1286 (origin
1287 (method url-fetch/zipbomb)
1288 (uri (string-append "http://mattmahoney.net/dc/zpaq"
1289 (string-delete #\. version) ".zip"))
1290 (sha256
1291 (base32
1292 "066l94yyladlfzri877nh2dhkvspagjn3m5bmv725fmhkr9c4pp8"))
1293 (modules '((guix build utils)))
1294 (snippet
1295 ;; Delete irrelevant pre-compiled binaries.
1296 '(begin
1297 (for-each delete-file (find-files "." "\\.exe$"))
1298 #t))))
1299 (build-system gnu-build-system)
1300 (arguments
1301 `(#:phases
1302 (modify-phases %standard-phases
1303 (delete 'configure)) ; no ‘configure’ script
1304 #:make-flags
1305 (list
1306 (string-append "CPPFLAGS=-Dunix"
1307 ,(match (or (%current-target-system)
1308 (%current-system))
1309 ("x86_64-linux" "")
1310 ("i686-linux" "")
1311 (_ " -DNOJIT")))
1312 ;; These should be safe, lowest-common-denominator instruction sets,
1313 ;; allowing for some optimisation while remaining reproducible.
1314 (string-append "CXXFLAGS=-O3 -DNDEBUG"
1315 ,(match (or (%current-target-system)
1316 (%current-system))
1317 ("x86_64-linux" " -march=nocona -mtune=generic")
1318 ("i686-linux" " -march=i686 -mtune=generic")
1319 ("armhf-linux" " -mtune=generic-armv7-a")
1320 (_ "")))
1321 (string-append "PREFIX="
1322 (assoc-ref %outputs "out")))))
1323 (native-inputs
1324 `(("perl" ,perl))) ; for pod2man
1325 (home-page "http://mattmahoney.net/dc/zpaq.html")
1326 (synopsis "Incremental journaling archiver")
1327 (description "ZPAQ is a command-line archiver for realistic situations with
1328 many duplicate and already compressed files. It backs up only those files
1329 modified since the last update. All previous versions remain untouched and can
1330 be independently recovered. Identical files are only stored once (known as
1331 @dfn{de-duplication}). Archives can also be encrypted.
1332
1333 ZPAQ is intended to back up user data, not entire operating systems. It ignores
1334 owner and group IDs, ACLs, extended attributes, or special file types like
1335 devices, sockets, or named pipes. It does not follow or restore symbolic links
1336 or junctions, and always follows hard links.")
1337 (license (list license:public-domain
1338 ;; libzpaq.cpp contains a mix of public-domain and
1339 ;; expat-licenced (or ‘MIT’) code.
1340 license:expat))))
1341
1342 (define-public unshield
1343 (package
1344 (name "unshield")
1345 (version "1.4.3")
1346 (source
1347 (origin (method git-fetch)
1348 (uri (git-reference
1349 (url "http://github.com/twogood/unshield")
1350 (commit version)))
1351 (file-name (git-file-name name version))
1352 (sha256
1353 (base32
1354 "19wn22vszhci8dfcixx5rliz7phx3lv5ablvhjlclvj75k2vsdqd"))))
1355 (build-system cmake-build-system)
1356 (inputs
1357 `(("zlib" ,zlib)
1358 ("openssl" ,openssl)
1359 ;; Test data that is otherwise downloaded with curl.
1360 ("unshield-avigomanager11b22.zip"
1361 ,(origin
1362 (method url-fetch)
1363 (uri (string-append
1364 "https://www.dropbox.com/s/8r4b6752swe3nhu/"
1365 "unshield-avigomanager11b22.zip?dl=1"))
1366 (sha256
1367 (base32 "0fwq7lih04if68wpwpsk5wjqyvh32db76a41sq6gbx4dn1lc3ddn"))
1368 (file-name "unshield-avigomanager11b22.zip")))
1369 ("unshield-baldurs_gate_patch_v1_1_4315_international.zip"
1370 ,(origin
1371 (method url-fetch)
1372 (uri (string-append
1373 "https://www.dropbox.com/s/9ruil8oi6amjbbk/"
1374 "unshield-baldurs_gate_patch_v1_1_4315_international.zip?dl=1"))
1375 (sha256
1376 (base32 "0spaxf6dardlhqxz3ys09fzamj007q3nfyw4xng6gh3qp9780maj"))
1377 (file-name "unshield-baldurs_gate_patch_v1_1_4315_international.zip")))
1378 ("unshield-the-feeble-files-spanish.zip"
1379 ,(origin
1380 (method url-fetch)
1381 (uri (string-append
1382 "https://www.dropbox.com/s/1ng0z9kfxc7eb1e/"
1383 "unshield-the-feeble-files-spanish.zip?dl=1"))
1384 (sha256
1385 (base32 "1k5cw6vnpja8yjlnhx5124xrw9i8s1l539hfdqqrqz3l5gn0bnyd"))
1386 (file-name "unshield-the-feeble-files-spanish.zip")))))
1387 (native-inputs
1388 `(("unzip" ,unzip)))
1389 (arguments
1390 `(#:out-of-source? #f
1391 #:phases
1392 (modify-phases %standard-phases
1393 (add-before 'check 'pre-check
1394 (lambda* (#:key inputs #:allow-other-keys)
1395 (for-each (lambda (i)
1396 (copy-file (assoc-ref inputs i)
1397 (string-append "test/v0/" i)))
1398 '("unshield-avigomanager11b22.zip"
1399 "unshield-baldurs_gate_patch_v1_1_4315_international.zip"
1400 "unshield-the-feeble-files-spanish.zip"))
1401 (substitute* (find-files "test/" "/*\\.sh")
1402 ;; Tests expect the unshield binary in a specific
1403 ;; location.
1404 (("/var/tmp/unshield/bin/unshield")
1405 (string-append (getcwd) "/src/unshield"))
1406 ;; We no longer need to download the data.
1407 ((".?URL=.*$") "")
1408 (("curl -(|f)sSL -o test.zip .*") ""))
1409 (substitute* "test/v0/avigomanager.sh"
1410 (("test.zip")
1411 (string-append (getcwd)
1412 "/test/v0/unshield-avigomanager11b22.zip")))
1413 (substitute* "test/v0/baldurs_gate_patch_v1_1_4315_international.sh"
1414 (("test.zip")
1415 (string-append
1416 (getcwd)
1417 "/test/v0/unshield-baldurs_gate_patch_v1_1_4315_international.zip")))
1418 (substitute* "test/v0/the-feeble-files-spanish.sh"
1419 (("test.zip")
1420 (string-append (getcwd)
1421 "/test/v0/unshield-the-feeble-files-spanish.zip")))
1422 #t))
1423 (replace 'check
1424 (lambda _
1425 (invoke "./run-tests.sh"))))))
1426 (home-page "https://github.com/twogood/unshield")
1427 (synopsis "Extract CAB files from InstallShield installers")
1428 (description
1429 "@command{unshield} is a tool and library for extracting @file{.cab}
1430 archives from InstallShield installers.")
1431 (license license:expat)))
1432
1433 (define-public zstd
1434 (package
1435 (name "zstd")
1436 (version "1.4.4")
1437 (source
1438 (origin
1439 (method url-fetch)
1440 (uri (string-append "https://github.com/facebook/zstd/releases/download/"
1441 "v" version "/zstd-" version ".tar.gz"))
1442 (sha256
1443 (base32 "05ckxap00qvc0j51d3ci38150cxsw82w7s9zgd5fgzspnzmp1vsr"))))
1444 (build-system gnu-build-system)
1445 (outputs '("out" ;1.2MiB executables and documentation
1446 "lib" ;1.2MiB shared library and headers
1447 "static")) ;1.2MiB static library
1448 (arguments
1449 `(#:phases
1450 (modify-phases %standard-phases
1451 (delete 'configure) ;no configure script
1452 (add-after 'install 'adjust-library-locations
1453 (lambda* (#:key outputs #:allow-other-keys)
1454 (let* ((out (assoc-ref outputs "out"))
1455 (lib (assoc-ref outputs "lib"))
1456 (static (assoc-ref outputs "static"))
1457 (shared-libs (string-append lib "/lib"))
1458 (static-libs (string-append static "/lib")))
1459 ;; Move the static library to its own output to save ~1MiB.
1460 (mkdir-p static-libs)
1461 (for-each (lambda (ar)
1462 (link ar (string-append static-libs "/"
1463 (basename ar)))
1464 (delete-file ar))
1465 (find-files shared-libs "\\.a$"))
1466
1467 ;; Make sure the pkg-config file refers to the right output.
1468 (substitute* (string-append shared-libs "/pkgconfig/libzstd.pc")
1469 (("^prefix=.*")
1470 (string-append "prefix=" lib "\n")))
1471
1472 #t))))
1473 #:make-flags
1474 ;; TODO: Integrate in next rebuild cycle.
1475 (list ,(if (%current-target-system)
1476 (string-append "CC=" (cc-for-target))
1477 "CC=gcc")
1478 (string-append "PREFIX=" (assoc-ref %outputs "out"))
1479 (string-append "LIBDIR=" (assoc-ref %outputs "lib") "/lib")
1480 (string-append "INCLUDEDIR=" (assoc-ref %outputs "lib") "/include")
1481 ;; Skip auto-detection of, and creating a dependency on, the build
1482 ;; environment's ‘xz’ for what amounts to a dubious feature anyway.
1483 "HAVE_LZMA=0"
1484 ;; Not currently detected, but be explicit & avoid surprises later.
1485 "HAVE_LZ4=0"
1486 "HAVE_ZLIB=0")))
1487 (home-page "https://facebook.github.io/zstd/")
1488 (synopsis "Zstandard real-time compression algorithm")
1489 (description "Zstandard (@command{zstd}) is a lossless compression algorithm
1490 that combines very fast operation with a compression ratio comparable to that of
1491 zlib. In most scenarios, both compression and decompression can be performed in
1492 ‘real time’. The compressor can be configured to provide the most suitable
1493 trade-off between compression ratio and speed, without affecting decompression
1494 speed.")
1495 (license (list license:bsd-3 ; the main top-level LICENSE file
1496 license:bsd-2 ; many files explicitly state 2-Clause
1497 license:gpl2 ; the main top-level COPYING file
1498 license:gpl3+ ; tests/gzip/*.sh
1499 license:expat ; lib/dictBuilder/divsufsort.[ch]
1500 license:public-domain ; zlibWrapper/examples/fitblk*
1501 license:zlib)))) ; zlibWrapper/{gz*.c,gzguts.h}
1502
1503 (define-public pzstd
1504 (package
1505 (name "pzstd")
1506 (version (package-version zstd))
1507 (source (package-source zstd))
1508 (build-system gnu-build-system)
1509 (inputs
1510 `(,@(if (%current-target-system)
1511 `(("googletest" ,googletest))
1512 '())))
1513 (native-inputs
1514 `(,@(if (%current-system)
1515 `(("googletest" ,googletest))
1516 '())))
1517 (arguments
1518 `(#:phases
1519 (modify-phases %standard-phases
1520 (add-after 'unpack 'enter-subdirectory
1521 (lambda _ (chdir "contrib/pzstd") #t))
1522 (delete 'configure) ; no configure script
1523 (add-before 'check 'compile-tests
1524 (lambda* (#:key make-flags #:allow-other-keys)
1525 (apply invoke "make" "tests" make-flags)))
1526 (add-after 'install 'install-documentation
1527 (lambda* (#:key outputs #:allow-other-keys)
1528 (let* ((out (assoc-ref outputs "out"))
1529 (doc (string-append out "/share/doc/" ,name)))
1530 (mkdir-p doc)
1531 (install-file "README.md" doc)
1532 #t))))
1533 #:make-flags
1534 (list (string-append "CC=" ,(cc-for-target))
1535 (string-append "CXX=" ,(cxx-for-target))
1536 (string-append "PREFIX=" (assoc-ref %outputs "out")))))
1537 (home-page (package-home-page zstd))
1538 (synopsis "Threaded implementation of the Zstandard compression algorithm")
1539 (description "Parallel Zstandard (PZstandard or @command{pzstd}) is a
1540 multi-threaded implementation of the @uref{http://zstd.net/, Zstandard
1541 compression algorithm}. It is fully compatible with the original Zstandard file
1542 format and command-line interface, and can be used as a drop-in replacement.
1543
1544 Compression is distributed over multiple processor cores to improve performance,
1545 as is the decompression of data compressed in this manner. Data compressed by
1546 other implementations will only be decompressed by two threads: one performing
1547 the actual decompression, the other input and output.")
1548 (license (package-license zstd))))
1549
1550 (define-public zip
1551 (package
1552 (name "zip")
1553 (version "3.0")
1554 (source
1555 (origin
1556 (method url-fetch)
1557 (uri (string-append "mirror://sourceforge/infozip"
1558 "/Zip%203.x%20%28latest%29/3.0/zip30.tar.gz"))
1559 (sha256
1560 (base32
1561 "0sb3h3067pzf3a7mlxn1hikpcjrsvycjcnj9hl9b1c3ykcgvps7h"))))
1562 (build-system gnu-build-system)
1563 (inputs `(("bzip2" ,bzip2)))
1564 (arguments
1565 `(#:tests? #f ; no test target
1566 #:make-flags (let ((out (assoc-ref %outputs "out")))
1567 (list "-f" "unix/Makefile"
1568 (string-append "prefix=" out)
1569 (string-append "MANDIR=" out "/share/man/man1")))
1570 #:phases
1571 (modify-phases %standard-phases
1572 (replace 'build
1573 (lambda* (#:key (make-flags '()) #:allow-other-keys)
1574 (apply invoke "make" "generic_gcc" make-flags)))
1575 (delete 'configure))))
1576 (home-page "http://www.info-zip.org/Zip.html")
1577 (synopsis "Compression and file packing utility")
1578 (description
1579 "Zip is a compression and file packaging/archive utility. Zip is useful
1580 for packaging a set of files for distribution, for archiving files, and for
1581 saving disk space by temporarily compressing unused files or directories.
1582 Zip puts one or more compressed files into a single ZIP archive, along with
1583 information about the files (name, path, date, time of last modification,
1584 protection, and check information to verify file integrity). An entire
1585 directory structure can be packed into a ZIP archive with a single command.
1586
1587 Zip has one compression method (deflation) and can also store files without
1588 compression. Zip automatically chooses the better of the two for each file.
1589 Compression ratios of 2:1 to 3:1 are common for text files.")
1590 (license (license:non-copyleft "file://LICENSE"
1591 "See LICENSE in the distribution."))))
1592
1593 (define-public unzip
1594 (package (inherit zip)
1595 (name "unzip")
1596 (version "6.0")
1597 (source
1598 (origin
1599 (method url-fetch)
1600 (uri (string-append "mirror://sourceforge/infozip"
1601 "/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz"))
1602 (sha256
1603 (base32
1604 "0dxx11knh3nk95p2gg2ak777dd11pr7jx5das2g49l262scrcv83"))
1605 (patches (search-patches "unzip-CVE-2014-8139.patch"
1606 "unzip-CVE-2014-8140.patch"
1607 "unzip-CVE-2014-8141.patch"
1608 "unzip-CVE-2014-9636.patch"
1609 "unzip-CVE-2015-7696.patch"
1610 "unzip-CVE-2015-7697.patch"
1611 "unzip-allow-greater-hostver-values.patch"
1612 "unzip-initialize-symlink-flag.patch"
1613 "unzip-remove-build-date.patch"
1614 "unzip-attribs-overflow.patch"
1615 "unzip-overflow-on-invalid-input.patch"
1616 "unzip-format-secure.patch"
1617 "unzip-overflow-long-fsize.patch"))))
1618 (build-system gnu-build-system)
1619 ;; no inputs; bzip2 is not supported, since not compiled with BZ_NO_STDIO
1620 (arguments
1621 `(#:phases (modify-phases %standard-phases
1622 (delete 'configure)
1623 (add-after 'unpack 'fortify
1624 (lambda _
1625 ;; Mitigate CVE-2018-1000035, an exploitable buffer overflow.
1626 ;; This environment variable is recommended in 'unix/Makefile'
1627 ;; for passing flags to the C compiler.
1628 (setenv "LOCAL_UNZIP" "-D_FORTIFY_SOURCE=1")
1629 #t))
1630 (replace 'build
1631 (lambda* (#:key make-flags #:allow-other-keys)
1632 (apply invoke "make"
1633 `("-j" ,(number->string
1634 (parallel-job-count))
1635 ,@make-flags
1636 "generic_gcc")))))
1637 #:make-flags (list "-f" "unix/Makefile"
1638 (string-append "prefix=" %output)
1639 (string-append "MANDIR=" %output "/share/man/man1"))))
1640 (home-page "http://www.info-zip.org/UnZip.html")
1641 (synopsis "Decompression and file extraction utility")
1642 (description
1643 "UnZip is an extraction utility for archives compressed in .zip format,
1644 also called \"zipfiles\".
1645
1646 UnZip lists, tests, or extracts files from a .zip archive. The default
1647 behaviour (with no options) is to extract into the current directory, and
1648 subdirectories below it, all files from the specified zipfile. UnZip
1649 recreates the stored directory structure by default.")
1650 (license (license:non-copyleft "file://LICENSE"
1651 "See LICENSE in the distribution."))))
1652
1653 (define-public ziptime
1654 (let ((commit "2a5bc9dfbf7c6a80e5f7cb4dd05b4036741478bc")
1655 (revision "0"))
1656 (package
1657 (name "ziptime")
1658 (version (git-version "0.0.0" revision commit))
1659 (source
1660 (origin
1661 (method git-fetch)
1662 (uri (git-reference
1663 (url "https://android.googlesource.com/platform/build")
1664 (commit commit)))
1665 (file-name (git-file-name name version))
1666 (sha256
1667 (base32 "0hrn61b3a97dlc4iqc28rwx8k8zf7ycbwzqqp93vj34zy5a541kn"))))
1668 (build-system gnu-build-system)
1669 (arguments
1670 `(#:tests? #f ; no test suite
1671 #:phases
1672 (modify-phases %standard-phases
1673 (add-after 'unpack 'change-directory
1674 (lambda _
1675 (chdir "tools/ziptime")))
1676 (delete 'configure) ; nothing to configure
1677 (replace 'build
1678 ;; There is no Makefile, only an ‘Android.bp’ file. Ignore it.
1679 (lambda _
1680 (let ((c++ ,(cxx-for-target)))
1681 (apply invoke c++ "-O2" "-o" "ziptime"
1682 (find-files "." "\\.cpp$")))))
1683 (replace 'install
1684 (lambda* (#:key outputs #:allow-other-keys)
1685 (let* ((out (assoc-ref outputs "out"))
1686 (bin (string-append out "/bin"))
1687 (doc (string-append out "/share/doc/" ,name "-" ,version)))
1688 (install-file "ziptime" bin)
1689 (install-file "README.txt" doc)))))))
1690 ;; There is no separate home page for this tiny bundled build tool.
1691 (home-page (string-append "https://android.googlesource.com/platform/build/"
1692 "+/master/tools/ziptime/README.txt"))
1693 (synopsis "Normalize @file{.zip} archive header timestamps")
1694 (description
1695 "Ziptime helps make @file{.zip} archives reproducible by replacing
1696 timestamps in the file header with a fixed time (1 January 2008).
1697
1698 ``Extra fields'' are not changed, so you'll need to use the @code{-X} option to
1699 @command{zip} to prevent it from storing the ``universal time'' field.")
1700 (license license:asl2.0))))
1701
1702 (define-public zziplib
1703 (package
1704 (name "zziplib")
1705 (version "0.13.69")
1706 (home-page "https://github.com/gdraheim/zziplib")
1707 (source (origin
1708 (method git-fetch)
1709 (uri (git-reference (url home-page)
1710 (commit (string-append "v" version))))
1711 (file-name (git-file-name name version))
1712 (patches (search-patches "zziplib-CVE-2018-16548.patch"))
1713 (sha256
1714 (base32
1715 "0fbk9k7ryas2wh2ykwkvm1pbi40i88rfvc3dydh9xyd7w2jcki92"))))
1716 (build-system gnu-build-system)
1717 (arguments
1718 `(#:phases (modify-phases %standard-phases
1719 (add-before 'check 'make-files-writable
1720 (lambda _
1721 (for-each make-file-writable
1722 (find-files "test" #:directories? #t))
1723 #t)))
1724
1725 ;; XXX: The default test target attempts to download external resources and
1726 ;; fails without error: <https://github.com/gdraheim/zziplib/issues/53>.
1727 ;; To prevent confusing log messages, just run a simple zip test that works.
1728 #:test-target "check-readme"))
1729 (inputs
1730 `(("zlib" ,zlib)))
1731 (native-inputs `(("perl" ,perl) ; for the documentation
1732 ("pkg-config" ,pkg-config)
1733 ;; for the documentation; Python 3 not supported,
1734 ;; http://forums.gentoo.org/viewtopic-t-863161-start-0.html
1735 ("python" ,python-2)
1736 ("zip" ,zip))) ; to create test files
1737 (synopsis "Library for accessing zip files")
1738 (description
1739 "ZZipLib is a library based on zlib for accessing zip files.")
1740 ;; zziplib is dual licensed under LGPL2.0+ and MPL1.1. Some example source
1741 ;; files carry the Zlib license; see "docs/copying.html" for details.
1742 (license (list license:lgpl2.0+ license:mpl1.1))))
1743
1744 (define-public libzip
1745 (package
1746 (name "libzip")
1747 (version "1.7.3")
1748 (source (origin
1749 (method url-fetch)
1750 (uri (string-append
1751 "https://libzip.org/download/libzip-" version ".tar.xz"))
1752 (sha256
1753 (base32
1754 "0ck1dk7zn5qzpgxklg0r26nfsf04xb6c46gsig060hkvvgzp6156"))))
1755 (native-inputs
1756 `(("perl" ,perl)))
1757 (inputs
1758 `(("gnutls" ,gnutls)
1759 ("liblzma" ,xz)
1760 ("openssl" ,openssl)
1761 ("zlib" ,zlib)))
1762 (build-system cmake-build-system)
1763 (home-page "https://libzip.org")
1764 (synopsis "C library for reading, creating, and modifying zip archives")
1765 (description "Libzip is a C library for reading, creating, and modifying
1766 zip archives. Files can be added from data buffers, files, or compressed data
1767 copied directly from other zip archives. Changes made without closing the
1768 archive can be reverted.")
1769 (license license:bsd-3)))
1770
1771 (define-public atool
1772 (package
1773 (name "atool")
1774 (version "0.39.0")
1775 (source
1776 (origin
1777 (method url-fetch)
1778 (uri (string-append "mirror://savannah/atool/atool-"
1779 version ".tar.gz"))
1780 (sha256
1781 (base32
1782 "0fvhzip2v08jgnlfpyj6rapan39xlsl1ksgq4lp8gfsai2ah1xma"))))
1783 (build-system gnu-build-system)
1784 (arguments
1785 `(#:phases
1786 (modify-phases %standard-phases
1787 (add-after 'unpack 'embed-absolute-file-name
1788 (lambda* (#:key inputs #:allow-other-keys)
1789 (substitute* "atool"
1790 (("(^\\$::cfg_path_file.*= )'file'" _ pre)
1791 (string-append pre "'" (assoc-ref inputs "file")
1792 "/bin/file'")))
1793 #t)))))
1794 (inputs
1795 `(("perl" ,perl)
1796 ("file" ,file)))
1797 (home-page "https://www.nongnu.org/atool/")
1798 (synopsis "Universal tool to manage file archives of various types")
1799 (description "The main command is @command{aunpack} which extracts files
1800 from an archive. The other commands provided are @command{apack} (to create
1801 archives), @command{als} (to list files in archives), and @command{acat} (to
1802 extract files to standard out). As @command{atool} invokes external programs
1803 to handle the archives, not all commands may be supported for a certain type
1804 of archives.")
1805 (license license:gpl2+)))
1806
1807 (define-public lunzip
1808 (package
1809 (name "lunzip")
1810 (version "1.12")
1811 (source
1812 (origin
1813 (method url-fetch)
1814 (uri (string-append "mirror://savannah/lzip/lunzip/"
1815 "lunzip-" version ".tar.gz"))
1816 (sha256
1817 (base32 "1liaynyy3qcs29hfk1pnb7i9r1mnmpw557j5v356qsv6qnm4lnz5"))))
1818 (build-system gnu-build-system)
1819 (arguments
1820 `(#:configure-flags
1821 (list ,(string-append "CC=" (cc-for-target)))))
1822 (home-page "https://www.nongnu.org/lzip/lunzip.html")
1823 (synopsis "Small, stand-alone lzip decompressor")
1824 (description
1825 "Lunzip is a decompressor for files in the lzip compression format (.lz),
1826 written as a single small C tool with no dependencies. This makes it
1827 well-suited to embedded and other systems without a C++ compiler, or for use in
1828 applications such as software installers that need only to decompress files,
1829 not compress them.
1830 Lunzip is intended to be fully compatible with the regular lzip package.")
1831 (license (list license:bsd-2 ; carg_parser.[ch]
1832 license:gpl2+)))) ; everything else
1833
1834 (define-public clzip
1835 (package
1836 (name "clzip")
1837 (version "1.11")
1838 (source
1839 (origin
1840 (method url-fetch)
1841 (uri (string-append "mirror://savannah/lzip/clzip/"
1842 "clzip-" version ".tar.gz"))
1843 (sha256
1844 (base32 "1h14dmc9fi10gcdpdpbgq1bwvcxvivppilj64pf720x8mw915mfr"))))
1845 (build-system gnu-build-system)
1846 (arguments
1847 `(#:configure-flags
1848 (list ,(string-append "CC=" (cc-for-target)))))
1849 (home-page "https://www.nongnu.org/lzip/clzip.html")
1850 (synopsis "Small, stand-alone lzip compressor and decompressor")
1851 (description
1852 "Clzip is a compressor and decompressor for files in the lzip compression
1853 format (.lz), written as a single small C tool with no dependencies. This makes
1854 it well-suited to embedded and other systems without a C++ compiler, or for use
1855 in other applications like package managers.
1856 Clzip is intended to be fully compatible with the regular lzip package.")
1857 (license (list license:bsd-2 ; carg_parser.[ch], lzd in clzip.texi
1858 license:gpl2+))))
1859
1860 (define-public lzlib
1861 (package
1862 (name "lzlib")
1863 (version "1.12")
1864 (source
1865 (origin
1866 (method url-fetch)
1867 (uri (string-append "mirror://savannah/lzip/lzlib/"
1868 "lzlib-" version ".tar.gz"))
1869 (sha256
1870 (base32 "1c9pwd6by8is4z8bs6j306jyy6pgm2dvsn4fr7fg2b5m5qj88pcf"))))
1871 (build-system gnu-build-system)
1872 (arguments
1873 `(#:configure-flags
1874 (list (string-append "CC=" ,(cc-for-target))
1875 "--disable-static"
1876 "--enable-shared"))) ; only static (.a) is built by default
1877 (home-page "https://www.nongnu.org/lzip/lzlib.html")
1878 (synopsis "Lzip data compression C library")
1879 (description
1880 "Lzlib is a C library for in-memory LZMA compression and decompression in
1881 the lzip format. It supports integrity checking of the decompressed data, and
1882 all functions are thread-safe. The library should never crash, even in case of
1883 corrupted input.")
1884 (license (list license:bsd-2 ; the library itself
1885 license:gpl2+)))) ; main.c (i.e. minilzip used by tests)
1886
1887 (define-public plzip
1888 (package
1889 (name "plzip")
1890 (version "1.9")
1891 (source
1892 (origin
1893 (method url-fetch)
1894 (uri (string-append "mirror://savannah/lzip/plzip/"
1895 "plzip-" version ".tar.gz"))
1896 (sha256
1897 (base32 "19zinpx7hssl6r3vilpvq2s7wha3545xan8b0vcvsxnyipdx3n0l"))))
1898 (build-system gnu-build-system)
1899 (inputs
1900 `(("lzlib" ,lzlib)))
1901 (home-page "https://www.nongnu.org/lzip/plzip.html")
1902 (synopsis "Parallel lossless data compressor for the lzip format")
1903 (description
1904 "Plzip is a massively parallel (multi-threaded) lossless data compressor
1905 and decompressor that uses the lzip file format (.lz). Files produced by plzip
1906 are fully compatible with lzip and can be rescued with lziprecover.
1907 On multiprocessor machines, plzip can compress and decompress large files much
1908 faster than lzip, at the cost of a slightly reduced compression ratio (0.4% to
1909 2%). The number of usable threads is limited by file size: on files of only a
1910 few MiB, plzip is no faster than lzip.
1911 Files that were compressed with regular lzip will also not be decompressed
1912 faster by plzip, unless the @code{-b} option was used: lzip usually produces
1913 single-member files which can't be decompressed in parallel.")
1914 (license (list license:bsd-2 ; arg_parser.{cc,h}
1915 license:gpl2+)))) ; everything else
1916
1917 (define-public innoextract
1918 (package
1919 (name "innoextract")
1920 (version "1.9")
1921 (source
1922 (origin
1923 (method url-fetch)
1924 (uri (string-append "https://constexpr.org/innoextract/files/"
1925 "innoextract-" version "/"
1926 "/innoextract-" version ".tar.gz"))
1927 (sha256
1928 (base32 "09l1z1nbl6ijqqwszdwch9mqr54qb7df0wp2sd77v17dq6gsci33"))))
1929 (build-system cmake-build-system)
1930 (arguments
1931 `(#:tests? #f))
1932 (inputs `(("boost" ,boost)
1933 ("libiconv" ,libiconv)
1934 ("xz" ,xz)))
1935 (native-inputs `(("pkg-config" ,pkg-config)))
1936 (home-page "https://constexpr.org/innoextract/")
1937 (synopsis "Tool for extracting Inno Setup installers")
1938 (description "innoextract allows extracting Inno Setup installers under
1939 non-Windows systems without running the actual installer using wine.")
1940 (license license:zlib)))
1941
1942 (define-public google-brotli
1943 (package
1944 (name "google-brotli")
1945 (version "1.0.9")
1946 (source
1947 (origin
1948 (method git-fetch)
1949 (uri (git-reference
1950 (url "https://github.com/google/brotli")
1951 (commit (string-append "v" version))))
1952 (file-name (git-file-name name version))
1953 (sha256
1954 (base32 "1fikasxf7r2dwlk8mv8w7nmjkn0jw5ic31ky3mvpkdzwgd4xfndl"))
1955 (modules '((guix build utils)))
1956 (snippet
1957 '(begin
1958 ;; Cherry-picked from upstream since the latest release
1959 ;; https://github.com/google/brotli/commit/09b0992b6acb7faa6fd3b23f9bc036ea117230fc
1960 (substitute* (find-files "scripts" "^lib.*pc\\.in")
1961 (("-R\\$\\{libdir\\} ") ""))
1962 #t))))
1963 (build-system cmake-build-system)
1964 (arguments
1965 `(#:phases
1966 (modify-phases %standard-phases
1967 (add-after 'install 'rename-static-libraries
1968 ;; The build tools put a 'static' suffix on the static libraries, but
1969 ;; other applications don't know how to find these.
1970 (lambda* (#:key outputs #:allow-other-keys)
1971 (let ((lib (string-append (assoc-ref %outputs "out") "/lib/")))
1972 (rename-file (string-append lib "libbrotlicommon-static.a")
1973 (string-append lib "libbrotlicommon.a"))
1974 (rename-file (string-append lib "libbrotlidec-static.a")
1975 (string-append lib "libbrotlidec.a"))
1976 (rename-file (string-append lib "libbrotlienc-static.a")
1977 (string-append lib "libbrotlienc.a"))
1978 #t))))
1979 #:configure-flags
1980 (list ;; Defaults to "lib64" on 64-bit archs.
1981 (string-append "-DCMAKE_INSTALL_LIBDIR="
1982 (assoc-ref %outputs "out") "/lib"))))
1983 (home-page "https://github.com/google/brotli")
1984 (synopsis "General-purpose lossless compression")
1985 (description "This package provides the reference implementation of Brotli,
1986 a generic-purpose lossless compression algorithm that compresses data using a
1987 combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd
1988 order context modeling, with a compression ratio comparable to the best
1989 currently available general-purpose compression methods. It is similar in speed
1990 with @code{deflate} but offers more dense compression.
1991
1992 The specification of the Brotli Compressed Data Format is defined in RFC 7932.")
1993 (license license:expat)))
1994
1995 (define-public brotli
1996 ;; We used to provide an older version under the name "brotli".
1997 (deprecated-package "brotli" google-brotli))
1998
1999 (define-public python-google-brotli
2000 (package
2001 (inherit google-brotli)
2002 (name "python-google-brotli")
2003 (build-system python-build-system)
2004 (arguments '())
2005 (synopsis "Python interface to google-brotli")
2006 (description "@code{python-google-brotli} provides a Python interface to
2007 @code{google-brotli}, an implementation of the Brotli lossless compression
2008 algorithm.")))
2009
2010 (define-public ucl
2011 (package
2012 (name "ucl")
2013 (version "1.03")
2014 (source (origin
2015 (method url-fetch)
2016 (uri (string-append "https://www.oberhumer.com/opensource/"
2017 name "/download/" name "-" version ".tar.gz"))
2018 (sha256
2019 (base32
2020 "0j036lkwsxvm15gr29n8wn07cqq79dswjs9k54939ms5zngjjrdq"))))
2021 (build-system gnu-build-system)
2022 (arguments
2023 `(;; UCL 1.03 fails to build with newer C standards.
2024 #:configure-flags '("CFLAGS=-std=gnu90"
2025 "--enable-shared" "--disable-static")))
2026 (home-page "https://www.oberhumer.com/opensource/ucl/")
2027 (synopsis "Portable lossless data compression library")
2028 (description "UCL implements a number of compression algorithms that
2029 achieve an excellent compression ratio while allowing fast decompression.
2030 Decompression requires no additional memory.
2031
2032 Compared to LZO, the UCL algorithms achieve a better compression ratio but
2033 decompression is a little bit slower.")
2034 (license license:gpl2+)))
2035
2036 (define-public upx
2037 (package
2038 (name "upx")
2039 (version "3.96")
2040 (source (origin
2041 (method url-fetch)
2042 (uri (string-append "https://github.com/upx/upx/releases/download/v"
2043 version "/upx-" version "-src.tar.xz"))
2044 (sha256
2045 (base32
2046 "051pk5jk8fcfg5mpgzj43z5p4cn7jy5jbyshyn78dwjqr7slsxs7"))))
2047 (build-system gnu-build-system)
2048 (native-inputs
2049 `(("perl" ,perl)))
2050 (inputs
2051 `(("ucl" ,ucl)
2052 ("zlib" ,zlib)))
2053 (arguments
2054 `(#:make-flags
2055 (list "all")
2056 #:phases
2057 (modify-phases %standard-phases
2058 (delete 'configure) ; no configure script
2059 (delete 'check) ; no test suite
2060 (add-before 'build 'patch-exec-bin-sh
2061 (lambda _
2062 (substitute* (list "Makefile"
2063 "src/Makefile")
2064 (("/bin/sh") (which "sh")))
2065 #t))
2066 (replace 'install
2067 (lambda* (#:key outputs #:allow-other-keys)
2068 (let* ((out (assoc-ref outputs "out"))
2069 (bin (string-append out "/bin")))
2070 (mkdir-p bin)
2071 (copy-file "src/upx.out" (string-append bin "/upx")))
2072 #t)))))
2073 (home-page "https://upx.github.io/")
2074 (synopsis "Compression tool for executables")
2075 (description
2076 "The Ultimate Packer for eXecutables (UPX) is an executable file
2077 compressor. UPX typically reduces the file size of programs and shared
2078 libraries by around 50%--70%, thus reducing disk space, network load times,
2079 download times, and other distribution and storage costs.")
2080 (license license:gpl2+)))
2081
2082 (define-public quazip
2083 (package
2084 (name "quazip")
2085 (version "0.9.1")
2086 (source (origin
2087 (method git-fetch)
2088 (uri (git-reference
2089 (url "https://github.com/stachenov/quazip")
2090 (commit (string-append "v" version))))
2091 (file-name (git-file-name name version))
2092 (sha256
2093 (base32
2094 "11icgwv2xyxhd1hm1add51xv54zwkcqkg85d1xqlgiigvbm196iq"))))
2095 (build-system cmake-build-system)
2096 (arguments
2097 `(#:tests? #f)) ;no test
2098 (native-inputs
2099 `(("doxygen" ,doxygen)))
2100 (inputs
2101 `(("qtbase" ,qtbase)
2102 ("zlib" ,zlib)))
2103 (home-page "https://stachenov.github.io/quazip/index.html")
2104 (synopsis "Qt/C++ wrapper for Minizip")
2105 (description "QuaZIP is a simple C++ wrapper over Gilles Vollant's
2106 ZIP/UNZIP package that can be used to access ZIP archives. It uses
2107 Trolltech's Qt toolkit.
2108
2109 QuaZIP allows you to access files inside ZIP archives using QIODevice
2110 API, and that means that you can also use QTextStream, QDataStream or
2111 whatever you would like to use on your zipped files.
2112
2113 QuaZIP provides complete abstraction of the ZIP/UNZIP API, for both
2114 reading from and writing to ZIP archives. ")
2115 ;; Project is distributed under LGPL, but "quazip/z*" "quazip/unzip.*" are
2116 ;; distributed under zlib terms.
2117 (license (list license:lgpl2.1+ license:zlib))))
2118
2119 (define-public zutils
2120 (package
2121 (name "zutils")
2122 (version "1.10")
2123 (source
2124 (origin
2125 (method url-fetch)
2126 (uri (string-append "mirror://savannah/zutils/zutils-" version ".tar.lz"))
2127 (sha256
2128 (base32 "15dimqp8zlqaaa2l46r22srp1py38mlmn69ph1j5fmrd54w43m0d"))))
2129 (build-system gnu-build-system)
2130 (arguments
2131 `(#:configure-flags
2132 (list "--sysconfdir=/etc")
2133 #:phases
2134 (modify-phases %standard-phases
2135 (add-before 'check 'disable-failing-tests
2136 ;; XXX https://lists.nongnu.org/archive/html/zutils-bug/2020-07/msg00005.html
2137 (lambda _
2138 (substitute* "testsuite/check.sh"
2139 (("\"\\$\\{ZGREP\\}\" -N -L \"GNU\"") "true")
2140 (("\"\\$\\{ZGREP\\}\" -N -L \"nx_pattern\"") "false"))
2141 #t))
2142 (replace 'install
2143 (lambda* (#:key make-flags outputs #:allow-other-keys)
2144 (apply invoke "make" "install"
2145 (string-append "sysconfdir=" (assoc-ref outputs "out")
2146 "/etc")
2147 make-flags))))))
2148 (native-inputs
2149 ;; Needed to extract the source tarball and run the test suite.
2150 `(("lzip" ,lzip)))
2151 (home-page "https://www.nongnu.org/zutils/zutils.html")
2152 (synopsis "Utilities that transparently operate on compressed files")
2153 (description
2154 "Zutils is a collection of utilities able to process any combination of
2155 compressed and uncompressed files transparently. If any given file, including
2156 standard input, is compressed, its decompressed content is used instead.
2157
2158 @command{zcat}, @command{zcmp}, @command{zdiff}, and @command{zgrep} are
2159 improved replacements for the shell scripts provided by GNU gzip.
2160 @command{ztest} tests the integrity of supported compressed files.
2161 @command{zupdate} recompresses files with lzip, similar to gzip's
2162 @command{znew}.
2163
2164 Supported compression formats are bzip2, gzip, lzip, and xz. Zutils uses
2165 external compressors: the compressor to be used for each format is configurable
2166 at run time, and must be installed separately.")
2167 (license (list license:bsd-2 ; arg_parser.{cc,h}
2168 license:gpl2+)))) ; the rest
2169
2170 (define-public makeself-safeextract
2171 (let ((commit "1a95e121fa8e3c02d307ae37b9b7834e616c3683"))
2172 (package
2173 (name "makeself-safeextract")
2174 (version (git-version "0.0.0" "1" commit))
2175 (home-page "https://github.com/ssokolow/makeself_safeextract")
2176 (source
2177 (origin
2178 (method git-fetch)
2179 (uri (git-reference
2180 (url home-page)
2181 (commit commit)))
2182 (file-name (git-file-name name version))
2183 (sha256
2184 (base32
2185 "1anlinaj9lvfi8bn00wp11vzqq0f9sig4fm9yrspisx31v0z4a2c"))))
2186 (build-system trivial-build-system)
2187 (inputs
2188 `(("python" ,python-2)
2189 ("p7zip" ,p7zip)
2190 ("unzip" ,unzip)))
2191 (arguments
2192 `(#:modules ((guix build utils))
2193 #:builder
2194 (begin
2195 (use-modules (guix build utils))
2196 (let* ((name "makeself_safeextract")
2197 (source (string-append (assoc-ref %build-inputs "source")
2198 "/" name ".py"))
2199 (bin (string-append (assoc-ref %outputs "out") "/bin"))
2200 (target (string-append bin "/" name))
2201 (python (string-append (assoc-ref %build-inputs "python") "/bin"))
2202 (7z (string-append (assoc-ref %build-inputs "p7zip") "/bin/7z"))
2203 (unzip (string-append (assoc-ref %build-inputs "unzip") "/bin/unzip")))
2204 (setenv "PATH" (string-append (getenv "PATH") ":" python))
2205 (mkdir-p bin)
2206 (copy-file source target)
2207 (substitute* target
2208 (("'7z'") (format #f "'~a'" 7z))
2209 (("'unzip'") (format #f "'~a'" unzip)))
2210 (patch-shebang target)))))
2211 (synopsis "Extract makeself and mojo archives without running untrusted code")
2212 (description "This package provides a script to unpack self-extracting
2213 archives generated by @command{makeself} or @command{mojo} without running the
2214 possibly untrusted extraction shell script.")
2215 (license license:gpl3+))))
2216
2217 (define-public ncompress
2218 (package
2219 (name "ncompress")
2220 (version "4.2.4.6")
2221 (source (origin
2222 (method git-fetch)
2223 (uri (git-reference
2224 (url "https://github.com/vapier/ncompress")
2225 (commit (string-append "v" version))))
2226 (patches (search-patches "ncompress-fix-softlinks.patch"))
2227 (file-name (string-append name "-" version ".tar.gz"))
2228 (sha256
2229 (base32
2230 "1a4yir1ilafz0nzxdwigj204j4yy2zljbc501nsaqqm3dxdap8zn"))))
2231 (arguments
2232 '(#:make-flags (list "CC=gcc"
2233 (string-append "BINDIR=" %output "/bin")
2234 (string-append "MANDIR=" %output "/share/man/man1"))
2235 #:phases (modify-phases %standard-phases
2236 (delete 'configure))))
2237 (build-system gnu-build-system)
2238 (home-page "https://github.com/vapier/ncompress/")
2239 (synopsis "Original Lempel-Ziv compress/uncompress programs")
2240 (description "(N)compress provides the original compress and uncompress
2241 programs that used to be the de facto UNIX standard for compressing and
2242 uncompressing files. These programs implement a fast, simple Lempel-Ziv (LZW)
2243 file compression algorithm.")
2244 (license license:gpl2+)))
2245
2246 (define-public xarchiver
2247 (package
2248 (name "xarchiver")
2249 (version "0.5.4.17")
2250 (source
2251 (origin
2252 (method git-fetch)
2253 (uri (git-reference
2254 (url "https://github.com/ib/xarchiver")
2255 (commit version)))
2256 (file-name (git-file-name name version))
2257 (sha256
2258 (base32 "00adrjpxqlaccrwjf65w3vhxfswdj0as8aj263c6f9b85llypc5v"))))
2259 (build-system glib-or-gtk-build-system)
2260 (native-inputs
2261 `(("gettext" ,gettext-minimal)
2262 ("intltool" ,intltool)
2263 ("libxslt" ,libxslt)
2264 ("pkg-config" ,pkg-config)))
2265 (inputs
2266 `(("adwaita-icon-theme" ,adwaita-icon-theme) ; hard-coded theme
2267 ("gtk+" ,gtk+)))
2268 (home-page "https://github.com/ib/xarchiver")
2269 (synopsis "Graphical front-end for archive operations")
2270 (description "Xarchiver is a front-end to various command line archiving
2271 tools. It uses GTK+ tool-kit and is designed to be desktop-environment
2272 independent. Supported formats are 7z, ARJ, bzip2, gzip, LHA, lzma, lzop,
2273 RAR, RPM, DEB, tar, and ZIP. It cannot perform functions for archives, whose
2274 archiver is not installed.")
2275 (license license:gpl2+)))
2276
2277 (define-public tarsplitter
2278 (package
2279 (name "tarsplitter")
2280 (version "2.2.0")
2281 (source (origin
2282 (method git-fetch)
2283 (uri (git-reference
2284 (url "https://github.com/AQUAOSOTech/tarsplitter")
2285 (commit (string-append "v" version))))
2286 (file-name (git-file-name name version))
2287 (sha256
2288 (base32
2289 "17qkg95r97kcrs17b0mcqswx99280ni47j5yx8xa7nl3bdhm6325"))))
2290 (build-system go-build-system)
2291 (arguments
2292 `(#:import-path "github.com/AQUAOSOTech/tarsplitter"
2293 #:install-source? #f
2294 #:phases
2295 (modify-phases %standard-phases
2296 (add-after 'install 'install-documentation
2297 (lambda* (#:key import-path outputs #:allow-other-keys)
2298 (let* ((source (string-append "src/" import-path))
2299 (out (assoc-ref outputs "out"))
2300 (doc (string-append out "/share/doc/" ,name "-" ,version)))
2301 (with-directory-excursion source
2302 (install-file "README.md" doc))
2303 #t))))))
2304 (home-page "https://github.com/AQUAOSOTech/tarsplitter")
2305 (synopsis "Multithreaded tar utility")
2306 (description
2307 "Archive huge numbers of files, or split massive tar archives into smaller
2308 chunks.")
2309 (license license:expat)))
2310
2311 (define-public c-blosc
2312 (package
2313 (name "c-blosc")
2314 (version "1.18.1")
2315 (source (origin
2316 (method git-fetch)
2317 (uri (git-reference
2318 (url "https://github.com/Blosc/c-blosc")
2319 (commit (string-append "v" version))))
2320 (file-name (git-file-name name version))
2321 (sha256
2322 (base32
2323 "1ywq8j70149859vvs19wgjq89d6xsvvmvm2n1dmkzpchxgrvnw70"))))
2324 (build-system cmake-build-system)
2325 (home-page "https://blosc.org")
2326 (synopsis "Blocking, shuffling and lossless compression library")
2327 (description
2328 "Blosc is a high performance compressor optimized for binary data. It has
2329 been designed to transmit data to the processor cache faster than the
2330 traditional, non-compressed, direct memory fetch approach via a
2331 @code{memcpy()} system call. Blosc is meant not only to reduce the size of
2332 large datasets on-disk or in-memory, but also to accelerate memory-bound
2333 computations.")
2334 ;; Blosc itself is released under BSD-3 but it incorporates code under
2335 ;; other non-copyleft licenses.
2336 (license license:bsd-3)))
2337
2338 (define-public ecm
2339 (package
2340 (name "ecm")
2341 (version "1.0.3")
2342 (source (origin
2343 (method git-fetch)
2344 (uri (git-reference
2345 (url "https://github.com/alucryd/ecm-tools")
2346 (commit (string-append "v" version))))
2347 (file-name (git-file-name name version))
2348 (sha256
2349 (base32
2350 "1rvyx5gcy8lfklgj80szlz3312x45wzx0d9jsgwyvy8f6m4nnb0c"))))
2351 (build-system gnu-build-system)
2352 (arguments
2353 `(#:tests? #f ; no check target
2354 #:make-flags
2355 (list (string-append "CC=" ,(cc-for-target))
2356 (string-append "DESTDIR=" (assoc-ref %outputs "out")))
2357 #:phases
2358 (modify-phases %standard-phases
2359 (replace 'configure
2360 (lambda _
2361 (substitute* "Makefile"
2362 (("\\$\\(DESTDIR\\)/usr") "$(DESTDIR)"))
2363 #t)))))
2364 (home-page "https://github.com/alucryd/ecm-tools")
2365 (synopsis "Error code modeler")
2366 (description "ECM is a utility that converts ECM files, i.e., CD data files
2367 with their error correction data losslessly rearranged for better compression,
2368 to their original, binary CD format.")
2369 (license license:gpl3+)))
2370
2371 (define-public tarlz
2372 (package
2373 (name "tarlz")
2374 (version "0.19")
2375 (source
2376 (origin
2377 (method url-fetch)
2378 (uri (string-append "mirror://savannah/lzip/tarlz/"
2379 "tarlz-" version ".tar.lz"))
2380 (sha256
2381 (base32 "09xal55973ivzpaja93jcc1pfla8gb3vrk8dx7pj9qvvz5aynf9n"))))
2382 (build-system gnu-build-system)
2383 (native-inputs
2384 `(("lzip" ,lzip)))
2385 (inputs
2386 `(("lzlib" ,lzlib)))
2387 (home-page "https://www.nongnu.org/lzip/tarlz.html")
2388 (synopsis "Combination of the tar archiver and the lzip compressor")
2389 (description
2390 "Tarlz is a massively parallel (multi-threaded) combined implementation of
2391 the tar archiver and the lzip compressor. Tarlz creates, lists, and extracts
2392 archives in a simplified and safer variant of the POSIX pax format compressed
2393 with lzip, keeping the alignment between tar members and lzip members. The
2394 resulting multimember tar.lz archive is fully backward compatible with standard
2395 tar tools like GNU tar, which treat it like any other tar.lz archive. Tarlz
2396 can append files to the end of such compressed archives.")
2397 (license license:gpl2+)))