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