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