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>
36 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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)))
99 (uri (list (string-append "http://zlib.net/zlib-"
101 (string-append "mirror://sourceforge/libpng/zlib/"
102 version "/zlib-" version ".tar.gz")))
105 "18dighcs333gsvajvvgqp8l4cx7h1x7yx9gd5xacnk80spyykrf3"))))
106 (build-system gnu-build-system)
107 (outputs '("out" "static"))
110 (modify-phases %standard-phases
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)))
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")
131 (home-page "https://zlib.net/")
132 (synopsis "Compression library")
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
143 (license license:zlib)))
145 (define-public minizip
148 (version (package-version zlib))
149 (source (package-source zlib))
150 (build-system gnu-build-system)
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"))
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")
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))))
178 (define-public fastjar
184 (uri (string-append "mirror://savannah/fastjar/fastjar-"
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")
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+)))
198 (define-public libtar
206 "ftp://ftp.feep.net/pub/software/libtar/libtar-"
209 "mirror://debian/pool/main/libt/libtar/libtar_"
210 version ".orig.tar.gz")))
213 "02cihzl77ia0dcz7z2cga2412vyhhs5pa2355q4wpwbyga2lrwjh"))
214 (patches (search-patches "libtar-CVE-2013-4420.patch"))))
215 (build-system gnu-build-system)
216 (arguments `(#:tests? #f)) ; no "check" target
218 `(("autoconf" ,autoconf)
219 ("automake" ,automake)
220 ("libtool" ,libtool)))
223 (synopsis "C library for manipulating POSIX tar files")
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)))
236 (uri (string-append "mirror://gnu/gzip/gzip-"
240 "1h6p374d3j8d4cdfydzls021xa2yby8myc0h8d6m8bc7k6ncq9c4"))))
241 (build-system gnu-build-system)
242 (synopsis "General file (de)compression (using lzw)")
244 ;; FIXME: The test suite wants `less', and optionally Perl.
247 (modify-phases %standard-phases
248 (add-after 'unpack 'patch-for-glibc-2.28
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"
261 "/* BSD stdio derived implementations")))
263 (add-after 'unpack 'use-absolute-name-of-gzip
264 (lambda* (#:key outputs #:allow-other-keys)
265 (substitute* "gunzip.in"
267 (string-append "exec " (assoc-ref outputs "out")
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/")))
284 (uri (string-append "https://sourceware.org/pub/bzip2/bzip2-"
288 "0s92986cv0p692icqlw1j42y9nld8zd83qwhzbqd61p1dqbh6nmb"))))
289 (build-system gnu-build-system)
291 `(#:modules ((guix build gnu-build-system)
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")))
301 ;; Prevent the build system from retaining a reference to
302 ;; BZIP2 from INPUTS.
304 (setenv "LIBRARY_PATH"
305 (string-join (delete (string-append bzip2 "/lib")
306 (string-split (getenv "LIBRARY_PATH")
309 (format #t "environment variable `LIBRARY_PATH' set to `~a'~%"
310 (getenv "LIBRARY_PATH")))
311 (format #t "no bzip2 found, nothing done~%"))
314 (lambda* (#:key target #:allow-other-keys)
315 (when ,(%current-target-system)
316 ;; Cross-compilation: use the cross tools.
317 (substitute* (find-files "." "Makefile")
319 (string-append "CC = " target "-gcc\n"))
321 (string-append "AR = " target "-ar\n"))
323 (string-append "RANLIB = " target "-ranlib\n"))
324 (("^all:(.*)test" _ prerequisites)
325 ;; Remove 'all' -> 'test' dependency.
326 (string-append "all:" prerequisites "\n"))))
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"))
339 ;; Locate the built library (e.g. "libbz2.so.1.0.6").
340 (lib (car (scandir "."
342 (and (string-prefix? soname file)
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))))))
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")
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")
371 #:make-flags (list (string-append "PREFIX="
372 (assoc-ref %outputs "out")))
374 ;; Don't attempt to run the tests when cross-compiling.
375 ,@(if (%current-target-system)
378 (outputs '("out" "static"))
379 (synopsis "High-quality data compression program")
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
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/")))
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")
397 (version (git-version "2.5" revision commit))
402 (url "https://github.com/kjn/lbzip2")
405 (base32 "140xp00dmjsr6c3dwb4dwf0pzlgf159igri321inbinsjiclkngy"))
406 (file-name (git-file-name name version))))
407 (build-system gnu-build-system)
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")))
417 (delete 'bootstrap) ; gnulib still has unpatched shebangs
418 (add-after 'patch-source-shebangs 'bootstrap
420 (invoke "sh" "build-aux/autogen.sh")
423 `(("autoconf" ,autoconf)
424 ("automake" ,automake)
426 ,(let ((commit "2d431ac35c4943a3655c07ba91870d2323321b43"))
430 (url "git://git.savannah.gnu.org/gnulib.git")
433 (base32 "1f0xr4w89bqvhzsfcflcagdixidrk41k00k7kpr91w9lazfis4kf"))
434 (file-name (git-file-name "gnulib" commit)))))
436 (synopsis "Parallel bzip2 compression utility")
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+))))
449 (define-public pbzip2
455 (uri (string-append "https://launchpad.net/pbzip2/"
456 (version-major+minor version) "/" version
457 "/+download/" name "-" version ".tar.gz"))
460 "1rnvgcdixjzbrmcr1nv9b6ccrjfrhryaj7jwz28yxxv6lam3xlcg"))))
461 (build-system gnu-build-system)
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")
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."))))
486 (uri (list (string-append "http://tukaani.org/xz/xz-" version
488 (string-append "http://multiprecision.org/guix/xz-"
492 "0ibi2zsfaz6l756spjwc5rayf4ckgc9hwmy8qinppcyk4svz64mm"))))
493 (build-system gnu-build-system)
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=''"))
510 (outputs '("out" "static"))
511 (synopsis "General-purpose data compression")
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.
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/")))
532 "https://github.com/fragglet/lhasa/releases/download/v"
533 version "/lhasa-" version ".tar.gz"))
536 "092zi9av18ma20c6h9448k0bapvx2plnp292741dvfd9hmgqxc1z"))))
537 (build-system gnu-build-system)
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")
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)))
565 (uri (string-append "http://www.oberhumer.com/opensource/lzo/download/lzo-"
569 "0wm04519pd3g8hqpjqhfr72q8qmbiwqaxcs3cndny9h86aa95y60"))))
570 (build-system gnu-build-system)
571 (arguments '(#:configure-flags '("--enable-shared")))
572 (home-page "http://www.oberhumer.com/opensource/lzo")
574 "Data compression library suitable for real-time data de-/compression")
576 "LZO is a data compression library which is suitable for data
577 de-/compression in real-time. This means it favours speed over
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+)))
591 (uri (string-append "http://www.lzop.org/download/lzop-"
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")
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+)))
613 (uri (string-append "mirror://savannah/lzip/lzip-"
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")
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+)))
628 (define-public lziprecover
634 (uri (string-append "mirror://savannah/lzip/lziprecover/"
635 "lziprecover-" version ".tar.gz"))
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")
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.
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.
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
658 (define-public sharutils
665 (uri (string-append "mirror://gnu/sharutils/sharutils-"
667 (patches (search-patches "sharutils-CVE-2018-1000097.patch"))
670 "16isapn8f39lnffc3dp4dan05b7x6mnc76v6q5nn8ysxvvvwy19b"))
671 (modules '((guix build utils)))
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"
682 "/* BSD stdio derived implementations")))
684 (build-system gnu-build-system)
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
694 (substitute* "tests/shar-1.ok"
695 (((which "sh")) "/bin/sh"))
697 (home-page "https://www.gnu.org/software/sharutils/")
698 (synopsis "Archives in shell scripts, uuencode/uudecode")
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+)))
706 (define-public sfarklib
713 (url "https://github.com/raboof/sfArkLib")
715 (file-name (git-file-name name version))
718 "0jrxy24gak7q5ml06p5jjgzk9i5r2mkfjk4ycirkp4kg7k5a237w"))))
719 (build-system gnu-build-system)
721 `(#:tests? #f ;no "check" target
723 (modify-phases %standard-phases
725 (lambda* (#:key outputs #:allow-other-keys)
726 (substitute* "Makefile"
727 (("/usr/local") (assoc-ref outputs "out")))
731 (home-page "https://github.com/raboof/sfArkLib")
732 (synopsis "Library for SoundFont decompression")
734 "SfArkLib is a C++ library for decompressing SoundFont files compressed
735 with the sfArk algorithm.")
736 (license license:gpl3+)))
738 (define-public sfarkxtc
739 (let ((commit "13cd6f93725a90d91ec5ea75babf1dbd694ac463")
743 (version (git-version "0" revision commit))
745 ;; There are no release tarballs, so we just fetch the latest
746 ;; commit at this time.
749 (url "https://github.com/raboof/sfarkxtc")
751 (file-name (git-file-name name version))
754 "1mb1jyk1m11l1gppd9hmql9cyp55sdf7jk5rbc7acky1z4k4mv19"))))
755 (build-system gnu-build-system)
757 `(#:tests? #f ;no "check" target
759 (modify-phases %standard-phases
761 (lambda* (#:key outputs #:allow-other-keys)
762 (substitute* "Makefile"
763 (("/usr/local") (assoc-ref outputs "out")))
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+))))
774 (define-public libmspack
777 (home-page "https://cabextract.org.uk/libmspack/")
782 (uri (string-append home-page name "-" version "alpha.tar.gz"))
784 (base32 "13janaqsvm7aqc4agjgd4819pbgqv50j88bh5kci1z70wvg65j5s"))))
785 (build-system gnu-build-system)
787 `(#:configure-flags '("--disable-static")))
788 (synopsis "Compression tools for some formats used by Microsoft")
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+)))
801 (uri (git-reference (url "https://github.com/lz4/lz4")
802 (commit (string-append "v" version))))
804 (base32 "1w02kazh1fps3sji2sn89fz862j1199c5ajrqcgl1bnlxj09kcbz"))
805 (file-name (git-file-name name version))))
806 (build-system gnu-build-system)
807 (outputs (list "out" "static"))
811 ("valgrind" ,valgrind)))
813 `(;; Not designed for parallel testing.
814 ;; See https://github.com/lz4/lz4/issues/957#issuecomment-737419821
817 #:make-flags (list (string-append "CC=" ,(cc-for-target))
818 (string-append "prefix=" (assoc-ref %outputs "out")))
820 (modify-phases %standard-phases
821 (delete 'configure) ; no configure script
822 (add-before 'check 'disable-broken-test
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)))
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"))
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+))))
848 (define-public squashfs-tools
850 (name "squashfs-tools")
854 (uri (string-append "mirror://sourceforge/squashfs/squashfs/"
855 "squashfs" version "/"
856 "squashfs" version ".tar.gz"))
859 "0zmhvczscqz0mzh4b9m8m42asq14db0a6lc8clp5ljq5ybrv70d9"))))
860 (build-system gnu-build-system)
862 `(#:tests? #f ; no check target
864 (list (string-append "CC=" ,(cc-for-target))
868 (string-append "INSTALL_DIR=" %output "/bin"))
870 (modify-phases %standard-phases
873 (chdir "squashfs-tools")
880 (home-page "https://github.com/plougher/squashfs-tools")
881 (synopsis "Tools to create and extract squashfs file systems")
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+)))
897 (uri (string-append "http://zlib.net/pigz/"
898 name "-" version ".tar.gz"))
901 "0z9avc4mifwcpj3qdsf9m2rjw9jx03b2r9pj0c4xgla9fh6ppv9f"))))
902 (build-system gnu-build-system)
905 (modify-phases %standard-phases
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)
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")
923 "This package provides a parallel implementation of gzip that exploits
924 multiple processors and multiple cores when compressing data.")
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)))
937 "https://github.com/vasi/pixz/releases/download/v" version
938 "/pixz-" version ".tar.xz"))
941 "1ifxr18f2h75gkcrkx8033kwmwmrcgxshpaawyc2n4dzn1p2rqz5"))))
942 (build-system gnu-build-system)
944 `(("pkg-config" ,pkg-config)
945 ("libarchive" ,libarchive)))
946 (home-page "https://github.com/vasi/pixz")
947 (synopsis "Parallel indexing implementation of LZMA")
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
954 (license license:bsd-2)))
956 (define-public bsdiff
960 (home-page "https://www.daemonology.net/bsdiff/")
963 (uri (string-append home-page name "-" version ".tar.gz"))
966 "0j2zm3z271x5aw63mwhr3vymzn45p2vvrlrpm9cz2nywna41b0hq"))
967 (patches (search-patches "bsdiff-CVE-2014-9862.patch"))))
968 (build-system gnu-build-system)
970 `(#:make-flags (list "INSTALL=install"
971 (string-append "CC=" ,(cc-for-target))
972 (string-append "PREFIX=" (assoc-ref %outputs "out")))
973 #:phases (modify-phases %standard-phases
975 (add-before 'build 'fix-Makefile
977 (substitute* "Makefile"
978 ;; Adjust syntax to make it compatible with GNU Make.
980 ;; Help install(1) create the target directory.
981 (("\\$\\{PREFIX\\}") "-D -t ${PREFIX}"))
983 #:tests? #f)) ;no tests
986 (synopsis "Patch binary files")
988 "@command{bsdiff} and @command{bspatch} are tools for building and
989 applying patches to binary files. By using suffix sorting (specifically
990 Larsson and Sadakane's @code{qsufsort}) and taking advantage of how
991 executable files change, bsdiff routinely produces binary patches 50-80%
992 smaller than those produced by @code{Xdelta}.")
993 (license license:bsd-2)))
995 (define-public cabextract
998 (home-page "https://cabextract.org.uk/")
1002 (uri (string-append home-page "cabextract-" version ".tar.gz"))
1005 "19qwhl2r8ip95q4vxzxg2kp4p125hjmc9762sns1dwwf7ikm7hmg"))
1006 (modules '((guix build utils)))
1009 ;; Delete bundled libmspack.
1010 (delete-file-recursively "mspack")
1012 (build-system gnu-build-system)
1014 '(#:configure-flags '("--with-external-libmspack")
1016 (modify-phases %standard-phases
1017 ;; cabextract needs some of libmspack's header files.
1018 ;; These are located in the "mspack" directory of libmspack.
1019 (add-before 'build 'unpack-libmspack
1020 (lambda* (#:key inputs #:allow-other-keys)
1021 (let ((dir-name "libmspack-src"))
1023 (invoke "tar" "-xvf" (assoc-ref inputs "libmspack-source")
1024 "-C" dir-name "--strip-components" "1")
1025 (rename-file (string-append dir-name "/mspack")
1027 (delete-file-recursively dir-name)
1030 `(("pkg-config" ,pkg-config)))
1032 `(("libmspack" ,libmspack)
1033 ("libmspack-source" ,(package-source libmspack))))
1034 (synopsis "Tool to unpack Cabinet archives")
1035 (description "Extracts files out of Microsoft Cabinet (.cab) archives")
1036 ;; Some source files specify gpl2+, lgpl2+, however COPYING is gpl3.
1037 (license license:gpl3+)))
1039 (define-public libjcat
1048 (url "https://github.com/hughsie/libjcat")
1050 (file-name (git-file-name name version))
1052 (base32 "1a2z34m8611xvna9kwch8ralxx7c9mk4rm9vrxx7p9hr8sbqbsaz"))))
1053 (build-system meson-build-system)
1055 `(("gobject-introspection" ,gobject-introspection)
1056 ("help2man" ,help2man)
1057 ("pkg-config" ,pkg-config)))
1064 ("json-glib" ,json-glib)
1066 (home-page "https://github.com/hughsie/libjcat")
1067 (synopsis "Library for reading and writing Jcat files")
1069 "This library allows reading and writing gzip-compressed JSON catalog
1070 files, which can be used to store GPG, PKCS-7 and SHA-256 checksums for each
1072 (license license:lgpl2.1+)))
1074 (define-public xdelta
1082 (url "https://github.com/jmacd/xdelta")
1083 (commit (string-append "v" version))))
1084 (file-name (git-file-name name version))
1087 "09mmsalc7dwlvgrda56s2k927rpl3a5dzfa88aslkqcjnr790wjy"))
1089 ;; This file isn't freely distributable and has no effect on building.
1091 (delete-file "xdelta3/draft-korn-vcdiff.txt")
1093 (build-system gnu-build-system)
1095 `(("autoconf" ,autoconf)
1096 ("automake" ,automake)))
1099 (modify-phases %standard-phases
1100 (add-after 'unpack 'enter-build-directory
1101 (lambda _ (chdir "xdelta3") #t)))))
1102 (home-page "http://xdelta.org")
1103 (synopsis "Delta encoder for binary files")
1104 (description "xdelta encodes only the differences between two binary files
1105 using the VCDIFF algorithm and patch file format described in RFC 3284. It can
1106 also be used to apply such patches. xdelta is similar to @command{diff} and
1107 @command{patch}, but is not limited to plain text and does not generate
1108 human-readable output.")
1109 (license license:asl2.0)))
1111 (define-public lrzip
1119 "http://ck.kolivas.org/apps/lrzip/lrzip-" version ".tar.xz"))
1121 (base32 "0ziyanspd96dc3lp2qdcylc7aq8dhb511jhqrhxvlp502fjqjqrc"))))
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)
1135 (home-page "http://ck.kolivas.org/apps/lrzip/")
1136 (synopsis "Large file compressor with a very high compression ratio")
1137 (description "lrzip is a compression utility that uses long-range
1138 redundancy reduction to improve the subsequent compression ratio of
1139 larger files. It can then further compress the result with the ZPAQ or
1140 LZMA algorithms for maximum compression, or LZO for maximum speed. This
1141 choice between size or speed allows for either better compression than
1142 even LZMA can provide, or a higher speed than gzip while compressing as
1144 (license (list license:gpl3+
1145 license:public-domain)))) ; most files in lzma/
1147 (define-public snappy
1155 (url "https://github.com/google/snappy")
1157 (file-name (git-file-name name version))
1159 (base32 "1j0kslq2dvxgkcxl1gakhvsa731yrcvcaipcp5k8k7ayicvkv9jv"))
1160 (patches (search-patches "snappy-add-O2-flag-in-CmakeLists.txt.patch"))))
1161 (build-system cmake-build-system)
1163 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
1164 (home-page "https://github.com/google/snappy")
1165 (synopsis "Fast compressor/decompressor")
1166 (description "Snappy is a compression/decompression library. It does not
1167 aim for maximum compression, or compatibility with any other compression library;
1168 instead, it aims for very high speeds and reasonable compression. For instance,
1169 compared to the fastest mode of zlib, Snappy is an order of magnitude faster
1170 for most inputs, but the resulting compressed files are anywhere from 20% to
1172 (license license:asl2.0)))
1174 (define-public p7zip
1180 (uri (string-append "mirror://sourceforge/" name "/" name "/"
1181 version "/" name "_" version
1182 "_src_all.tar.bz2"))
1185 "07rlwbbgszq8i7m8jh3x6j2w2hc9a72dc7fmqawnqkwlwb00mcjy"))
1186 (modules '((guix build utils)))
1189 ;; Remove non-free source files
1190 (for-each delete-file
1192 (find-files "CPP/7zip/Compress" "Rar.*")
1193 (find-files "CPP/7zip/Crypto" "Rar.*")
1194 (find-files "DOC/unRarLicense.txt")
1195 (find-files "Utils/file_Codecs_Rar_so.py")))
1196 (delete-file-recursively "CPP/7zip/Archive/Rar")
1197 (delete-file-recursively "CPP/7zip/Compress/Rar")
1199 (patches (search-patches "p7zip-CVE-2016-9296.patch"
1200 "p7zip-CVE-2017-17969.patch"
1201 "p7zip-remove-unused-code.patch"))))
1202 (build-system gnu-build-system)
1205 (list (string-append "DEST_HOME=" (assoc-ref %outputs "out")) "all3")
1207 (modify-phases %standard-phases
1209 (lambda* (#:key system outputs #:allow-other-keys)
1211 (let ((system ,(or (%current-target-system)
1212 (%current-system))))
1214 ((string-prefix? "x86_64" system)
1215 "makefile.linux_amd64_asm")
1216 ((string-prefix? "i686" system)
1217 "makefile.linux_x86_asm_gcc_4.X")
1219 "makefile.linux_any_cpu_gcc_4.X")))
1220 "makefile.machine")))
1223 (invoke "make" "test")
1224 (invoke "make" "test_7z")
1225 (invoke "make" "test_7zr"))))))
1227 (let ((system (or (%current-target-system)
1228 (%current-system))))
1229 `(,@(cond ((string-prefix? "x86_64" system)
1231 ((string-prefix? "i686" system)
1234 (home-page "http://p7zip.sourceforge.net/")
1235 (synopsis "Command-line file archiver with high compression ratio")
1236 (description "p7zip is a command-line port of 7-Zip, a file archiver that
1237 handles the 7z format which features very high compression ratios.")
1238 (license (list license:lgpl2.1+
1240 license:public-domain))))
1242 (define-public gzstream
1249 ;; No versioned URL, but last release was in 2003.
1250 "http://www.cs.unc.edu/Research/compgeom/gzstream/gzstream.tgz")
1251 (file-name (string-append name "-" version ".tgz"))
1254 "00y19pqjsdj5zcrx4p9j56pl73vayfwnb7y2hvp423nx0cwv5b4r"))
1255 (modules '((guix build utils)))
1257 ;; Remove pre-compiled object.
1259 (delete-file "gzstream.o")
1261 (build-system gnu-build-system)
1263 `(#:test-target "test"
1265 (modify-phases %standard-phases
1268 (lambda* (#:key outputs #:allow-other-keys)
1269 (let* ((out (assoc-ref outputs "out"))
1270 (lib (string-append out "/lib"))
1271 (include (string-append out "/include")))
1272 (install-file "libgzstream.a" lib)
1273 (install-file "gzstream.h" include)
1275 (propagated-inputs `(("zlib" ,zlib)))
1276 (home-page "http://www.cs.unc.edu/Research/compgeom/gzstream/")
1277 (synopsis "Compressed C++ iostream")
1278 (description "gzstream is a small library for providing zlib
1279 functionality in a C++ iostream.")
1280 (license license:lgpl2.1+)))
1288 (method url-fetch/zipbomb)
1289 (uri (string-append "http://mattmahoney.net/dc/zpaq"
1290 (string-delete #\. version) ".zip"))
1293 "066l94yyladlfzri877nh2dhkvspagjn3m5bmv725fmhkr9c4pp8"))
1294 (modules '((guix build utils)))
1296 ;; Delete irrelevant pre-compiled binaries.
1298 (for-each delete-file (find-files "." "\\.exe$"))
1300 (build-system gnu-build-system)
1303 (modify-phases %standard-phases
1304 (delete 'configure)) ; no ‘configure’ script
1307 (string-append "CPPFLAGS=-Dunix"
1308 ,(match (or (%current-target-system)
1313 ;; These should be safe, lowest-common-denominator instruction sets,
1314 ;; allowing for some optimisation while remaining reproducible.
1315 (string-append "CXXFLAGS=-O3 -DNDEBUG"
1316 ,(match (or (%current-target-system)
1318 ("x86_64-linux" " -march=nocona -mtune=generic")
1319 ("i686-linux" " -march=i686 -mtune=generic")
1320 ("armhf-linux" " -mtune=generic-armv7-a")
1322 (string-append "PREFIX="
1323 (assoc-ref %outputs "out")))))
1325 `(("perl" ,perl))) ; for pod2man
1326 (home-page "http://mattmahoney.net/dc/zpaq.html")
1327 (synopsis "Incremental journaling archiver")
1328 (description "ZPAQ is a command-line archiver for realistic situations with
1329 many duplicate and already compressed files. It backs up only those files
1330 modified since the last update. All previous versions remain untouched and can
1331 be independently recovered. Identical files are only stored once (known as
1332 @dfn{de-duplication}). Archives can also be encrypted.
1334 ZPAQ is intended to back up user data, not entire operating systems. It ignores
1335 owner and group IDs, ACLs, extended attributes, or special file types like
1336 devices, sockets, or named pipes. It does not follow or restore symbolic links
1337 or junctions, and always follows hard links.")
1338 (license (list license:public-domain
1339 ;; libzpaq.cpp contains a mix of public-domain and
1340 ;; expat-licenced (or ‘MIT’) code.
1343 (define-public unshield
1348 (origin (method git-fetch)
1350 (url "http://github.com/twogood/unshield")
1352 (file-name (git-file-name name version))
1355 "19wn22vszhci8dfcixx5rliz7phx3lv5ablvhjlclvj75k2vsdqd"))))
1356 (build-system cmake-build-system)
1359 ("openssl" ,openssl)
1360 ;; Test data that is otherwise downloaded with curl.
1361 ("unshield-avigomanager11b22.zip"
1365 "https://www.dropbox.com/s/8r4b6752swe3nhu/"
1366 "unshield-avigomanager11b22.zip?dl=1"))
1368 (base32 "0fwq7lih04if68wpwpsk5wjqyvh32db76a41sq6gbx4dn1lc3ddn"))
1369 (file-name "unshield-avigomanager11b22.zip")))
1370 ("unshield-baldurs_gate_patch_v1_1_4315_international.zip"
1374 "https://www.dropbox.com/s/9ruil8oi6amjbbk/"
1375 "unshield-baldurs_gate_patch_v1_1_4315_international.zip?dl=1"))
1377 (base32 "0spaxf6dardlhqxz3ys09fzamj007q3nfyw4xng6gh3qp9780maj"))
1378 (file-name "unshield-baldurs_gate_patch_v1_1_4315_international.zip")))
1379 ("unshield-the-feeble-files-spanish.zip"
1383 "https://www.dropbox.com/s/1ng0z9kfxc7eb1e/"
1384 "unshield-the-feeble-files-spanish.zip?dl=1"))
1386 (base32 "1k5cw6vnpja8yjlnhx5124xrw9i8s1l539hfdqqrqz3l5gn0bnyd"))
1387 (file-name "unshield-the-feeble-files-spanish.zip")))))
1389 `(("unzip" ,unzip)))
1391 `(#:out-of-source? #f
1393 (modify-phases %standard-phases
1394 (add-before 'check 'pre-check
1395 (lambda* (#:key inputs #:allow-other-keys)
1396 (for-each (lambda (i)
1397 (copy-file (assoc-ref inputs i)
1398 (string-append "test/v0/" i)))
1399 '("unshield-avigomanager11b22.zip"
1400 "unshield-baldurs_gate_patch_v1_1_4315_international.zip"
1401 "unshield-the-feeble-files-spanish.zip"))
1402 (substitute* (find-files "test/" "/*\\.sh")
1403 ;; Tests expect the unshield binary in a specific
1405 (("/var/tmp/unshield/bin/unshield")
1406 (string-append (getcwd) "/src/unshield"))
1407 ;; We no longer need to download the data.
1409 (("curl -(|f)sSL -o test.zip .*") ""))
1410 (substitute* "test/v0/avigomanager.sh"
1412 (string-append (getcwd)
1413 "/test/v0/unshield-avigomanager11b22.zip")))
1414 (substitute* "test/v0/baldurs_gate_patch_v1_1_4315_international.sh"
1418 "/test/v0/unshield-baldurs_gate_patch_v1_1_4315_international.zip")))
1419 (substitute* "test/v0/the-feeble-files-spanish.sh"
1421 (string-append (getcwd)
1422 "/test/v0/unshield-the-feeble-files-spanish.zip")))
1426 (invoke "./run-tests.sh"))))))
1427 (home-page "https://github.com/twogood/unshield")
1428 (synopsis "Extract CAB files from InstallShield installers")
1430 "@command{unshield} is a tool and library for extracting @file{.cab}
1431 archives from InstallShield installers.")
1432 (license license:expat)))
1441 (uri (string-append "https://github.com/facebook/zstd/releases/download/"
1442 "v" version "/zstd-" version ".tar.gz"))
1444 (base32 "05ckxap00qvc0j51d3ci38150cxsw82w7s9zgd5fgzspnzmp1vsr"))))
1445 (replacement zstd-1.4.9)
1446 (build-system gnu-build-system)
1447 (outputs '("out" ;1.2MiB executables and documentation
1448 "lib" ;1.2MiB shared library and headers
1449 "static")) ;1.2MiB static library
1452 (modify-phases %standard-phases
1453 (delete 'configure) ;no configure script
1454 (add-after 'install 'adjust-library-locations
1455 (lambda* (#:key outputs #:allow-other-keys)
1456 (let* ((out (assoc-ref outputs "out"))
1457 (lib (assoc-ref outputs "lib"))
1458 (static (assoc-ref outputs "static"))
1459 (shared-libs (string-append lib "/lib"))
1460 (static-libs (string-append static "/lib")))
1461 ;; Move the static library to its own output to save ~1MiB.
1462 (mkdir-p static-libs)
1463 (for-each (lambda (ar)
1464 (link ar (string-append static-libs "/"
1467 (find-files shared-libs "\\.a$"))
1469 ;; Make sure the pkg-config file refers to the right output.
1470 (substitute* (string-append shared-libs "/pkgconfig/libzstd.pc")
1472 (string-append "prefix=" lib "\n")))
1476 ;; TODO: Integrate in next rebuild cycle.
1477 (list ,(if (%current-target-system)
1478 (string-append "CC=" (cc-for-target))
1480 (string-append "PREFIX=" (assoc-ref %outputs "out"))
1481 (string-append "LIBDIR=" (assoc-ref %outputs "lib") "/lib")
1482 (string-append "INCLUDEDIR=" (assoc-ref %outputs "lib") "/include")
1483 ;; Skip auto-detection of, and creating a dependency on, the build
1484 ;; environment's ‘xz’ for what amounts to a dubious feature anyway.
1486 ;; Not currently detected, but be explicit & avoid surprises later.
1489 (home-page "https://facebook.github.io/zstd/")
1490 (synopsis "Zstandard real-time compression algorithm")
1491 (description "Zstandard (@command{zstd}) is a lossless compression algorithm
1492 that combines very fast operation with a compression ratio comparable to that of
1493 zlib. In most scenarios, both compression and decompression can be performed in
1494 ‘real time’. The compressor can be configured to provide the most suitable
1495 trade-off between compression ratio and speed, without affecting decompression
1497 (license (list license:bsd-3 ; the main top-level LICENSE file
1498 license:bsd-2 ; many files explicitly state 2-Clause
1499 license:gpl2 ; the main top-level COPYING file
1500 license:gpl3+ ; tests/gzip/*.sh
1501 license:expat ; lib/dictBuilder/divsufsort.[ch]
1502 license:public-domain ; zlibWrapper/examples/fitblk*
1503 license:zlib)))) ; zlibWrapper/{gz*.c,gzguts.h}
1505 (define-public zstd-1.4.9
1513 (uri (string-append "https://github.com/facebook/zstd/releases/download/"
1514 "v" version "/zstd-" version ".tar.gz"))
1516 (base32 "14yj7309gsvg39rki4xqnd6w5idmqi0655v1fc0mk1m2kvhp9b19"))))))
1518 (define-public pzstd
1521 (version (package-version zstd))
1522 (source (package-source zstd))
1523 (build-system gnu-build-system)
1525 `(,@(if (%current-target-system)
1526 `(("googletest" ,googletest))
1529 `(,@(if (%current-system)
1530 `(("googletest" ,googletest))
1534 (modify-phases %standard-phases
1535 (add-after 'unpack 'enter-subdirectory
1536 (lambda _ (chdir "contrib/pzstd") #t))
1537 (delete 'configure) ; no configure script
1538 (add-before 'check 'compile-tests
1539 (lambda* (#:key make-flags #:allow-other-keys)
1540 (apply invoke "make" "tests" make-flags)))
1541 (add-after 'install 'install-documentation
1542 (lambda* (#:key outputs #:allow-other-keys)
1543 (let* ((out (assoc-ref outputs "out"))
1544 (doc (string-append out "/share/doc/" ,name)))
1546 (install-file "README.md" doc)
1549 (list (string-append "CC=" ,(cc-for-target))
1550 (string-append "CXX=" ,(cxx-for-target))
1551 (string-append "PREFIX=" (assoc-ref %outputs "out")))))
1552 (home-page (package-home-page zstd))
1553 (synopsis "Threaded implementation of the Zstandard compression algorithm")
1554 (description "Parallel Zstandard (PZstandard or @command{pzstd}) is a
1555 multi-threaded implementation of the @uref{http://zstd.net/, Zstandard
1556 compression algorithm}. It is fully compatible with the original Zstandard file
1557 format and command-line interface, and can be used as a drop-in replacement.
1559 Compression is distributed over multiple processor cores to improve performance,
1560 as is the decompression of data compressed in this manner. Data compressed by
1561 other implementations will only be decompressed by two threads: one performing
1562 the actual decompression, the other input and output.")
1563 (license (package-license zstd))))
1572 (uri (string-append "mirror://sourceforge/infozip"
1573 "/Zip%203.x%20%28latest%29/3.0/zip30.tar.gz"))
1576 "0sb3h3067pzf3a7mlxn1hikpcjrsvycjcnj9hl9b1c3ykcgvps7h"))))
1577 (build-system gnu-build-system)
1578 (inputs `(("bzip2" ,bzip2)))
1580 `(#:tests? #f ; no test target
1581 #:make-flags (let ((out (assoc-ref %outputs "out")))
1582 (list "-f" "unix/Makefile"
1583 (string-append "prefix=" out)
1584 (string-append "MANDIR=" out "/share/man/man1")))
1586 (modify-phases %standard-phases
1588 (lambda* (#:key (make-flags '()) #:allow-other-keys)
1589 (apply invoke "make" "generic_gcc" make-flags)))
1590 (delete 'configure))))
1591 (home-page "http://www.info-zip.org/Zip.html")
1592 (synopsis "Compression and file packing utility")
1594 "Zip is a compression and file packaging/archive utility. Zip is useful
1595 for packaging a set of files for distribution, for archiving files, and for
1596 saving disk space by temporarily compressing unused files or directories.
1597 Zip puts one or more compressed files into a single ZIP archive, along with
1598 information about the files (name, path, date, time of last modification,
1599 protection, and check information to verify file integrity). An entire
1600 directory structure can be packed into a ZIP archive with a single command.
1602 Zip has one compression method (deflation) and can also store files without
1603 compression. Zip automatically chooses the better of the two for each file.
1604 Compression ratios of 2:1 to 3:1 are common for text files.")
1605 (license (license:non-copyleft "file://LICENSE"
1606 "See LICENSE in the distribution."))))
1608 (define-public unzip
1609 (package (inherit zip)
1615 (uri (string-append "mirror://sourceforge/infozip"
1616 "/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz"))
1619 "0dxx11knh3nk95p2gg2ak777dd11pr7jx5das2g49l262scrcv83"))
1620 (patches (search-patches "unzip-CVE-2014-8139.patch"
1621 "unzip-CVE-2014-8140.patch"
1622 "unzip-CVE-2014-8141.patch"
1623 "unzip-CVE-2014-9636.patch"
1624 "unzip-CVE-2015-7696.patch"
1625 "unzip-CVE-2015-7697.patch"
1626 "unzip-allow-greater-hostver-values.patch"
1627 "unzip-initialize-symlink-flag.patch"
1628 "unzip-remove-build-date.patch"
1629 "unzip-attribs-overflow.patch"
1630 "unzip-overflow-on-invalid-input.patch"
1631 "unzip-format-secure.patch"
1632 "unzip-overflow-long-fsize.patch"))))
1633 (build-system gnu-build-system)
1634 ;; no inputs; bzip2 is not supported, since not compiled with BZ_NO_STDIO
1636 `(#:phases (modify-phases %standard-phases
1638 (add-after 'unpack 'fortify
1640 ;; Mitigate CVE-2018-1000035, an exploitable buffer overflow.
1641 ;; This environment variable is recommended in 'unix/Makefile'
1642 ;; for passing flags to the C compiler.
1643 (setenv "LOCAL_UNZIP" "-D_FORTIFY_SOURCE=1")
1646 (lambda* (#:key make-flags #:allow-other-keys)
1647 (apply invoke "make"
1648 `("-j" ,(number->string
1649 (parallel-job-count))
1652 #:make-flags (list "-f" "unix/Makefile"
1653 (string-append "prefix=" %output)
1654 (string-append "MANDIR=" %output "/share/man/man1"))))
1655 (home-page "http://www.info-zip.org/UnZip.html")
1656 (synopsis "Decompression and file extraction utility")
1658 "UnZip is an extraction utility for archives compressed in .zip format,
1659 also called \"zipfiles\".
1661 UnZip lists, tests, or extracts files from a .zip archive. The default
1662 behaviour (with no options) is to extract into the current directory, and
1663 subdirectories below it, all files from the specified zipfile. UnZip
1664 recreates the stored directory structure by default.")
1665 (license (license:non-copyleft "file://LICENSE"
1666 "See LICENSE in the distribution."))))
1668 (define-public ziptime
1669 (let ((commit "2a5bc9dfbf7c6a80e5f7cb4dd05b4036741478bc")
1673 (version (git-version "0.0.0" revision commit))
1678 (url "https://android.googlesource.com/platform/build")
1680 (file-name (git-file-name name version))
1682 (base32 "0hrn61b3a97dlc4iqc28rwx8k8zf7ycbwzqqp93vj34zy5a541kn"))))
1683 (build-system gnu-build-system)
1685 `(#:tests? #f ; no test suite
1687 (modify-phases %standard-phases
1688 (add-after 'unpack 'change-directory
1690 (chdir "tools/ziptime")))
1691 (delete 'configure) ; nothing to configure
1693 ;; There is no Makefile, only an ‘Android.bp’ file. Ignore it.
1695 (let ((c++ ,(cxx-for-target)))
1696 (apply invoke c++ "-O2" "-o" "ziptime"
1697 (find-files "." "\\.cpp$")))))
1699 (lambda* (#:key outputs #:allow-other-keys)
1700 (let* ((out (assoc-ref outputs "out"))
1701 (bin (string-append out "/bin"))
1702 (doc (string-append out "/share/doc/" ,name "-" ,version)))
1703 (install-file "ziptime" bin)
1704 (install-file "README.txt" doc)))))))
1705 ;; There is no separate home page for this tiny bundled build tool.
1706 (home-page (string-append "https://android.googlesource.com/platform/build/"
1707 "+/master/tools/ziptime/README.txt"))
1708 (synopsis "Normalize @file{.zip} archive header timestamps")
1710 "Ziptime helps make @file{.zip} archives reproducible by replacing
1711 timestamps in the file header with a fixed time (1 January 2008).
1713 ``Extra fields'' are not changed, so you'll need to use the @code{-X} option to
1714 @command{zip} to prevent it from storing the ``universal time'' field.")
1715 (license license:asl2.0))))
1717 (define-public zziplib
1721 (home-page "https://github.com/gdraheim/zziplib")
1724 (uri (git-reference (url home-page)
1725 (commit (string-append "v" version))))
1726 (file-name (git-file-name name version))
1727 (patches (search-patches "zziplib-CVE-2018-16548.patch"))
1730 "0fbk9k7ryas2wh2ykwkvm1pbi40i88rfvc3dydh9xyd7w2jcki92"))))
1731 (build-system gnu-build-system)
1733 `(#:phases (modify-phases %standard-phases
1734 (add-before 'check 'make-files-writable
1736 (for-each make-file-writable
1737 (find-files "test" #:directories? #t))
1740 ;; XXX: The default test target attempts to download external resources and
1741 ;; fails without error: <https://github.com/gdraheim/zziplib/issues/53>.
1742 ;; To prevent confusing log messages, just run a simple zip test that works.
1743 #:test-target "check-readme"))
1746 (native-inputs `(("perl" ,perl) ; for the documentation
1747 ("pkg-config" ,pkg-config)
1748 ;; for the documentation; Python 3 not supported,
1749 ;; http://forums.gentoo.org/viewtopic-t-863161-start-0.html
1750 ("python" ,python-2)
1751 ("zip" ,zip))) ; to create test files
1752 (synopsis "Library for accessing zip files")
1754 "ZZipLib is a library based on zlib for accessing zip files.")
1755 ;; zziplib is dual licensed under LGPL2.0+ and MPL1.1. Some example source
1756 ;; files carry the Zlib license; see "docs/copying.html" for details.
1757 (license (list license:lgpl2.0+ license:mpl1.1))))
1759 (define-public libzip
1766 "https://libzip.org/download/libzip-" version ".tar.xz"))
1769 "0ck1dk7zn5qzpgxklg0r26nfsf04xb6c46gsig060hkvvgzp6156"))))
1773 `(("gnutls" ,gnutls)
1775 ("openssl" ,openssl)
1777 (build-system cmake-build-system)
1778 (home-page "https://libzip.org")
1779 (synopsis "C library for reading, creating, and modifying zip archives")
1780 (description "Libzip is a C library for reading, creating, and modifying
1781 zip archives. Files can be added from data buffers, files, or compressed data
1782 copied directly from other zip archives. Changes made without closing the
1783 archive can be reverted.")
1784 (license license:bsd-3)))
1786 (define-public atool
1793 (uri (string-append "mirror://savannah/atool/atool-"
1797 "0fvhzip2v08jgnlfpyj6rapan39xlsl1ksgq4lp8gfsai2ah1xma"))))
1798 (build-system gnu-build-system)
1801 (modify-phases %standard-phases
1802 (add-after 'unpack 'embed-absolute-file-name
1803 (lambda* (#:key inputs #:allow-other-keys)
1804 (substitute* "atool"
1805 (("(^\\$::cfg_path_file.*= )'file'" _ pre)
1806 (string-append pre "'" (assoc-ref inputs "file")
1812 (home-page "https://www.nongnu.org/atool/")
1813 (synopsis "Universal tool to manage file archives of various types")
1814 (description "The main command is @command{aunpack} which extracts files
1815 from an archive. The other commands provided are @command{apack} (to create
1816 archives), @command{als} (to list files in archives), and @command{acat} (to
1817 extract files to standard out). As @command{atool} invokes external programs
1818 to handle the archives, not all commands may be supported for a certain type
1820 (license license:gpl2+)))
1822 (define-public lunzip
1829 (uri (string-append "mirror://savannah/lzip/lunzip/"
1830 "lunzip-" version ".tar.gz"))
1832 (base32 "1liaynyy3qcs29hfk1pnb7i9r1mnmpw557j5v356qsv6qnm4lnz5"))))
1833 (build-system gnu-build-system)
1836 (list ,(string-append "CC=" (cc-for-target)))))
1837 (home-page "https://www.nongnu.org/lzip/lunzip.html")
1838 (synopsis "Small, stand-alone lzip decompressor")
1840 "Lunzip is a decompressor for files in the lzip compression format (.lz),
1841 written as a single small C tool with no dependencies. This makes it
1842 well-suited to embedded and other systems without a C++ compiler, or for use in
1843 applications such as software installers that need only to decompress files,
1845 Lunzip is intended to be fully compatible with the regular lzip package.")
1846 (license (list license:bsd-2 ; carg_parser.[ch]
1847 license:gpl2+)))) ; everything else
1849 (define-public clzip
1856 (uri (string-append "mirror://savannah/lzip/clzip/"
1857 "clzip-" version ".tar.gz"))
1859 (base32 "1s7yidqvmxi61hh569h5aci816l6qkffjgx0zx57qyyq0qq2pjgw"))))
1860 (build-system gnu-build-system)
1863 (list ,(string-append "CC=" (cc-for-target)))))
1864 (home-page "https://www.nongnu.org/lzip/clzip.html")
1865 (synopsis "Small, stand-alone lzip compressor and decompressor")
1867 "Clzip is a compressor and decompressor for files in the lzip compression
1868 format (.lz), written as a single small C tool with no dependencies. This makes
1869 it well-suited to embedded and other systems without a C++ compiler, or for use
1870 in other applications like package managers.
1871 Clzip is intended to be fully compatible with the regular lzip package.")
1872 (license (list license:bsd-2 ; carg_parser.[ch], lzd in clzip.texi
1875 (define-public lzlib
1882 (uri (string-append "mirror://savannah/lzip/lzlib/"
1883 "lzlib-" version ".tar.gz"))
1885 (base32 "1c9pwd6by8is4z8bs6j306jyy6pgm2dvsn4fr7fg2b5m5qj88pcf"))))
1886 (build-system gnu-build-system)
1889 (list (string-append "CC=" ,(cc-for-target))
1891 "--enable-shared"))) ; only static (.a) is built by default
1892 (home-page "https://www.nongnu.org/lzip/lzlib.html")
1893 (synopsis "Lzip data compression C library")
1895 "Lzlib is a C library for in-memory LZMA compression and decompression in
1896 the lzip format. It supports integrity checking of the decompressed data, and
1897 all functions are thread-safe. The library should never crash, even in case of
1899 (license (list license:bsd-2 ; the library itself
1900 license:gpl2+)))) ; main.c (i.e. minilzip used by tests)
1902 (define-public plzip
1909 (uri (string-append "mirror://savannah/lzip/plzip/"
1910 "plzip-" version ".tar.gz"))
1912 (base32 "19zinpx7hssl6r3vilpvq2s7wha3545xan8b0vcvsxnyipdx3n0l"))))
1913 (build-system gnu-build-system)
1915 `(("lzlib" ,lzlib)))
1916 (home-page "https://www.nongnu.org/lzip/plzip.html")
1917 (synopsis "Parallel lossless data compressor for the lzip format")
1919 "Plzip is a massively parallel (multi-threaded) lossless data compressor
1920 and decompressor that uses the lzip file format (.lz). Files produced by plzip
1921 are fully compatible with lzip and can be rescued with lziprecover.
1922 On multiprocessor machines, plzip can compress and decompress large files much
1923 faster than lzip, at the cost of a slightly reduced compression ratio (0.4% to
1924 2%). The number of usable threads is limited by file size: on files of only a
1925 few MiB, plzip is no faster than lzip.
1926 Files that were compressed with regular lzip will also not be decompressed
1927 faster by plzip, unless the @code{-b} option was used: lzip usually produces
1928 single-member files which can't be decompressed in parallel.")
1929 (license (list license:bsd-2 ; arg_parser.{cc,h}
1930 license:gpl2+)))) ; everything else
1932 (define-public innoextract
1934 (name "innoextract")
1939 (uri (string-append "https://constexpr.org/innoextract/files/"
1940 "innoextract-" version "/"
1941 "/innoextract-" version ".tar.gz"))
1943 (base32 "09l1z1nbl6ijqqwszdwch9mqr54qb7df0wp2sd77v17dq6gsci33"))))
1944 (build-system cmake-build-system)
1947 (inputs `(("boost" ,boost)
1948 ("libiconv" ,libiconv)
1950 (native-inputs `(("pkg-config" ,pkg-config)))
1951 (home-page "https://constexpr.org/innoextract/")
1952 (synopsis "Tool for extracting Inno Setup installers")
1953 (description "innoextract allows extracting Inno Setup installers under
1954 non-Windows systems without running the actual installer using wine.")
1955 (license license:zlib)))
1957 (define-public google-brotli
1959 (name "google-brotli")
1965 (url "https://github.com/google/brotli")
1966 (commit (string-append "v" version))))
1967 (file-name (git-file-name name version))
1969 (base32 "1fikasxf7r2dwlk8mv8w7nmjkn0jw5ic31ky3mvpkdzwgd4xfndl"))
1970 (modules '((guix build utils)))
1973 ;; Cherry-picked from upstream since the latest release
1974 ;; https://github.com/google/brotli/commit/09b0992b6acb7faa6fd3b23f9bc036ea117230fc
1975 (substitute* (find-files "scripts" "^lib.*pc\\.in")
1976 (("-R\\$\\{libdir\\} ") ""))
1978 (build-system cmake-build-system)
1981 (modify-phases %standard-phases
1982 (add-after 'install 'rename-static-libraries
1983 ;; The build tools put a 'static' suffix on the static libraries, but
1984 ;; other applications don't know how to find these.
1985 (lambda* (#:key outputs #:allow-other-keys)
1986 (let ((lib (string-append (assoc-ref %outputs "out") "/lib/")))
1987 (rename-file (string-append lib "libbrotlicommon-static.a")
1988 (string-append lib "libbrotlicommon.a"))
1989 (rename-file (string-append lib "libbrotlidec-static.a")
1990 (string-append lib "libbrotlidec.a"))
1991 (rename-file (string-append lib "libbrotlienc-static.a")
1992 (string-append lib "libbrotlienc.a"))
1995 (list ;; Defaults to "lib64" on 64-bit archs.
1996 (string-append "-DCMAKE_INSTALL_LIBDIR="
1997 (assoc-ref %outputs "out") "/lib"))))
1998 (home-page "https://github.com/google/brotli")
1999 (synopsis "General-purpose lossless compression")
2000 (description "This package provides the reference implementation of Brotli,
2001 a generic-purpose lossless compression algorithm that compresses data using a
2002 combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd
2003 order context modeling, with a compression ratio comparable to the best
2004 currently available general-purpose compression methods. It is similar in speed
2005 with @code{deflate} but offers more dense compression.
2007 The specification of the Brotli Compressed Data Format is defined in RFC 7932.")
2008 (license license:expat)))
2010 (define-public brotli
2011 ;; We used to provide an older version under the name "brotli".
2012 (deprecated-package "brotli" google-brotli))
2014 (define-public python-google-brotli
2016 (inherit google-brotli)
2017 (name "python-google-brotli")
2018 (build-system python-build-system)
2020 (synopsis "Python interface to google-brotli")
2021 (description "@code{python-google-brotli} provides a Python interface to
2022 @code{google-brotli}, an implementation of the Brotli lossless compression
2031 (uri (string-append "https://www.oberhumer.com/opensource/"
2032 name "/download/" name "-" version ".tar.gz"))
2035 "0j036lkwsxvm15gr29n8wn07cqq79dswjs9k54939ms5zngjjrdq"))))
2036 (build-system gnu-build-system)
2038 `(;; UCL 1.03 fails to build with newer C standards.
2039 #:configure-flags '("CFLAGS=-std=gnu90"
2040 "--enable-shared" "--disable-static")))
2041 (home-page "https://www.oberhumer.com/opensource/ucl/")
2042 (synopsis "Portable lossless data compression library")
2043 (description "UCL implements a number of compression algorithms that
2044 achieve an excellent compression ratio while allowing fast decompression.
2045 Decompression requires no additional memory.
2047 Compared to LZO, the UCL algorithms achieve a better compression ratio but
2048 decompression is a little bit slower.")
2049 (license license:gpl2+)))
2057 (uri (string-append "https://github.com/upx/upx/releases/download/v"
2058 version "/upx-" version "-src.tar.xz"))
2061 "051pk5jk8fcfg5mpgzj43z5p4cn7jy5jbyshyn78dwjqr7slsxs7"))))
2062 (build-system gnu-build-system)
2072 (modify-phases %standard-phases
2073 (delete 'configure) ; no configure script
2074 (delete 'check) ; no test suite
2075 (add-before 'build 'patch-exec-bin-sh
2077 (substitute* (list "Makefile"
2079 (("/bin/sh") (which "sh")))
2082 (lambda* (#:key outputs #:allow-other-keys)
2083 (let* ((out (assoc-ref outputs "out"))
2084 (bin (string-append out "/bin")))
2086 (copy-file "src/upx.out" (string-append bin "/upx")))
2088 (home-page "https://upx.github.io/")
2089 (synopsis "Compression tool for executables")
2091 "The Ultimate Packer for eXecutables (UPX) is an executable file
2092 compressor. UPX typically reduces the file size of programs and shared
2093 libraries by around 50%--70%, thus reducing disk space, network load times,
2094 download times, and other distribution and storage costs.")
2095 (license license:gpl2+)))
2097 (define-public quazip
2104 (url "https://github.com/stachenov/quazip")
2105 (commit (string-append "v" version))))
2106 (file-name (git-file-name name version))
2109 "11icgwv2xyxhd1hm1add51xv54zwkcqkg85d1xqlgiigvbm196iq"))))
2110 (build-system cmake-build-system)
2112 `(#:tests? #f)) ;no test
2114 `(("doxygen" ,doxygen)))
2116 `(("qtbase" ,qtbase)
2118 (home-page "https://stachenov.github.io/quazip/index.html")
2119 (synopsis "Qt/C++ wrapper for Minizip")
2120 (description "QuaZIP is a simple C++ wrapper over Gilles Vollant's
2121 ZIP/UNZIP package that can be used to access ZIP archives. It uses
2122 Trolltech's Qt toolkit.
2124 QuaZIP allows you to access files inside ZIP archives using QIODevice
2125 API, and that means that you can also use QTextStream, QDataStream or
2126 whatever you would like to use on your zipped files.
2128 QuaZIP provides complete abstraction of the ZIP/UNZIP API, for both
2129 reading from and writing to ZIP archives. ")
2130 ;; Project is distributed under LGPL, but "quazip/z*" "quazip/unzip.*" are
2131 ;; distributed under zlib terms.
2132 (license (list license:lgpl2.1+ license:zlib))))
2134 (define-public zutils
2141 (uri (string-append "mirror://savannah/zutils/zutils-" version ".tar.lz"))
2143 (base32 "15dimqp8zlqaaa2l46r22srp1py38mlmn69ph1j5fmrd54w43m0d"))))
2144 (build-system gnu-build-system)
2147 (list "--sysconfdir=/etc")
2149 (modify-phases %standard-phases
2150 (add-before 'check 'disable-failing-tests
2151 ;; XXX https://lists.nongnu.org/archive/html/zutils-bug/2020-07/msg00005.html
2153 (substitute* "testsuite/check.sh"
2154 (("\"\\$\\{ZGREP\\}\" -N -L \"GNU\"") "true")
2155 (("\"\\$\\{ZGREP\\}\" -N -L \"nx_pattern\"") "false"))
2158 (lambda* (#:key make-flags outputs #:allow-other-keys)
2159 (apply invoke "make" "install"
2160 (string-append "sysconfdir=" (assoc-ref outputs "out")
2164 ;; Needed to extract the source tarball and run the test suite.
2166 (home-page "https://www.nongnu.org/zutils/zutils.html")
2167 (synopsis "Utilities that transparently operate on compressed files")
2169 "Zutils is a collection of utilities able to process any combination of
2170 compressed and uncompressed files transparently. If any given file, including
2171 standard input, is compressed, its decompressed content is used instead.
2173 @command{zcat}, @command{zcmp}, @command{zdiff}, and @command{zgrep} are
2174 improved replacements for the shell scripts provided by GNU gzip.
2175 @command{ztest} tests the integrity of supported compressed files.
2176 @command{zupdate} recompresses files with lzip, similar to gzip's
2179 Supported compression formats are bzip2, gzip, lzip, and xz. Zutils uses
2180 external compressors: the compressor to be used for each format is configurable
2181 at run time, and must be installed separately.")
2182 (license (list license:bsd-2 ; arg_parser.{cc,h}
2183 license:gpl2+)))) ; the rest
2185 (define-public makeself-safeextract
2186 (let ((commit "1a95e121fa8e3c02d307ae37b9b7834e616c3683"))
2188 (name "makeself-safeextract")
2189 (version (git-version "0.0.0" "1" commit))
2190 (home-page "https://github.com/ssokolow/makeself_safeextract")
2197 (file-name (git-file-name name version))
2200 "1anlinaj9lvfi8bn00wp11vzqq0f9sig4fm9yrspisx31v0z4a2c"))))
2201 (build-system trivial-build-system)
2203 `(("python" ,python-2)
2207 `(#:modules ((guix build utils))
2210 (use-modules (guix build utils))
2211 (let* ((name "makeself_safeextract")
2212 (source (string-append (assoc-ref %build-inputs "source")
2214 (bin (string-append (assoc-ref %outputs "out") "/bin"))
2215 (target (string-append bin "/" name))
2216 (python (string-append (assoc-ref %build-inputs "python") "/bin"))
2217 (7z (string-append (assoc-ref %build-inputs "p7zip") "/bin/7z"))
2218 (unzip (string-append (assoc-ref %build-inputs "unzip") "/bin/unzip")))
2219 (setenv "PATH" (string-append (getenv "PATH") ":" python))
2221 (copy-file source target)
2223 (("'7z'") (format #f "'~a'" 7z))
2224 (("'unzip'") (format #f "'~a'" unzip)))
2225 (patch-shebang target)))))
2226 (synopsis "Extract makeself and mojo archives without running untrusted code")
2227 (description "This package provides a script to unpack self-extracting
2228 archives generated by @command{makeself} or @command{mojo} without running the
2229 possibly untrusted extraction shell script.")
2230 (license license:gpl3+))))
2232 (define-public ncompress
2239 (url "https://github.com/vapier/ncompress")
2240 (commit (string-append "v" version))))
2241 (patches (search-patches "ncompress-fix-softlinks.patch"))
2242 (file-name (string-append name "-" version ".tar.gz"))
2245 "1a4yir1ilafz0nzxdwigj204j4yy2zljbc501nsaqqm3dxdap8zn"))))
2247 '(#:make-flags (list "CC=gcc"
2248 (string-append "BINDIR=" %output "/bin")
2249 (string-append "MANDIR=" %output "/share/man/man1"))
2250 #:phases (modify-phases %standard-phases
2251 (delete 'configure))))
2252 (build-system gnu-build-system)
2253 (home-page "https://github.com/vapier/ncompress/")
2254 (synopsis "Original Lempel-Ziv compress/uncompress programs")
2255 (description "(N)compress provides the original compress and uncompress
2256 programs that used to be the de facto UNIX standard for compressing and
2257 uncompressing files. These programs implement a fast, simple Lempel-Ziv (LZW)
2258 file compression algorithm.")
2259 (license license:gpl2+)))
2261 (define-public xarchiver
2264 (version "0.5.4.17")
2269 (url "https://github.com/ib/xarchiver")
2271 (file-name (git-file-name name version))
2273 (base32 "00adrjpxqlaccrwjf65w3vhxfswdj0as8aj263c6f9b85llypc5v"))))
2274 (build-system glib-or-gtk-build-system)
2276 `(("gettext" ,gettext-minimal)
2277 ("intltool" ,intltool)
2278 ("libxslt" ,libxslt)
2279 ("pkg-config" ,pkg-config)))
2281 `(("adwaita-icon-theme" ,adwaita-icon-theme) ; hard-coded theme
2283 (home-page "https://github.com/ib/xarchiver")
2284 (synopsis "Graphical front-end for archive operations")
2285 (description "Xarchiver is a front-end to various command line archiving
2286 tools. It uses GTK+ tool-kit and is designed to be desktop-environment
2287 independent. Supported formats are 7z, ARJ, bzip2, gzip, LHA, lzma, lzop,
2288 RAR, RPM, DEB, tar, and ZIP. It cannot perform functions for archives, whose
2289 archiver is not installed.")
2290 (license license:gpl2+)))
2292 (define-public tarsplitter
2294 (name "tarsplitter")
2299 (url "https://github.com/AQUAOSOTech/tarsplitter")
2300 (commit (string-append "v" version))))
2301 (file-name (git-file-name name version))
2304 "17qkg95r97kcrs17b0mcqswx99280ni47j5yx8xa7nl3bdhm6325"))))
2305 (build-system go-build-system)
2307 `(#:import-path "github.com/AQUAOSOTech/tarsplitter"
2308 #:install-source? #f
2310 (modify-phases %standard-phases
2311 (add-after 'install 'install-documentation
2312 (lambda* (#:key import-path outputs #:allow-other-keys)
2313 (let* ((source (string-append "src/" import-path))
2314 (out (assoc-ref outputs "out"))
2315 (doc (string-append out "/share/doc/" ,name "-" ,version)))
2316 (with-directory-excursion source
2317 (install-file "README.md" doc))
2319 (home-page "https://github.com/AQUAOSOTech/tarsplitter")
2320 (synopsis "Multithreaded tar utility")
2322 "Archive huge numbers of files, or split massive tar archives into smaller
2324 (license license:expat)))
2326 (define-public c-blosc
2333 (url "https://github.com/Blosc/c-blosc")
2334 (commit (string-append "v" version))))
2335 (file-name (git-file-name name version))
2338 "1ywq8j70149859vvs19wgjq89d6xsvvmvm2n1dmkzpchxgrvnw70"))))
2339 (build-system cmake-build-system)
2340 (home-page "https://blosc.org")
2341 (synopsis "Blocking, shuffling and lossless compression library")
2343 "Blosc is a high performance compressor optimized for binary data. It has
2344 been designed to transmit data to the processor cache faster than the
2345 traditional, non-compressed, direct memory fetch approach via a
2346 @code{memcpy()} system call. Blosc is meant not only to reduce the size of
2347 large datasets on-disk or in-memory, but also to accelerate memory-bound
2349 ;; Blosc itself is released under BSD-3 but it incorporates code under
2350 ;; other non-copyleft licenses.
2351 (license license:bsd-3)))
2360 (url "https://github.com/alucryd/ecm-tools")
2361 (commit (string-append "v" version))))
2362 (file-name (git-file-name name version))
2365 "1rvyx5gcy8lfklgj80szlz3312x45wzx0d9jsgwyvy8f6m4nnb0c"))))
2366 (build-system gnu-build-system)
2368 `(#:tests? #f ; no check target
2370 (list (string-append "CC=" ,(cc-for-target))
2371 (string-append "DESTDIR=" (assoc-ref %outputs "out")))
2373 (modify-phases %standard-phases
2376 (substitute* "Makefile"
2377 (("\\$\\(DESTDIR\\)/usr") "$(DESTDIR)"))
2379 (home-page "https://github.com/alucryd/ecm-tools")
2380 (synopsis "Error code modeler")
2381 (description "ECM is a utility that converts ECM files, i.e., CD data files
2382 with their error correction data losslessly rearranged for better compression,
2383 to their original, binary CD format.")
2384 (license license:gpl3+)))
2386 (define-public tarlz
2393 (uri (string-append "mirror://savannah/lzip/tarlz/"
2394 "tarlz-" version ".tar.lz"))
2396 (base32 "09xal55973ivzpaja93jcc1pfla8gb3vrk8dx7pj9qvvz5aynf9n"))))
2397 (build-system gnu-build-system)
2401 `(("lzlib" ,lzlib)))
2402 (home-page "https://www.nongnu.org/lzip/tarlz.html")
2403 (synopsis "Combination of the tar archiver and the lzip compressor")
2405 "Tarlz is a massively parallel (multi-threaded) combined implementation of
2406 the tar archiver and the lzip compressor. Tarlz creates, lists, and extracts
2407 archives in a simplified and safer variant of the POSIX pax format compressed
2408 with lzip, keeping the alignment between tar members and lzip members. The
2409 resulting multimember tar.lz archive is fully backward compatible with standard
2410 tar tools like GNU tar, which treat it like any other tar.lz archive. Tarlz
2411 can append files to the end of such compressed archives.")
2412 (license license:gpl2+)))