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