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>
35 ;;; This file is part of GNU Guix.
37 ;;; GNU Guix is free software; you can redistribute it and/or modify it
38 ;;; under the terms of the GNU General Public License as published by
39 ;;; the Free Software Foundation; either version 3 of the License, or (at
40 ;;; your option) any later version.
42 ;;; GNU Guix is distributed in the hope that it will be useful, but
43 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
44 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45 ;;; GNU General Public License for more details.
47 ;;; You should have received a copy of the GNU General Public License
48 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
50 (define-module (gnu packages compression)
51 #:use-module ((guix licenses) #:prefix license:)
52 #:use-module (guix utils)
53 #:use-module (guix packages)
54 #:use-module (guix download)
55 #:use-module (guix git-download)
56 #:use-module (guix build-system cmake)
57 #:use-module (guix build-system glib-or-gtk)
58 #:use-module (guix build-system gnu)
59 #:use-module (guix build-system go)
60 #:use-module (guix build-system meson)
61 #:use-module (guix build-system python)
62 #:use-module (guix build-system trivial)
63 #:use-module (gnu packages)
64 #:use-module (gnu packages assembly)
65 #:use-module (gnu packages autotools)
66 #:use-module (gnu packages backup)
67 #:use-module (gnu packages base)
68 #:use-module (gnu packages boost)
69 #:use-module (gnu packages check)
70 #:use-module (gnu packages curl)
71 #:use-module (gnu packages documentation)
72 #:use-module (gnu packages file)
73 #:use-module (gnu packages gettext)
74 #:use-module (gnu packages glib)
75 #:use-module (gnu packages gnome)
76 #:use-module (gnu packages gnupg)
77 #:use-module (gnu packages gtk)
78 #:use-module (gnu packages man)
79 #:use-module (gnu packages maths)
80 #:use-module (gnu packages perl)
81 #:use-module (gnu packages pkg-config)
82 #:use-module (gnu packages python)
83 #:use-module (gnu packages qt)
84 #:use-module (gnu packages tls)
85 #:use-module (gnu packages valgrind)
86 #:use-module (gnu packages version-control)
87 #:use-module (gnu packages xml)
88 #:use-module (ice-9 match)
89 #:use-module ((srfi srfi-1) #:select (last)))
98 (uri (list (string-append "http://zlib.net/zlib-"
100 (string-append "mirror://sourceforge/libpng/zlib/"
101 version "/zlib-" version ".tar.gz")))
104 "18dighcs333gsvajvvgqp8l4cx7h1x7yx9gd5xacnk80spyykrf3"))))
105 (build-system gnu-build-system)
106 (outputs '("out" "static"))
109 (modify-phases %standard-phases
111 (lambda* (#:key outputs #:allow-other-keys)
112 ;; Zlib's home-made `configure' fails when passed
113 ;; extra flags like `--enable-fast-install', so we need to
114 ;; invoke it with just what it understand.
115 (let ((out (assoc-ref outputs "out")))
116 ;; 'configure' doesn't understand '--host'.
117 ,@(if (%current-target-system)
118 `((setenv "CHOST" ,(%current-target-system)))
120 (invoke "./configure"
121 (string-append "--prefix=" out)))))
122 (add-after 'install 'move-static-library
123 (lambda* (#:key outputs #:allow-other-keys)
124 (let ((out (assoc-ref outputs "out"))
125 (static (assoc-ref outputs "static")))
126 (with-directory-excursion (string-append out "/lib")
127 (install-file "libz.a" (string-append static "/lib"))
128 (delete-file "libz.a")
130 (home-page "https://zlib.net/")
131 (synopsis "Compression library")
133 "zlib is designed to be a free, general-purpose, legally unencumbered --
134 that is, not covered by any patents -- lossless data-compression library for
135 use on virtually any computer hardware and operating system. The zlib data
136 format is itself portable across platforms. Unlike the LZW compression method
137 used in Unix compress(1) and in the GIF image format, the compression method
138 currently used in zlib essentially never expands the data. (LZW can double or
139 triple the file size in extreme cases.) zlib's memory footprint is also
140 independent of the input data and can be reduced, if necessary, at some cost
142 (license license:zlib)))
144 (define-public minizip
147 (version (package-version zlib))
148 (source (package-source zlib))
149 (build-system gnu-build-system)
152 (modify-phases %standard-phases
153 (add-after 'unpack 'enter-source
154 (lambda _ (chdir "contrib/minizip") #t))
155 (add-after 'install 'remove-crypt-h
156 (lambda* (#:key outputs #:allow-other-keys)
157 ;; Remove <minizip/crypt.h> because it interferes with libc's
158 ;; <crypt.h> given that 'minizip.pc' says "-I…/include/minizip".
159 ;; Fedora does the same:
160 ;; <https://src.fedoraproject.org/rpms/zlib/c/4d2785ec3116947872f6f32dc4104e6d36d8a7a4?branch=master>.
161 (let ((out (assoc-ref outputs "out")))
162 (delete-file (string-append out "/include/minizip/crypt.h"))
165 `(("autoconf" ,autoconf)
166 ("automake" ,automake)
167 ("libtool" ,libtool)))
168 (propagated-inputs `(("zlib" ,zlib)))
169 (home-page (package-home-page zlib))
170 (synopsis "Zip Compression library")
172 "Minizip is a minimalistic library that supports compressing,
173 extracting and viewing ZIP archives. This version is extracted from
174 the @code{zlib} source.")
175 (license (package-license zlib))))
177 (define-public fastjar
183 (uri (string-append "mirror://savannah/fastjar/fastjar-"
187 "0iginbz2m15hcsa3x4y7v3mhk54gr1r7m3ghx0pg4n46vv2snmpi"))))
188 (build-system gnu-build-system)
189 (inputs `(("zlib" ,zlib)))
190 (home-page "https://savannah.nongnu.org/projects/fastjar")
191 (synopsis "Replacement for Sun's 'jar' utility")
193 "FastJar is an attempt to create a much faster replacement for Sun's
194 @code{jar} utility. Instead of being written in Java, FastJar is written in C.")
195 (license license:gpl2+)))
197 (define-public libtar
205 "ftp://ftp.feep.net/pub/software/libtar/libtar-"
208 "mirror://debian/pool/main/libt/libtar/libtar_"
209 version ".orig.tar.gz")))
212 "02cihzl77ia0dcz7z2cga2412vyhhs5pa2355q4wpwbyga2lrwjh"))
213 (patches (search-patches "libtar-CVE-2013-4420.patch"))))
214 (build-system gnu-build-system)
215 (arguments `(#:tests? #f)) ; no "check" target
217 `(("autoconf" ,autoconf)
218 ("automake" ,automake)
219 ("libtool" ,libtool)))
222 (synopsis "C library for manipulating POSIX tar files")
224 "libtar is a C library for manipulating POSIX tar files. It handles
225 adding and extracting files to/from a tar archive.")
226 (home-page "https://repo.or.cz/libtar.git")
227 (license license:bsd-3)))
235 (uri (string-append "mirror://gnu/gzip/gzip-"
239 "1h6p374d3j8d4cdfydzls021xa2yby8myc0h8d6m8bc7k6ncq9c4"))))
240 (build-system gnu-build-system)
241 (synopsis "General file (de)compression (using lzw)")
243 ;; FIXME: The test suite wants `less', and optionally Perl.
246 (modify-phases %standard-phases
247 (add-after 'unpack 'patch-for-glibc-2.28
249 ;; Adjust the bundled gnulib to work with glibc 2.28. See e.g.
250 ;; "m4-gnulib-libio.patch". This is a phase rather than patch
251 ;; or snippet to work around <https://bugs.gnu.org/32347>.
252 (substitute* (find-files "lib" "\\.c$")
253 (("#if defined _IO_ftrylockfile")
254 "#if defined _IO_EOF_SEEN"))
255 (substitute* "lib/stdio-impl.h"
256 (("^/\\* BSD stdio derived implementations")
257 (string-append "#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN\n"
258 "# define _IO_IN_BACKUP 0x100\n"
260 "/* BSD stdio derived implementations")))
262 (add-after 'unpack 'use-absolute-name-of-gzip
263 (lambda* (#:key outputs #:allow-other-keys)
264 (substitute* "gunzip.in"
266 (string-append "exec " (assoc-ref outputs "out")
270 "GNU Gzip provides data compression and decompression utilities; the
271 typical extension is \".gz\". Unlike the \"zip\" format, it compresses a single
272 file; as a result, it is often used in conjunction with \"tar\", resulting in
273 \".tar.gz\" or \".tgz\", etc.")
274 (license license:gpl3+)
275 (home-page "https://www.gnu.org/software/gzip/")))
283 (uri (string-append "https://sourceware.org/pub/bzip2/bzip2-"
287 "0s92986cv0p692icqlw1j42y9nld8zd83qwhzbqd61p1dqbh6nmb"))))
288 (build-system gnu-build-system)
290 `(#:modules ((guix build gnu-build-system)
295 (modify-phases %standard-phases
296 (add-after 'set-paths 'hide-input-bzip2
297 (lambda* (#:key inputs #:allow-other-keys)
298 (let ((bzip2 (assoc-ref inputs "bzip2")))
300 ;; Prevent the build system from retaining a reference to
301 ;; BZIP2 from INPUTS.
303 (setenv "LIBRARY_PATH"
304 (string-join (delete (string-append bzip2 "/lib")
305 (string-split (getenv "LIBRARY_PATH")
308 (format #t "environment variable `LIBRARY_PATH' set to `~a'~%"
309 (getenv "LIBRARY_PATH")))
310 (format #t "no bzip2 found, nothing done~%"))
313 (lambda* (#:key target #:allow-other-keys)
314 (when ,(%current-target-system)
315 ;; Cross-compilation: use the cross tools.
316 (substitute* (find-files "." "Makefile")
318 (string-append "CC = " target "-gcc\n"))
320 (string-append "AR = " target "-ar\n"))
322 (string-append "RANLIB = " target "-ranlib\n"))
323 (("^all:(.*)test" _ prerequisites)
324 ;; Remove 'all' -> 'test' dependency.
325 (string-append "all:" prerequisites "\n"))))
327 (add-before 'build 'build-shared-lib
328 (lambda* (#:key inputs #:allow-other-keys)
329 (patch-makefile-SHELL "Makefile-libbz2_so")
330 (invoke "make" "-f" "Makefile-libbz2_so")))
331 (add-after 'install 'install-shared-lib
332 (lambda* (#:key outputs #:allow-other-keys)
333 ;; The Makefile above does not have an 'install' target, nor does
334 ;; it create all the (un)versioned symlinks, so we handle it here.
335 (let* ((out (assoc-ref outputs "out"))
336 (libdir (string-append out "/lib"))
338 ;; Locate the built library (e.g. "libbz2.so.1.0.6").
339 (lib (car (scandir "."
341 (and (string-prefix? soname file)
343 (stat:type (lstat file))))))))
344 (soversion (string-drop lib (+ 1 (string-length soname)))))
345 (install-file lib libdir)
346 (with-directory-excursion libdir
347 ;; Create symlinks libbz2.so.1 -> libbz2.so.1.0, etc.
348 (let loop ((base soname)
349 (numbers (string-split soversion #\.)))
350 (unless (null? numbers)
351 (let ((so-file (string-append base "." (car numbers))))
352 (symlink so-file base)
353 (loop so-file (cdr numbers))))))
355 (add-after 'install-shared-lib 'move-static-lib
356 (lambda* (#:key outputs #:allow-other-keys)
357 (let ((out (assoc-ref outputs "out"))
358 (static (assoc-ref outputs "static")))
359 (with-directory-excursion (string-append out "/lib")
360 (install-file "libbz2.a" (string-append static "/lib"))
361 (delete-file "libbz2.a")
363 (add-after 'install-shared-lib 'patch-scripts
364 (lambda* (#:key outputs inputs #:allow-other-keys)
365 (let* ((out (assoc-ref outputs "out")))
366 (substitute* (string-append out "/bin/bzdiff")
370 #:make-flags (list (string-append "PREFIX="
371 (assoc-ref %outputs "out")))
373 ;; Don't attempt to run the tests when cross-compiling.
374 ,@(if (%current-target-system)
377 (outputs '("out" "static"))
378 (synopsis "High-quality data compression program")
380 "bzip2 is a freely available, patent free (see below), high-quality data
381 compressor. It typically compresses files to within 10% to 15% of the best
382 available techniques (the PPM family of statistical compressors), whilst
383 being around twice as fast at compression and six times faster at
385 (license (license:non-copyleft "file://LICENSE"
386 "See LICENSE in the distribution."))
387 (home-page "https://web.archive.org/web/20180801004107/http://www.bzip.org/")))
389 (define-public lbzip2
390 ;; The last 2.5 release is 4 years behind the newest commit (from 2018) and
391 ;; may create files that can't even be decompressed by newer bzip2 versions.
392 (let ((commit "b6dc48a7b9bfe6b340ed1f6d72133608ad57144b")
396 (version (git-version "2.5" revision commit))
401 (url "https://github.com/kjn/lbzip2")
404 (base32 "140xp00dmjsr6c3dwb4dwf0pzlgf159igri321inbinsjiclkngy"))
405 (file-name (git-file-name name version))))
406 (build-system gnu-build-system)
409 (modify-phases %standard-phases
410 (add-after 'unpack 'unpack-gnulib
411 (lambda* (#:key inputs #:allow-other-keys)
412 (let ((gnulib (assoc-ref inputs "gnulib")))
413 (copy-recursively gnulib "lib")
414 (setenv "PATH" (string-append "lib:" (getenv "PATH")))
416 (delete 'bootstrap) ; gnulib still has unpatched shebangs
417 (add-after 'patch-source-shebangs 'bootstrap
419 (invoke "sh" "build-aux/autogen.sh")
422 `(("autoconf" ,autoconf)
423 ("automake" ,automake)
425 ,(let ((commit "2d431ac35c4943a3655c07ba91870d2323321b43"))
429 (url "git://git.savannah.gnu.org/gnulib.git")
432 (base32 "1f0xr4w89bqvhzsfcflcagdixidrk41k00k7kpr91w9lazfis4kf"))
433 (file-name (git-file-name "gnulib" commit)))))
435 (synopsis "Parallel bzip2 compression utility")
437 "lbzip2 is a multi-threaded compression utility with support for the
438 bzip2 compressed file format. lbzip2 can process standard bz2 files in
439 parallel. It uses POSIX threading model (pthreads), which allows it to take
440 full advantage of symmetric multiprocessing (SMP) systems. It has been proven
441 to scale linearly, even to over one hundred processor cores. lbzip2 is fully
442 compatible with bzip2 – both at file format and command line level.")
443 ;; lbzip2.org now looks fishy. There is no source code to be found.
444 ;; Reported upstream: <https://github.com/kjn/lbzip2/issues/26>.
445 (home-page "https://github.com/kjn/lbzip2")
446 (license license:gpl3+))))
448 (define-public pbzip2
454 (uri (string-append "https://launchpad.net/pbzip2/"
455 (version-major+minor version) "/" version
456 "/+download/" name "-" version ".tar.gz"))
459 "1rnvgcdixjzbrmcr1nv9b6ccrjfrhryaj7jwz28yxxv6lam3xlcg"))))
460 (build-system gnu-build-system)
464 `(#:tests? #f ; no tests
465 #:phases (modify-phases %standard-phases
466 (delete 'configure)) ; no configure script
467 #:make-flags (list (string-append "PREFIX=" %output))))
468 (home-page (string-append "https://web.archive.org/web/20180412020219/"
469 "http://compression.ca/pbzip2/"))
470 (synopsis "Parallel bzip2 implementation")
472 "Pbzip2 is a parallel implementation of the bzip2 block-sorting file
473 compressor that uses pthreads and achieves near-linear speedup on SMP machines.
474 The output of this version is fully compatible with bzip2 v1.0.2 (i.e. anything
475 compressed with pbzip2 can be decompressed with bzip2).")
476 (license (license:non-copyleft "file://COPYING"
477 "See COPYING in the distribution."))))
485 (uri (list (string-append "http://tukaani.org/xz/xz-" version
487 (string-append "http://multiprecision.org/guix/xz-"
491 "0ibi2zsfaz6l756spjwc5rayf4ckgc9hwmy8qinppcyk4svz64mm"))))
492 (build-system gnu-build-system)
495 (modify-phases %standard-phases
496 (add-after 'install 'move-static-lib
497 (lambda* (#:key outputs #:allow-other-keys)
498 (let ((out (assoc-ref outputs "out"))
499 (static (assoc-ref outputs "static")))
500 (mkdir-p (string-append static "/lib"))
501 (rename-file (string-append out "/lib/liblzma.a")
502 (string-append static "/lib/liblzma.a"))
503 ;; Remove reference to the static library from the .la file
504 ;; so Libtool does the right thing when both the shared and
505 ;; static library is available.
506 (substitute* (string-append out "/lib/liblzma.la")
507 (("^old_library='liblzma.a'") "old_library=''"))
509 (outputs '("out" "static"))
510 (synopsis "General-purpose data compression")
512 "XZ Utils is free general-purpose data compression software with high
513 compression ratio. XZ Utils were written for POSIX-like systems, but also
514 work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils.
516 The core of the XZ Utils compression code is based on LZMA SDK, but it has
517 been modified quite a lot to be suitable for XZ Utils. The primary
518 compression algorithm is currently LZMA2, which is used inside the .xz
519 container format. With typical files, XZ Utils create 30 % smaller output
520 than gzip and 15 % smaller output than bzip2.")
521 (license (list license:gpl2+ license:lgpl2.1+)) ; bits of both
522 (home-page "https://tukaani.org/xz/")))
531 "https://github.com/fragglet/lhasa/releases/download/v"
532 version "/lhasa-" version ".tar.gz"))
535 "092zi9av18ma20c6h9448k0bapvx2plnp292741dvfd9hmgqxc1z"))))
536 (build-system gnu-build-system)
539 (modify-phases %standard-phases
540 (add-before 'check 'set-up-test-environment
541 (lambda* (#:key inputs #:allow-other-keys)
542 (setenv "TZDIR" (string-append (assoc-ref inputs "tzdata")
546 `(("tzdata" ,tzdata-for-tests)))
547 (home-page "https://fragglet.github.com/lhasa/")
548 (synopsis "LHA archive decompressor")
549 (description "Lhasa is a replacement for the Unix LHA tool, for
550 decompressing .lzh (LHA / LHarc) and .lzs (LArc) archives. The backend for the
551 tool is a library, so that it can be reused for other purposes. Lhasa aims to
552 be compatible with as many types of lzh/lzs archives as possible. It also aims
553 to generate the same output as the (non-free) Unix LHA tool, so that it will
554 act as a free drop-in replacement.")
555 (license license:isc)))
564 (uri (string-append "http://www.oberhumer.com/opensource/lzo/download/lzo-"
568 "0wm04519pd3g8hqpjqhfr72q8qmbiwqaxcs3cndny9h86aa95y60"))))
569 (build-system gnu-build-system)
570 (arguments '(#:configure-flags '("--enable-shared")))
571 (home-page "http://www.oberhumer.com/opensource/lzo")
573 "Data compression library suitable for real-time data de-/compression")
575 "LZO is a data compression library which is suitable for data
576 de-/compression in real-time. This means it favours speed over
579 LZO is written in ANSI C. Both the source code and the compressed data
580 format are designed to be portable across platforms.")
581 (license license:gpl2+)))
590 (uri (string-append "http://www.lzop.org/download/lzop-"
594 "0h9gb8q7y54m9mvy3jvsmxf21yx8fc3ylzh418hgbbv0i8mbcwky"))))
595 (build-system gnu-build-system)
596 (inputs `(("lzo" ,lzo)))
597 (home-page "https://www.lzop.org/")
598 (synopsis "Compress or expand files")
600 "Lzop is a file compressor which is very similar to gzip. Lzop uses the
601 LZO data compression library for compression services, and its main advantages
602 over gzip are much higher compression and decompression speed (at the cost of
603 some compression ratio).")
604 (license license:gpl2+)))
612 (uri (string-append "mirror://savannah/lzip/lzip-"
616 "12qdcw5k1cx77brv9yxi1h4dzwibhfmdpigrj43nfk8nscwm12z4"))))
617 (build-system gnu-build-system)
618 (home-page "https://www.nongnu.org/lzip/lzip.html")
619 (synopsis "Lossless data compressor based on the LZMA algorithm")
621 "Lzip is a lossless data compressor with a user interface similar to the
622 one of gzip or bzip2. Lzip decompresses almost as fast as gzip and compresses
623 more than bzip2, which makes it well-suited for software distribution and data
624 archiving. Lzip is a clean implementation of the LZMA algorithm.")
625 (license license:gpl3+)))
627 (define-public lziprecover
633 (uri (string-append "mirror://savannah/lzip/lziprecover/"
634 "lziprecover-" version ".tar.gz"))
637 "0qh8dnhr5rly2k9dnx43qqynqwqzi5kfb15pyd29qwppfl4qm5gx"))))
638 (build-system gnu-build-system)
639 (home-page "https://www.nongnu.org/lzip/lziprecover.html")
640 (synopsis "Recover and decompress data from damaged lzip files")
642 "Lziprecover is a data recovery tool and decompressor for files in the lzip
643 compressed data format (.lz). It can test the integrity of lzip files, extract
644 data from damaged ones, and repair most files with small errors (up to one
645 single-byte error per member) entirely.
647 Lziprecover is not a replacement for regular backups, but a last line of defence
648 when even the backups are corrupt. It can recover files by merging the good
649 parts of two or more damaged copies, such as can be easily produced by running
650 @command{ddrescue} on a failing device.
652 This package also includes @command{unzcrash}, a tool to test the robustness of
653 decompressors when faced with corrupted input.")
654 (license (list license:bsd-2 ; arg_parser.{cc,h}
655 license:gpl2+)))) ; everything else
657 (define-public sharutils
664 (uri (string-append "mirror://gnu/sharutils/sharutils-"
666 (patches (search-patches "sharutils-CVE-2018-1000097.patch"))
669 "16isapn8f39lnffc3dp4dan05b7x6mnc76v6q5nn8ysxvvvwy19b"))
670 (modules '((guix build utils)))
673 (substitute* (find-files "lib" "\\.c$")
674 (("#if defined _IO_ftrylockfile")
675 "#if defined _IO_EOF_SEEN"))
676 (substitute* "lib/stdio-impl.h"
677 (("^/\\* BSD stdio derived implementations")
678 (string-append "#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN\n"
679 "# define _IO_IN_BACKUP 0x100\n"
681 "/* BSD stdio derived implementations")))
683 (build-system gnu-build-system)
688 (modify-phases %standard-phases
689 (add-after 'patch-source-shebangs 'unpatch-source-shebang
690 ;; revert the patch-shebang phase on a script which is
693 (substitute* "tests/shar-1.ok"
694 (((which "sh")) "/bin/sh"))
696 (home-page "https://www.gnu.org/software/sharutils/")
697 (synopsis "Archives in shell scripts, uuencode/uudecode")
699 "GNU sharutils is a package for creating and manipulating shell
700 archives that can be readily emailed. A shell archive is a file that can be
701 processed by a Bourne-type shell to unpack the original collection of files.
702 This package is mostly for compatibility and historical interest.")
703 (license license:gpl3+)))
705 (define-public sfarklib
712 (url "https://github.com/raboof/sfArkLib")
714 (file-name (git-file-name name version))
717 "0jrxy24gak7q5ml06p5jjgzk9i5r2mkfjk4ycirkp4kg7k5a237w"))))
718 (build-system gnu-build-system)
720 `(#:tests? #f ;no "check" target
722 (modify-phases %standard-phases
724 (lambda* (#:key outputs #:allow-other-keys)
725 (substitute* "Makefile"
726 (("/usr/local") (assoc-ref outputs "out")))
730 (home-page "https://github.com/raboof/sfArkLib")
731 (synopsis "Library for SoundFont decompression")
733 "SfArkLib is a C++ library for decompressing SoundFont files compressed
734 with the sfArk algorithm.")
735 (license license:gpl3+)))
737 (define-public sfarkxtc
738 (let ((commit "13cd6f93725a90d91ec5ea75babf1dbd694ac463")
742 (version (git-version "0" revision commit))
744 ;; There are no release tarballs, so we just fetch the latest
745 ;; commit at this time.
748 (url "https://github.com/raboof/sfarkxtc")
750 (file-name (git-file-name name version))
753 "1mb1jyk1m11l1gppd9hmql9cyp55sdf7jk5rbc7acky1z4k4mv19"))))
754 (build-system gnu-build-system)
756 `(#:tests? #f ;no "check" target
758 (modify-phases %standard-phases
760 (lambda* (#:key outputs #:allow-other-keys)
761 (substitute* "Makefile"
762 (("/usr/local") (assoc-ref outputs "out")))
766 ("sfarklib" ,sfarklib)))
767 (home-page "https://github.com/raboof/sfarkxtc")
768 (synopsis "Basic sfArk decompressor")
769 (description "SfArk extractor converts SoundFonts in the compressed legacy
770 sfArk file format to the uncompressed sf2 format.")
771 (license license:gpl3+))))
773 (define-public libmspack
776 (home-page "https://cabextract.org.uk/libmspack/")
781 (uri (string-append home-page name "-" version "alpha.tar.gz"))
783 (base32 "13janaqsvm7aqc4agjgd4819pbgqv50j88bh5kci1z70wvg65j5s"))))
784 (build-system gnu-build-system)
786 `(#:configure-flags '("--disable-static")))
787 (synopsis "Compression tools for some formats used by Microsoft")
789 "The purpose of libmspack is to provide both compression and
790 decompression of some loosely related file formats used by Microsoft.")
791 (license license:lgpl2.1+)))
800 (uri (git-reference (url "https://github.com/lz4/lz4")
801 (commit (string-append "v" version))))
803 (base32 "1w02kazh1fps3sji2sn89fz862j1199c5ajrqcgl1bnlxj09kcbz"))
804 (file-name (git-file-name name version))))
805 (build-system gnu-build-system)
806 (outputs (list "out" "static"))
810 ("valgrind" ,valgrind)))
812 `(;; Not designed for parallel testing.
813 ;; See https://github.com/lz4/lz4/issues/957#issuecomment-737419821
816 #:make-flags (list (string-append "CC=" ,(cc-for-target))
817 (string-append "prefix=" (assoc-ref %outputs "out")))
819 (modify-phases %standard-phases
820 (delete 'configure) ; no configure script
821 (add-before 'check 'disable-broken-test
823 (substitute* "tests/Makefile"
824 ;; This fails when $prefix is not a single top-level directory.
825 (("^test: (.*) test-install" _ targets)
826 (string-append "test: " targets)))
828 (add-after 'install 'move-static-library
829 (lambda* (#:key outputs #:allow-other-keys)
830 (let ((out (assoc-ref outputs "out"))
831 (static (assoc-ref outputs "static")))
832 (mkdir-p (string-append static "/lib"))
833 (rename-file (string-append out "/lib/liblz4.a")
834 (string-append static "/lib/liblz4.a"))
836 (home-page "https://www.lz4.org")
837 (synopsis "Compression algorithm focused on speed")
838 (description "LZ4 is a lossless compression algorithm, providing
839 compression speed at 400 MB/s per core (0.16 Bytes/cycle). It also features an
840 extremely fast decoder, with speed in multiple GB/s per core (0.71 Bytes/cycle).
841 A high compression derivative, called LZ4_HC, is also provided. It trades CPU
842 time for compression ratio.")
843 ;; The libraries (lz4, lz4hc, and xxhash) are BSD licenced. The command
844 ;; line interface programs (lz4, fullbench, fuzzer, datagen) are GPL2+.
845 (license (list license:bsd-2 license:gpl2+))))
847 (define-public squashfs-tools
849 (name "squashfs-tools")
853 (uri (string-append "mirror://sourceforge/squashfs/squashfs/"
854 "squashfs" version "/"
855 "squashfs" version ".tar.gz"))
858 "0zmhvczscqz0mzh4b9m8m42asq14db0a6lc8clp5ljq5ybrv70d9"))))
859 (build-system gnu-build-system)
861 `(#:tests? #f ; no check target
863 (list (string-append "CC=" ,(cc-for-target))
867 (string-append "INSTALL_DIR=" %output "/bin"))
869 (modify-phases %standard-phases
872 (chdir "squashfs-tools")
879 (home-page "https://github.com/plougher/squashfs-tools")
880 (synopsis "Tools to create and extract squashfs file systems")
882 "Squashfs is a highly compressed read-only file system for Linux. It uses
883 zlib to compress files, inodes, and directories. All blocks are packed to
884 minimize the data overhead, and block sizes of between 4K and 1M are supported.
885 It is intended to be used for archival use, for live CDs, and for embedded
886 systems where low overhead is needed. This package allows you to create and
887 extract such file systems.")
888 (license license:gpl2+)))
896 (uri (string-append "http://zlib.net/pigz/"
897 name "-" version ".tar.gz"))
900 "0wsgw5vwl23jrnpsvd8v3xcp5k4waw5mk0164fynjhkv58i1dy54"))))
901 (build-system gnu-build-system)
904 (modify-phases %standard-phases
907 (lambda* (#:key outputs #:allow-other-keys)
908 (let* ((out (assoc-ref outputs "out"))
909 (bin (string-append out "/bin"))
910 (man (string-append out "/share/man/man1")))
911 (install-file "pigz" bin)
912 (symlink "pigz" (string-append bin "/unpigz"))
913 (install-file "pigz.1" man)
916 (list ,(string-append "CC=" (cc-for-target)))
917 #:test-target "tests"))
918 (inputs `(("zlib" ,zlib)))
919 (home-page "https://zlib.net/pigz/")
920 (synopsis "Parallel implementation of gzip")
922 "This package provides a parallel implementation of gzip that exploits
923 multiple processors and multiple cores when compressing data.")
925 ;; Things under zopfli/ are under ASL2.0, but 4 files at the top-level,
926 ;; written by Mark Adler, are under another non-copyleft license.
927 (license license:asl2.0)))
936 "https://github.com/vasi/pixz/releases/download/v" version
937 "/pixz-" version ".tar.xz"))
940 "1ifxr18f2h75gkcrkx8033kwmwmrcgxshpaawyc2n4dzn1p2rqz5"))))
941 (build-system gnu-build-system)
943 `(("pkg-config" ,pkg-config)
944 ("libarchive" ,libarchive)))
945 (home-page "https://github.com/vasi/pixz")
946 (synopsis "Parallel indexing implementation of LZMA")
948 "The existing XZ Utils provide great compression in the .xz file format,
949 but they produce just one big block of compressed data. Pixz instead produces
950 a collection of smaller blocks which makes random access to the original data
951 possible and can compress in parallel. This is especially useful for large
953 (license license:bsd-2)))
955 (define-public bsdiff
959 (home-page "https://www.daemonology.net/bsdiff/")
962 (uri (string-append home-page name "-" version ".tar.gz"))
965 "0j2zm3z271x5aw63mwhr3vymzn45p2vvrlrpm9cz2nywna41b0hq"))))
966 (build-system gnu-build-system)
968 `(#:make-flags (list "INSTALL=install"
969 (string-append "CC=" ,(cc-for-target))
970 (string-append "PREFIX=" (assoc-ref %outputs "out")))
971 #:phases (modify-phases %standard-phases
973 (add-before 'build 'fix-Makefile
975 (substitute* "Makefile"
976 ;; Adjust syntax to make it compatible with GNU Make.
978 ;; Help install(1) create the target directory.
979 (("\\$\\{PREFIX\\}") "-D -t ${PREFIX}"))
981 #:tests? #f)) ;no tests
984 (synopsis "Patch binary files")
986 "@command{bsdiff} and @command{bspatch} are tools for building and
987 applying patches to binary files. By using suffix sorting (specifically
988 Larsson and Sadakane's @code{qsufsort}) and taking advantage of how
989 executable files change, bsdiff routinely produces binary patches 50-80%
990 smaller than those produced by @code{Xdelta}.")
991 (license license:bsd-2)))
993 (define-public cabextract
996 (home-page "https://cabextract.org.uk/")
1000 (uri (string-append home-page "cabextract-" version ".tar.gz"))
1003 "19qwhl2r8ip95q4vxzxg2kp4p125hjmc9762sns1dwwf7ikm7hmg"))
1004 (modules '((guix build utils)))
1007 ;; Delete bundled libmspack.
1008 (delete-file-recursively "mspack")
1010 (build-system gnu-build-system)
1012 '(#:configure-flags '("--with-external-libmspack")
1014 (modify-phases %standard-phases
1015 ;; cabextract needs some of libmspack's header files.
1016 ;; These are located in the "mspack" directory of libmspack.
1017 (add-before 'build 'unpack-libmspack
1018 (lambda* (#:key inputs #:allow-other-keys)
1019 (let ((dir-name "libmspack-src"))
1021 (invoke "tar" "-xvf" (assoc-ref inputs "libmspack-source")
1022 "-C" dir-name "--strip-components" "1")
1023 (rename-file (string-append dir-name "/mspack")
1025 (delete-file-recursively dir-name)
1028 `(("pkg-config" ,pkg-config)))
1030 `(("libmspack" ,libmspack)
1031 ("libmspack-source" ,(package-source libmspack))))
1032 (synopsis "Tool to unpack Cabinet archives")
1033 (description "Extracts files out of Microsoft Cabinet (.cab) archives")
1034 ;; Some source files specify gpl2+, lgpl2+, however COPYING is gpl3.
1035 (license license:gpl3+)))
1037 (define-public libjcat
1046 (url "https://github.com/hughsie/libjcat")
1048 (file-name (git-file-name name version))
1050 (base32 "0rxyqikdhkh2nq1y0hy05df2kkxf3d2cp6lm5x1s5i717k6y3zy5"))))
1051 (build-system meson-build-system)
1053 `(("gobject-introspection" ,gobject-introspection)
1054 ("help2man" ,help2man)
1055 ("pkg-config" ,pkg-config)))
1062 ("json-glib" ,json-glib)
1064 (home-page "https://github.com/hughsie/libjcat")
1065 (synopsis "Library for reading and writing Jcat files")
1067 "This library allows reading and writing gzip-compressed JSON catalog
1068 files, which can be used to store GPG, PKCS-7 and SHA-256 checksums for each
1070 (license license:lgpl2.1+)))
1072 (define-public xdelta
1080 (url "https://github.com/jmacd/xdelta")
1081 (commit (string-append "v" version))))
1082 (file-name (git-file-name name version))
1085 "09mmsalc7dwlvgrda56s2k927rpl3a5dzfa88aslkqcjnr790wjy"))
1087 ;; This file isn't freely distributable and has no effect on building.
1089 (delete-file "xdelta3/draft-korn-vcdiff.txt")
1091 (build-system gnu-build-system)
1093 `(("autoconf" ,autoconf)
1094 ("automake" ,automake)))
1097 (modify-phases %standard-phases
1098 (add-after 'unpack 'enter-build-directory
1099 (lambda _ (chdir "xdelta3") #t)))))
1100 (home-page "http://xdelta.org")
1101 (synopsis "Delta encoder for binary files")
1102 (description "xdelta encodes only the differences between two binary files
1103 using the VCDIFF algorithm and patch file format described in RFC 3284. It can
1104 also be used to apply such patches. xdelta is similar to @command{diff} and
1105 @command{patch}, but is not limited to plain text and does not generate
1106 human-readable output.")
1107 (license license:asl2.0)))
1109 (define-public lrzip
1117 "http://ck.kolivas.org/apps/lrzip/lrzip-" version ".tar.bz2"))
1120 "0mb449vmmwpkalq732jdyginvql57nxyd31sszb108yps1lf448d"))
1121 (patches (search-patches "lrzip-CVE-2017-8842.patch"))))
1122 (build-system gnu-build-system)
1124 `(;; nasm is only required when building for 32-bit x86 platforms
1125 ,@(if (string-prefix? "i686" (or (%current-target-system)
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
1143 (license (list license:gpl3+
1144 license:public-domain)))) ; most files in lzma/
1146 (define-public snappy
1154 (url "https://github.com/google/snappy")
1156 (file-name (git-file-name name version))
1158 (base32 "1j0kslq2dvxgkcxl1gakhvsa731yrcvcaipcp5k8k7ayicvkv9jv"))
1159 (patches (search-patches "snappy-add-O2-flag-in-CmakeLists.txt.patch"))))
1160 (build-system cmake-build-system)
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
1171 (license license:asl2.0)))
1173 (define-public p7zip
1179 (uri (string-append "mirror://sourceforge/" name "/" name "/"
1180 version "/" name "_" version
1181 "_src_all.tar.bz2"))
1184 "07rlwbbgszq8i7m8jh3x6j2w2hc9a72dc7fmqawnqkwlwb00mcjy"))
1185 (modules '((guix build utils)))
1188 ;; Remove non-free source files
1189 (for-each delete-file
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")
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)
1204 (list (string-append "DEST_HOME=" (assoc-ref %outputs "out")) "all3")
1206 (modify-phases %standard-phases
1208 (lambda* (#:key system outputs #:allow-other-keys)
1210 (let ((system ,(or (%current-target-system)
1211 (%current-system))))
1213 ((string-prefix? "x86_64" system)
1214 "makefile.linux_amd64_asm")
1215 ((string-prefix? "i686" system)
1216 "makefile.linux_x86_asm_gcc_4.X")
1218 "makefile.linux_any_cpu_gcc_4.X")))
1219 "makefile.machine")))
1222 (invoke "make" "test")
1223 (invoke "make" "test_7z")
1224 (invoke "make" "test_7zr"))))))
1226 (let ((system (or (%current-target-system)
1227 (%current-system))))
1228 `(,@(cond ((string-prefix? "x86_64" system)
1230 ((string-prefix? "i686" system)
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+
1239 license:public-domain))))
1241 (define-public gzstream
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"))
1253 "00y19pqjsdj5zcrx4p9j56pl73vayfwnb7y2hvp423nx0cwv5b4r"))
1254 (modules '((guix build utils)))
1256 ;; Remove pre-compiled object.
1258 (delete-file "gzstream.o")
1260 (build-system gnu-build-system)
1262 `(#:test-target "test"
1264 (modify-phases %standard-phases
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)
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+)))
1287 (method url-fetch/zipbomb)
1288 (uri (string-append "http://mattmahoney.net/dc/zpaq"
1289 (string-delete #\. version) ".zip"))
1292 "066l94yyladlfzri877nh2dhkvspagjn3m5bmv725fmhkr9c4pp8"))
1293 (modules '((guix build utils)))
1295 ;; Delete irrelevant pre-compiled binaries.
1297 (for-each delete-file (find-files "." "\\.exe$"))
1299 (build-system gnu-build-system)
1302 (modify-phases %standard-phases
1303 (delete 'configure)) ; no ‘configure’ script
1306 (string-append "CPPFLAGS=-Dunix"
1307 ,(match (or (%current-target-system)
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)
1317 ("x86_64-linux" " -march=nocona -mtune=generic")
1318 ("i686-linux" " -march=i686 -mtune=generic")
1319 ("armhf-linux" " -mtune=generic-armv7-a")
1321 (string-append "PREFIX="
1322 (assoc-ref %outputs "out")))))
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.
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.
1342 (define-public unshield
1347 (origin (method git-fetch)
1349 (url "http://github.com/twogood/unshield")
1351 (file-name (git-file-name name version))
1354 "19wn22vszhci8dfcixx5rliz7phx3lv5ablvhjlclvj75k2vsdqd"))))
1355 (build-system cmake-build-system)
1358 ("openssl" ,openssl)
1359 ;; Test data that is otherwise downloaded with curl.
1360 ("unshield-avigomanager11b22.zip"
1364 "https://www.dropbox.com/s/8r4b6752swe3nhu/"
1365 "unshield-avigomanager11b22.zip?dl=1"))
1367 (base32 "0fwq7lih04if68wpwpsk5wjqyvh32db76a41sq6gbx4dn1lc3ddn"))
1368 (file-name "unshield-avigomanager11b22.zip")))
1369 ("unshield-baldurs_gate_patch_v1_1_4315_international.zip"
1373 "https://www.dropbox.com/s/9ruil8oi6amjbbk/"
1374 "unshield-baldurs_gate_patch_v1_1_4315_international.zip?dl=1"))
1376 (base32 "0spaxf6dardlhqxz3ys09fzamj007q3nfyw4xng6gh3qp9780maj"))
1377 (file-name "unshield-baldurs_gate_patch_v1_1_4315_international.zip")))
1378 ("unshield-the-feeble-files-spanish.zip"
1382 "https://www.dropbox.com/s/1ng0z9kfxc7eb1e/"
1383 "unshield-the-feeble-files-spanish.zip?dl=1"))
1385 (base32 "1k5cw6vnpja8yjlnhx5124xrw9i8s1l539hfdqqrqz3l5gn0bnyd"))
1386 (file-name "unshield-the-feeble-files-spanish.zip")))))
1388 `(("unzip" ,unzip)))
1390 `(#:out-of-source? #f
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
1404 (("/var/tmp/unshield/bin/unshield")
1405 (string-append (getcwd) "/src/unshield"))
1406 ;; We no longer need to download the data.
1408 (("curl -(|f)sSL -o test.zip .*") ""))
1409 (substitute* "test/v0/avigomanager.sh"
1411 (string-append (getcwd)
1412 "/test/v0/unshield-avigomanager11b22.zip")))
1413 (substitute* "test/v0/baldurs_gate_patch_v1_1_4315_international.sh"
1417 "/test/v0/unshield-baldurs_gate_patch_v1_1_4315_international.zip")))
1418 (substitute* "test/v0/the-feeble-files-spanish.sh"
1420 (string-append (getcwd)
1421 "/test/v0/unshield-the-feeble-files-spanish.zip")))
1425 (invoke "./run-tests.sh"))))))
1426 (home-page "https://github.com/twogood/unshield")
1427 (synopsis "Extract CAB files from InstallShield installers")
1429 "@command{unshield} is a tool and library for extracting @file{.cab}
1430 archives from InstallShield installers.")
1431 (license license:expat)))
1440 (uri (string-append "https://github.com/facebook/zstd/releases/download/"
1441 "v" version "/zstd-" version ".tar.gz"))
1443 (base32 "05ckxap00qvc0j51d3ci38150cxsw82w7s9zgd5fgzspnzmp1vsr"))))
1444 (build-system gnu-build-system)
1445 (outputs '("out" ;1.2MiB executables and documentation
1446 "lib" ;1.2MiB shared library and headers
1447 "static")) ;1.2MiB static library
1450 (modify-phases %standard-phases
1451 (delete 'configure) ;no configure script
1452 (add-after 'install 'adjust-library-locations
1453 (lambda* (#:key outputs #:allow-other-keys)
1454 (let* ((out (assoc-ref outputs "out"))
1455 (lib (assoc-ref outputs "lib"))
1456 (static (assoc-ref outputs "static"))
1457 (shared-libs (string-append lib "/lib"))
1458 (static-libs (string-append static "/lib")))
1459 ;; Move the static library to its own output to save ~1MiB.
1460 (mkdir-p static-libs)
1461 (for-each (lambda (ar)
1462 (link ar (string-append static-libs "/"
1465 (find-files shared-libs "\\.a$"))
1467 ;; Make sure the pkg-config file refers to the right output.
1468 (substitute* (string-append shared-libs "/pkgconfig/libzstd.pc")
1470 (string-append "prefix=" lib "\n")))
1474 ;; TODO: Integrate in next rebuild cycle.
1475 (list ,(if (%current-target-system)
1476 (string-append "CC=" (cc-for-target))
1478 (string-append "PREFIX=" (assoc-ref %outputs "out"))
1479 (string-append "LIBDIR=" (assoc-ref %outputs "lib") "/lib")
1480 (string-append "INCLUDEDIR=" (assoc-ref %outputs "lib") "/include")
1481 ;; Skip auto-detection of, and creating a dependency on, the build
1482 ;; environment's ‘xz’ for what amounts to a dubious feature anyway.
1484 ;; Not currently detected, but be explicit & avoid surprises later.
1487 (home-page "https://facebook.github.io/zstd/")
1488 (synopsis "Zstandard real-time compression algorithm")
1489 (description "Zstandard (@command{zstd}) is a lossless compression algorithm
1490 that combines very fast operation with a compression ratio comparable to that of
1491 zlib. In most scenarios, both compression and decompression can be performed in
1492 ‘real time’. The compressor can be configured to provide the most suitable
1493 trade-off between compression ratio and speed, without affecting decompression
1495 (license (list license:bsd-3 ; the main top-level LICENSE file
1496 license:bsd-2 ; many files explicitly state 2-Clause
1497 license:gpl2 ; the main top-level COPYING file
1498 license:gpl3+ ; tests/gzip/*.sh
1499 license:expat ; lib/dictBuilder/divsufsort.[ch]
1500 license:public-domain ; zlibWrapper/examples/fitblk*
1501 license:zlib)))) ; zlibWrapper/{gz*.c,gzguts.h}
1503 (define-public pzstd
1506 (version (package-version zstd))
1507 (source (package-source zstd))
1508 (build-system gnu-build-system)
1510 `(,@(if (%current-target-system)
1511 `(("googletest" ,googletest))
1514 `(,@(if (%current-system)
1515 `(("googletest" ,googletest))
1519 (modify-phases %standard-phases
1520 (add-after 'unpack 'enter-subdirectory
1521 (lambda _ (chdir "contrib/pzstd") #t))
1522 (delete 'configure) ; no configure script
1523 (add-before 'check 'compile-tests
1524 (lambda* (#:key make-flags #:allow-other-keys)
1525 (apply invoke "make" "tests" make-flags)))
1526 (add-after 'install 'install-documentation
1527 (lambda* (#:key outputs #:allow-other-keys)
1528 (let* ((out (assoc-ref outputs "out"))
1529 (doc (string-append out "/share/doc/" ,name)))
1531 (install-file "README.md" doc)
1534 (list (string-append "CC=" ,(cc-for-target))
1535 (string-append "CXX=" ,(cxx-for-target))
1536 (string-append "PREFIX=" (assoc-ref %outputs "out")))))
1537 (home-page (package-home-page zstd))
1538 (synopsis "Threaded implementation of the Zstandard compression algorithm")
1539 (description "Parallel Zstandard (PZstandard or @command{pzstd}) is a
1540 multi-threaded implementation of the @uref{http://zstd.net/, Zstandard
1541 compression algorithm}. It is fully compatible with the original Zstandard file
1542 format and command-line interface, and can be used as a drop-in replacement.
1544 Compression is distributed over multiple processor cores to improve performance,
1545 as is the decompression of data compressed in this manner. Data compressed by
1546 other implementations will only be decompressed by two threads: one performing
1547 the actual decompression, the other input and output.")
1548 (license (package-license zstd))))
1557 (uri (string-append "mirror://sourceforge/infozip"
1558 "/Zip%203.x%20%28latest%29/3.0/zip30.tar.gz"))
1561 "0sb3h3067pzf3a7mlxn1hikpcjrsvycjcnj9hl9b1c3ykcgvps7h"))))
1562 (build-system gnu-build-system)
1563 (inputs `(("bzip2" ,bzip2)))
1565 `(#:tests? #f ; no test target
1566 #:make-flags (let ((out (assoc-ref %outputs "out")))
1567 (list "-f" "unix/Makefile"
1568 (string-append "prefix=" out)
1569 (string-append "MANDIR=" out "/share/man/man1")))
1571 (modify-phases %standard-phases
1573 (lambda* (#:key (make-flags '()) #:allow-other-keys)
1574 (apply invoke "make" "generic_gcc" make-flags)))
1575 (delete 'configure))))
1576 (home-page "http://www.info-zip.org/Zip.html")
1577 (synopsis "Compression and file packing utility")
1579 "Zip is a compression and file packaging/archive utility. Zip is useful
1580 for packaging a set of files for distribution, for archiving files, and for
1581 saving disk space by temporarily compressing unused files or directories.
1582 Zip puts one or more compressed files into a single ZIP archive, along with
1583 information about the files (name, path, date, time of last modification,
1584 protection, and check information to verify file integrity). An entire
1585 directory structure can be packed into a ZIP archive with a single command.
1587 Zip has one compression method (deflation) and can also store files without
1588 compression. Zip automatically chooses the better of the two for each file.
1589 Compression ratios of 2:1 to 3:1 are common for text files.")
1590 (license (license:non-copyleft "file://LICENSE"
1591 "See LICENSE in the distribution."))))
1593 (define-public unzip
1594 (package (inherit zip)
1600 (uri (string-append "mirror://sourceforge/infozip"
1601 "/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz"))
1604 "0dxx11knh3nk95p2gg2ak777dd11pr7jx5das2g49l262scrcv83"))
1605 (patches (search-patches "unzip-CVE-2014-8139.patch"
1606 "unzip-CVE-2014-8140.patch"
1607 "unzip-CVE-2014-8141.patch"
1608 "unzip-CVE-2014-9636.patch"
1609 "unzip-CVE-2015-7696.patch"
1610 "unzip-CVE-2015-7697.patch"
1611 "unzip-allow-greater-hostver-values.patch"
1612 "unzip-initialize-symlink-flag.patch"
1613 "unzip-remove-build-date.patch"
1614 "unzip-attribs-overflow.patch"
1615 "unzip-overflow-on-invalid-input.patch"
1616 "unzip-format-secure.patch"
1617 "unzip-overflow-long-fsize.patch"))))
1618 (build-system gnu-build-system)
1619 ;; no inputs; bzip2 is not supported, since not compiled with BZ_NO_STDIO
1621 `(#:phases (modify-phases %standard-phases
1623 (add-after 'unpack 'fortify
1625 ;; Mitigate CVE-2018-1000035, an exploitable buffer overflow.
1626 ;; This environment variable is recommended in 'unix/Makefile'
1627 ;; for passing flags to the C compiler.
1628 (setenv "LOCAL_UNZIP" "-D_FORTIFY_SOURCE=1")
1631 (lambda* (#:key make-flags #:allow-other-keys)
1632 (apply invoke "make"
1633 `("-j" ,(number->string
1634 (parallel-job-count))
1637 #:make-flags (list "-f" "unix/Makefile"
1638 (string-append "prefix=" %output)
1639 (string-append "MANDIR=" %output "/share/man/man1"))))
1640 (home-page "http://www.info-zip.org/UnZip.html")
1641 (synopsis "Decompression and file extraction utility")
1643 "UnZip is an extraction utility for archives compressed in .zip format,
1644 also called \"zipfiles\".
1646 UnZip lists, tests, or extracts files from a .zip archive. The default
1647 behaviour (with no options) is to extract into the current directory, and
1648 subdirectories below it, all files from the specified zipfile. UnZip
1649 recreates the stored directory structure by default.")
1650 (license (license:non-copyleft "file://LICENSE"
1651 "See LICENSE in the distribution."))))
1653 (define-public ziptime
1654 (let ((commit "2a5bc9dfbf7c6a80e5f7cb4dd05b4036741478bc")
1658 (version (git-version "0.0.0" revision commit))
1663 (url "https://android.googlesource.com/platform/build")
1665 (file-name (git-file-name name version))
1667 (base32 "0hrn61b3a97dlc4iqc28rwx8k8zf7ycbwzqqp93vj34zy5a541kn"))))
1668 (build-system gnu-build-system)
1670 `(#:tests? #f ; no test suite
1672 (modify-phases %standard-phases
1673 (add-after 'unpack 'change-directory
1675 (chdir "tools/ziptime")))
1676 (delete 'configure) ; nothing to configure
1678 ;; There is no Makefile, only an ‘Android.bp’ file. Ignore it.
1680 (let ((c++ ,(cxx-for-target)))
1681 (apply invoke c++ "-O2" "-o" "ziptime"
1682 (find-files "." "\\.cpp$")))))
1684 (lambda* (#:key outputs #:allow-other-keys)
1685 (let* ((out (assoc-ref outputs "out"))
1686 (bin (string-append out "/bin"))
1687 (doc (string-append out "/share/doc/" ,name "-" ,version)))
1688 (install-file "ziptime" bin)
1689 (install-file "README.txt" doc)))))))
1690 ;; There is no separate home page for this tiny bundled build tool.
1691 (home-page (string-append "https://android.googlesource.com/platform/build/"
1692 "+/master/tools/ziptime/README.txt"))
1693 (synopsis "Normalize @file{.zip} archive header timestamps")
1695 "Ziptime helps make @file{.zip} archives reproducible by replacing
1696 timestamps in the file header with a fixed time (1 January 2008).
1698 ``Extra fields'' are not changed, so you'll need to use the @code{-X} option to
1699 @command{zip} to prevent it from storing the ``universal time'' field.")
1700 (license license:asl2.0))))
1702 (define-public zziplib
1706 (home-page "https://github.com/gdraheim/zziplib")
1709 (uri (git-reference (url home-page)
1710 (commit (string-append "v" version))))
1711 (file-name (git-file-name name version))
1712 (patches (search-patches "zziplib-CVE-2018-16548.patch"))
1715 "0fbk9k7ryas2wh2ykwkvm1pbi40i88rfvc3dydh9xyd7w2jcki92"))))
1716 (build-system gnu-build-system)
1718 `(#:phases (modify-phases %standard-phases
1719 (add-before 'check 'make-files-writable
1721 (for-each make-file-writable
1722 (find-files "test" #:directories? #t))
1725 ;; XXX: The default test target attempts to download external resources and
1726 ;; fails without error: <https://github.com/gdraheim/zziplib/issues/53>.
1727 ;; To prevent confusing log messages, just run a simple zip test that works.
1728 #:test-target "check-readme"))
1731 (native-inputs `(("perl" ,perl) ; for the documentation
1732 ("pkg-config" ,pkg-config)
1733 ;; for the documentation; Python 3 not supported,
1734 ;; http://forums.gentoo.org/viewtopic-t-863161-start-0.html
1735 ("python" ,python-2)
1736 ("zip" ,zip))) ; to create test files
1737 (synopsis "Library for accessing zip files")
1739 "ZZipLib is a library based on zlib for accessing zip files.")
1740 ;; zziplib is dual licensed under LGPL2.0+ and MPL1.1. Some example source
1741 ;; files carry the Zlib license; see "docs/copying.html" for details.
1742 (license (list license:lgpl2.0+ license:mpl1.1))))
1744 (define-public libzip
1751 "https://libzip.org/download/libzip-" version ".tar.xz"))
1754 "0ck1dk7zn5qzpgxklg0r26nfsf04xb6c46gsig060hkvvgzp6156"))))
1758 `(("gnutls" ,gnutls)
1760 ("openssl" ,openssl)
1762 (build-system cmake-build-system)
1763 (home-page "https://libzip.org")
1764 (synopsis "C library for reading, creating, and modifying zip archives")
1765 (description "Libzip is a C library for reading, creating, and modifying
1766 zip archives. Files can be added from data buffers, files, or compressed data
1767 copied directly from other zip archives. Changes made without closing the
1768 archive can be reverted.")
1769 (license license:bsd-3)))
1771 (define-public atool
1778 (uri (string-append "mirror://savannah/atool/atool-"
1782 "0fvhzip2v08jgnlfpyj6rapan39xlsl1ksgq4lp8gfsai2ah1xma"))))
1783 (build-system gnu-build-system)
1786 (modify-phases %standard-phases
1787 (add-after 'unpack 'embed-absolute-file-name
1788 (lambda* (#:key inputs #:allow-other-keys)
1789 (substitute* "atool"
1790 (("(^\\$::cfg_path_file.*= )'file'" _ pre)
1791 (string-append pre "'" (assoc-ref inputs "file")
1797 (home-page "https://www.nongnu.org/atool/")
1798 (synopsis "Universal tool to manage file archives of various types")
1799 (description "The main command is @command{aunpack} which extracts files
1800 from an archive. The other commands provided are @command{apack} (to create
1801 archives), @command{als} (to list files in archives), and @command{acat} (to
1802 extract files to standard out). As @command{atool} invokes external programs
1803 to handle the archives, not all commands may be supported for a certain type
1805 (license license:gpl2+)))
1807 (define-public lunzip
1814 (uri (string-append "mirror://savannah/lzip/lunzip/"
1815 "lunzip-" version ".tar.gz"))
1817 (base32 "19zq3gmlbia2krq4k4zs1j0xjdv7nsdzqvfb0pyca5n53h2mzb91"))))
1818 (build-system gnu-build-system)
1821 (list ,(string-append "CC=" (cc-for-target)))))
1822 (home-page "https://www.nongnu.org/lzip/lunzip.html")
1823 (synopsis "Small, stand-alone lzip decompressor")
1825 "Lunzip is a decompressor for files in the lzip compression format (.lz),
1826 written as a single small C tool with no dependencies. This makes it
1827 well-suited to embedded and other systems without a C++ compiler, or for use in
1828 applications such as software installers that need only to decompress files,
1830 Lunzip is intended to be fully compatible with the regular lzip package.")
1831 (license (list license:bsd-2 ; carg_parser.[ch]
1832 license:gpl2+)))) ; everything else
1834 (define-public clzip
1841 (uri (string-append "mirror://savannah/lzip/clzip/"
1842 "clzip-" version ".tar.gz"))
1844 (base32 "1h14dmc9fi10gcdpdpbgq1bwvcxvivppilj64pf720x8mw915mfr"))))
1845 (build-system gnu-build-system)
1848 (list ,(string-append "CC=" (cc-for-target)))))
1849 (home-page "https://www.nongnu.org/lzip/clzip.html")
1850 (synopsis "Small, stand-alone lzip compressor and decompressor")
1852 "Clzip is a compressor and decompressor for files in the lzip compression
1853 format (.lz), written as a single small C tool with no dependencies. This makes
1854 it well-suited to embedded and other systems without a C++ compiler, or for use
1855 in other applications like package managers.
1856 Clzip is intended to be fully compatible with the regular lzip package.")
1857 (license (list license:bsd-2 ; carg_parser.[ch], lzd in clzip.texi
1860 (define-public lzlib
1867 (uri (string-append "mirror://savannah/lzip/lzlib/"
1868 "lzlib-" version ".tar.gz"))
1870 (base32 "1c9pwd6by8is4z8bs6j306jyy6pgm2dvsn4fr7fg2b5m5qj88pcf"))))
1871 (build-system gnu-build-system)
1874 (list (string-append "CC=" ,(cc-for-target))
1876 "--enable-shared"))) ; only static (.a) is built by default
1877 (home-page "https://www.nongnu.org/lzip/lzlib.html")
1878 (synopsis "Lzip data compression C library")
1880 "Lzlib is a C library for in-memory LZMA compression and decompression in
1881 the lzip format. It supports integrity checking of the decompressed data, and
1882 all functions are thread-safe. The library should never crash, even in case of
1884 (license (list license:bsd-2 ; the library itself
1885 license:gpl2+)))) ; main.c (i.e. minilzip used by tests)
1887 (define-public plzip
1894 (uri (string-append "mirror://savannah/lzip/plzip/"
1895 "plzip-" version ".tar.gz"))
1897 (base32 "19zinpx7hssl6r3vilpvq2s7wha3545xan8b0vcvsxnyipdx3n0l"))))
1898 (build-system gnu-build-system)
1900 `(("lzlib" ,lzlib)))
1901 (home-page "https://www.nongnu.org/lzip/plzip.html")
1902 (synopsis "Parallel lossless data compressor for the lzip format")
1904 "Plzip is a massively parallel (multi-threaded) lossless data compressor
1905 and decompressor that uses the lzip file format (.lz). Files produced by plzip
1906 are fully compatible with lzip and can be rescued with lziprecover.
1907 On multiprocessor machines, plzip can compress and decompress large files much
1908 faster than lzip, at the cost of a slightly reduced compression ratio (0.4% to
1909 2%). The number of usable threads is limited by file size: on files of only a
1910 few MiB, plzip is no faster than lzip.
1911 Files that were compressed with regular lzip will also not be decompressed
1912 faster by plzip, unless the @code{-b} option was used: lzip usually produces
1913 single-member files which can't be decompressed in parallel.")
1914 (license (list license:bsd-2 ; arg_parser.{cc,h}
1915 license:gpl2+)))) ; everything else
1917 (define-public innoextract
1919 (name "innoextract")
1924 (uri (string-append "https://constexpr.org/innoextract/files/"
1925 "innoextract-" version "/"
1926 "/innoextract-" version ".tar.gz"))
1928 (base32 "09l1z1nbl6ijqqwszdwch9mqr54qb7df0wp2sd77v17dq6gsci33"))))
1929 (build-system cmake-build-system)
1932 (inputs `(("boost" ,boost)
1933 ("libiconv" ,libiconv)
1935 (native-inputs `(("pkg-config" ,pkg-config)))
1936 (home-page "https://constexpr.org/innoextract/")
1937 (synopsis "Tool for extracting Inno Setup installers")
1938 (description "innoextract allows extracting Inno Setup installers under
1939 non-Windows systems without running the actual installer using wine.")
1940 (license license:zlib)))
1942 (define-public google-brotli
1944 (name "google-brotli")
1950 (url "https://github.com/google/brotli")
1951 (commit (string-append "v" version))))
1952 (file-name (git-file-name name version))
1954 (base32 "1fikasxf7r2dwlk8mv8w7nmjkn0jw5ic31ky3mvpkdzwgd4xfndl"))
1955 (modules '((guix build utils)))
1958 ;; Cherry-picked from upstream since the latest release
1959 ;; https://github.com/google/brotli/commit/09b0992b6acb7faa6fd3b23f9bc036ea117230fc
1960 (substitute* (find-files "scripts" "^lib.*pc\\.in")
1961 (("-R\\$\\{libdir\\} ") ""))
1963 (build-system cmake-build-system)
1966 (modify-phases %standard-phases
1967 (add-after 'install 'rename-static-libraries
1968 ;; The build tools put a 'static' suffix on the static libraries, but
1969 ;; other applications don't know how to find these.
1970 (lambda* (#:key outputs #:allow-other-keys)
1971 (let ((lib (string-append (assoc-ref %outputs "out") "/lib/")))
1972 (rename-file (string-append lib "libbrotlicommon-static.a")
1973 (string-append lib "libbrotlicommon.a"))
1974 (rename-file (string-append lib "libbrotlidec-static.a")
1975 (string-append lib "libbrotlidec.a"))
1976 (rename-file (string-append lib "libbrotlienc-static.a")
1977 (string-append lib "libbrotlienc.a"))
1980 (list ;; Defaults to "lib64" on 64-bit archs.
1981 (string-append "-DCMAKE_INSTALL_LIBDIR="
1982 (assoc-ref %outputs "out") "/lib"))))
1983 (home-page "https://github.com/google/brotli")
1984 (synopsis "General-purpose lossless compression")
1985 (description "This package provides the reference implementation of Brotli,
1986 a generic-purpose lossless compression algorithm that compresses data using a
1987 combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd
1988 order context modeling, with a compression ratio comparable to the best
1989 currently available general-purpose compression methods. It is similar in speed
1990 with @code{deflate} but offers more dense compression.
1992 The specification of the Brotli Compressed Data Format is defined in RFC 7932.")
1993 (license license:expat)))
1995 (define-public brotli
1996 ;; We used to provide an older version under the name "brotli".
1997 (deprecated-package "brotli" google-brotli))
1999 (define-public python-google-brotli
2001 (inherit google-brotli)
2002 (name "python-google-brotli")
2003 (build-system python-build-system)
2005 (synopsis "Python interface to google-brotli")
2006 (description "@code{python-google-brotli} provides a Python interface to
2007 @code{google-brotli}, an implementation of the Brotli lossless compression
2016 (uri (string-append "https://www.oberhumer.com/opensource/"
2017 name "/download/" name "-" version ".tar.gz"))
2020 "0j036lkwsxvm15gr29n8wn07cqq79dswjs9k54939ms5zngjjrdq"))))
2021 (build-system gnu-build-system)
2023 `(;; UCL 1.03 fails to build with newer C standards.
2024 #:configure-flags '("CFLAGS=-std=gnu90"
2025 "--enable-shared" "--disable-static")))
2026 (home-page "https://www.oberhumer.com/opensource/ucl/")
2027 (synopsis "Portable lossless data compression library")
2028 (description "UCL implements a number of compression algorithms that
2029 achieve an excellent compression ratio while allowing fast decompression.
2030 Decompression requires no additional memory.
2032 Compared to LZO, the UCL algorithms achieve a better compression ratio but
2033 decompression is a little bit slower.")
2034 (license license:gpl2+)))
2042 (uri (string-append "https://github.com/upx/upx/releases/download/v"
2043 version "/upx-" version "-src.tar.xz"))
2046 "051pk5jk8fcfg5mpgzj43z5p4cn7jy5jbyshyn78dwjqr7slsxs7"))))
2047 (build-system gnu-build-system)
2057 (modify-phases %standard-phases
2058 (delete 'configure) ; no configure script
2059 (delete 'check) ; no test suite
2060 (add-before 'build 'patch-exec-bin-sh
2062 (substitute* (list "Makefile"
2064 (("/bin/sh") (which "sh")))
2067 (lambda* (#:key outputs #:allow-other-keys)
2068 (let* ((out (assoc-ref outputs "out"))
2069 (bin (string-append out "/bin")))
2071 (copy-file "src/upx.out" (string-append bin "/upx")))
2073 (home-page "https://upx.github.io/")
2074 (synopsis "Compression tool for executables")
2076 "The Ultimate Packer for eXecutables (UPX) is an executable file
2077 compressor. UPX typically reduces the file size of programs and shared
2078 libraries by around 50%--70%, thus reducing disk space, network load times,
2079 download times, and other distribution and storage costs.")
2080 (license license:gpl2+)))
2082 (define-public quazip
2089 (url "https://github.com/stachenov/quazip")
2090 (commit (string-append "v" version))))
2091 (file-name (git-file-name name version))
2094 "11icgwv2xyxhd1hm1add51xv54zwkcqkg85d1xqlgiigvbm196iq"))))
2095 (build-system cmake-build-system)
2097 `(#:tests? #f)) ;no test
2099 `(("doxygen" ,doxygen)))
2101 `(("qtbase" ,qtbase)
2103 (home-page "https://stachenov.github.io/quazip/index.html")
2104 (synopsis "Qt/C++ wrapper for Minizip")
2105 (description "QuaZIP is a simple C++ wrapper over Gilles Vollant's
2106 ZIP/UNZIP package that can be used to access ZIP archives. It uses
2107 Trolltech's Qt toolkit.
2109 QuaZIP allows you to access files inside ZIP archives using QIODevice
2110 API, and that means that you can also use QTextStream, QDataStream or
2111 whatever you would like to use on your zipped files.
2113 QuaZIP provides complete abstraction of the ZIP/UNZIP API, for both
2114 reading from and writing to ZIP archives. ")
2115 ;; Project is distributed under LGPL, but "quazip/z*" "quazip/unzip.*" are
2116 ;; distributed under zlib terms.
2117 (license (list license:lgpl2.1+ license:zlib))))
2119 (define-public zutils
2126 (uri (string-append "mirror://savannah/zutils/zutils-" version ".tar.lz"))
2128 (base32 "15dimqp8zlqaaa2l46r22srp1py38mlmn69ph1j5fmrd54w43m0d"))))
2129 (build-system gnu-build-system)
2132 (list "--sysconfdir=/etc")
2134 (modify-phases %standard-phases
2135 (add-before 'check 'disable-failing-tests
2136 ;; XXX https://lists.nongnu.org/archive/html/zutils-bug/2020-07/msg00005.html
2138 (substitute* "testsuite/check.sh"
2139 (("\"\\$\\{ZGREP\\}\" -N -L \"GNU\"") "true")
2140 (("\"\\$\\{ZGREP\\}\" -N -L \"nx_pattern\"") "false"))
2143 (lambda* (#:key make-flags outputs #:allow-other-keys)
2144 (apply invoke "make" "install"
2145 (string-append "sysconfdir=" (assoc-ref outputs "out")
2149 ;; Needed to extract the source tarball and run the test suite.
2151 (home-page "https://www.nongnu.org/zutils/zutils.html")
2152 (synopsis "Utilities that transparently operate on compressed files")
2154 "Zutils is a collection of utilities able to process any combination of
2155 compressed and uncompressed files transparently. If any given file, including
2156 standard input, is compressed, its decompressed content is used instead.
2158 @command{zcat}, @command{zcmp}, @command{zdiff}, and @command{zgrep} are
2159 improved replacements for the shell scripts provided by GNU gzip.
2160 @command{ztest} tests the integrity of supported compressed files.
2161 @command{zupdate} recompresses files with lzip, similar to gzip's
2164 Supported compression formats are bzip2, gzip, lzip, and xz. Zutils uses
2165 external compressors: the compressor to be used for each format is configurable
2166 at run time, and must be installed separately.")
2167 (license (list license:bsd-2 ; arg_parser.{cc,h}
2168 license:gpl2+)))) ; the rest
2170 (define-public makeself-safeextract
2171 (let ((commit "1a95e121fa8e3c02d307ae37b9b7834e616c3683"))
2173 (name "makeself-safeextract")
2174 (version (git-version "0.0.0" "1" commit))
2175 (home-page "https://github.com/ssokolow/makeself_safeextract")
2182 (file-name (git-file-name name version))
2185 "1anlinaj9lvfi8bn00wp11vzqq0f9sig4fm9yrspisx31v0z4a2c"))))
2186 (build-system trivial-build-system)
2188 `(("python" ,python-2)
2192 `(#:modules ((guix build utils))
2195 (use-modules (guix build utils))
2196 (let* ((name "makeself_safeextract")
2197 (source (string-append (assoc-ref %build-inputs "source")
2199 (bin (string-append (assoc-ref %outputs "out") "/bin"))
2200 (target (string-append bin "/" name))
2201 (python (string-append (assoc-ref %build-inputs "python") "/bin"))
2202 (7z (string-append (assoc-ref %build-inputs "p7zip") "/bin/7z"))
2203 (unzip (string-append (assoc-ref %build-inputs "unzip") "/bin/unzip")))
2204 (setenv "PATH" (string-append (getenv "PATH") ":" python))
2206 (copy-file source target)
2208 (("'7z'") (format #f "'~a'" 7z))
2209 (("'unzip'") (format #f "'~a'" unzip)))
2210 (patch-shebang target)))))
2211 (synopsis "Extract makeself and mojo archives without running untrusted code")
2212 (description "This package provides a script to unpack self-extracting
2213 archives generated by @command{makeself} or @command{mojo} without running the
2214 possibly untrusted extraction shell script.")
2215 (license license:gpl3+))))
2217 (define-public ncompress
2224 (url "https://github.com/vapier/ncompress")
2225 (commit (string-append "v" version))))
2226 (patches (search-patches "ncompress-fix-softlinks.patch"))
2227 (file-name (string-append name "-" version ".tar.gz"))
2230 "1a4yir1ilafz0nzxdwigj204j4yy2zljbc501nsaqqm3dxdap8zn"))))
2232 '(#:make-flags (list "CC=gcc"
2233 (string-append "BINDIR=" %output "/bin")
2234 (string-append "MANDIR=" %output "/share/man/man1"))
2235 #:phases (modify-phases %standard-phases
2236 (delete 'configure))))
2237 (build-system gnu-build-system)
2238 (home-page "https://github.com/vapier/ncompress/")
2239 (synopsis "Original Lempel-Ziv compress/uncompress programs")
2240 (description "(N)compress provides the original compress and uncompress
2241 programs that used to be the de facto UNIX standard for compressing and
2242 uncompressing files. These programs implement a fast, simple Lempel-Ziv (LZW)
2243 file compression algorithm.")
2244 (license license:gpl2+)))
2246 (define-public xarchiver
2249 (version "0.5.4.16")
2254 (url "https://github.com/ib/xarchiver")
2256 (file-name (git-file-name name version))
2258 (base32 "0nblyk65w1in0zpfbyzy6dw4x0fzx3q7xs85dby5ap4w0gjz9s44"))))
2259 (build-system glib-or-gtk-build-system)
2261 `(("gettext" ,gettext-minimal)
2262 ("intltool" ,intltool)
2263 ("libxslt" ,libxslt)
2264 ("pkg-config" ,pkg-config)))
2266 `(("adwaita-icon-theme" ,adwaita-icon-theme) ; hard-coded theme
2268 (home-page "https://github.com/ib/xarchiver")
2269 (synopsis "Graphical front-end for archive operations")
2270 (description "Xarchiver is a front-end to various command line archiving
2271 tools. It uses GTK+ tool-kit and is designed to be desktop-environment
2272 independent. Supported formats are 7z, ARJ, bzip2, gzip, LHA, lzma, lzop,
2273 RAR, RPM, DEB, tar, and ZIP. It cannot perform functions for archives, whose
2274 archiver is not installed.")
2275 (license license:gpl2+)))
2277 (define-public tarsplitter
2279 (name "tarsplitter")
2284 (url "https://github.com/AQUAOSOTech/tarsplitter")
2285 (commit (string-append "v" version))))
2286 (file-name (git-file-name name version))
2289 "17qkg95r97kcrs17b0mcqswx99280ni47j5yx8xa7nl3bdhm6325"))))
2290 (build-system go-build-system)
2292 `(#:import-path "github.com/AQUAOSOTech/tarsplitter"
2293 #:install-source? #f
2295 (modify-phases %standard-phases
2296 (add-after 'install 'install-documentation
2297 (lambda* (#:key import-path outputs #:allow-other-keys)
2298 (let* ((source (string-append "src/" import-path))
2299 (out (assoc-ref outputs "out"))
2300 (doc (string-append out "/share/doc/" ,name "-" ,version)))
2301 (with-directory-excursion source
2302 (install-file "README.md" doc))
2304 (home-page "https://github.com/AQUAOSOTech/tarsplitter")
2305 (synopsis "Multithreaded tar utility")
2307 "Archive huge numbers of files, or split massive tar archives into smaller
2309 (license license:expat)))
2311 (define-public c-blosc
2318 (url "https://github.com/Blosc/c-blosc")
2319 (commit (string-append "v" version))))
2320 (file-name (git-file-name name version))
2323 "1ywq8j70149859vvs19wgjq89d6xsvvmvm2n1dmkzpchxgrvnw70"))))
2324 (build-system cmake-build-system)
2325 (home-page "https://blosc.org")
2326 (synopsis "Blocking, shuffling and lossless compression library")
2328 "Blosc is a high performance compressor optimized for binary data. It has
2329 been designed to transmit data to the processor cache faster than the
2330 traditional, non-compressed, direct memory fetch approach via a
2331 @code{memcpy()} system call. Blosc is meant not only to reduce the size of
2332 large datasets on-disk or in-memory, but also to accelerate memory-bound
2334 ;; Blosc itself is released under BSD-3 but it incorporates code under
2335 ;; other non-copyleft licenses.
2336 (license license:bsd-3)))
2345 (url "https://github.com/alucryd/ecm-tools")
2346 (commit (string-append "v" version))))
2347 (file-name (git-file-name name version))
2350 "1rvyx5gcy8lfklgj80szlz3312x45wzx0d9jsgwyvy8f6m4nnb0c"))))
2351 (build-system gnu-build-system)
2353 `(#:tests? #f ; no check target
2355 (list (string-append "CC=" ,(cc-for-target))
2356 (string-append "DESTDIR=" (assoc-ref %outputs "out")))
2358 (modify-phases %standard-phases
2361 (substitute* "Makefile"
2362 (("\\$\\(DESTDIR\\)/usr") "$(DESTDIR)"))
2364 (home-page "https://github.com/alucryd/ecm-tools")
2365 (synopsis "Error code modeler")
2366 (description "ECM is a utility that converts ECM files, i.e., CD data files
2367 with their error correction data losslessly rearranged for better compression,
2368 to their original, binary CD format.")
2369 (license license:gpl3+)))
2371 (define-public tarlz
2378 (uri (string-append "mirror://savannah/lzip/tarlz/"
2379 "tarlz-" version ".tar.lz"))
2381 (base32 "09xal55973ivzpaja93jcc1pfla8gb3vrk8dx7pj9qvvz5aynf9n"))))
2382 (build-system gnu-build-system)
2386 `(("lzlib" ,lzlib)))
2387 (home-page "https://www.nongnu.org/lzip/tarlz.html")
2388 (synopsis "Combination of the tar archiver and the lzip compressor")
2390 "Tarlz is a massively parallel (multi-threaded) combined implementation of
2391 the tar archiver and the lzip compressor. Tarlz creates, lists, and extracts
2392 archives in a simplified and safer variant of the POSIX pax format compressed
2393 with lzip, keeping the alignment between tar members and lzip members. The
2394 resulting multimember tar.lz archive is fully backward compatible with standard
2395 tar tools like GNU tar, which treat it like any other tar.lz archive. Tarlz
2396 can append files to the end of such compressed archives.")
2397 (license license:gpl2+)))