1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
6 ;;; Copyright © 2015, 2016 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2015, 2016, 2017, 2018, 2020 Ricardo Wurmus <rekado@elephly.net>
8 ;;; Copyright © 2015, 2017, 2018 Leo Famulari <leo@famulari.name>
9 ;;; Copyright © 2015 Jeff Mickey <j@codemac.net>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
11 ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
12 ;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org>
13 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
14 ;;; Copyright © 2016 David Craven <david@craven.ch>
15 ;;; Copyright © 2016, 2019, 2020 Kei Kebreau <kkebreau@posteo.net>
16 ;;; Copyright © 2016, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
17 ;;; Copyright © 2017 Nikita <nikita@n0.is>
18 ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
19 ;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
20 ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
21 ;;; Copyright © 2017 Petter <petter@mykolab.ch>
22 ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
23 ;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
24 ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
25 ;;; Copyright © 2018, 2019 Pierre Neidhardt <mail@ambrevar.xyz>
26 ;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
27 ;;; Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
28 ;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
29 ;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>
30 ;;; Copyright © 2020 Lars-Dominik Braun <lars@6xq.net>
32 ;;; This file is part of GNU Guix.
34 ;;; GNU Guix is free software; you can redistribute it and/or modify it
35 ;;; under the terms of the GNU General Public License as published by
36 ;;; the Free Software Foundation; either version 3 of the License, or (at
37 ;;; your option) any later version.
39 ;;; GNU Guix is distributed in the hope that it will be useful, but
40 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
41 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
42 ;;; GNU General Public License for more details.
44 ;;; You should have received a copy of the GNU General Public License
45 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
47 (define-module (gnu packages compression)
48 #:use-module ((guix licenses) #:prefix license:)
49 #:use-module (guix utils)
50 #:use-module (guix packages)
51 #:use-module (guix download)
52 #:use-module (guix git-download)
53 #:use-module (guix build-system cmake)
54 #:use-module (guix build-system glib-or-gtk)
55 #:use-module (guix build-system gnu)
56 #:use-module (guix build-system go)
57 #:use-module (guix build-system python)
58 #:use-module (guix build-system trivial)
59 #:use-module (gnu packages)
60 #:use-module (gnu packages assembly)
61 #:use-module (gnu packages autotools)
62 #:use-module (gnu packages backup)
63 #:use-module (gnu packages base)
64 #:use-module (gnu packages boost)
65 #:use-module (gnu packages check)
66 #:use-module (gnu packages curl)
67 #:use-module (gnu packages documentation)
68 #:use-module (gnu packages file)
69 #:use-module (gnu packages gettext)
70 #:use-module (gnu packages glib)
71 #:use-module (gnu packages gnome)
72 #:use-module (gnu packages gtk)
73 #:use-module (gnu packages maths)
74 #:use-module (gnu packages perl)
75 #:use-module (gnu packages pkg-config)
76 #:use-module (gnu packages python)
77 #:use-module (gnu packages qt)
78 #:use-module (gnu packages tls)
79 #:use-module (gnu packages valgrind)
80 #:use-module (gnu packages xml)
81 #:use-module (ice-9 match)
82 #:use-module ((srfi srfi-1) #:select (last)))
91 (uri (list (string-append "http://zlib.net/zlib-"
93 (string-append "mirror://sourceforge/libpng/zlib/"
94 version "/zlib-" version ".tar.gz")))
97 "18dighcs333gsvajvvgqp8l4cx7h1x7yx9gd5xacnk80spyykrf3"))))
98 (build-system gnu-build-system)
99 (outputs '("out" "static"))
102 (modify-phases %standard-phases
104 (lambda* (#:key outputs #:allow-other-keys)
105 ;; Zlib's home-made `configure' fails when passed
106 ;; extra flags like `--enable-fast-install', so we need to
107 ;; invoke it with just what it understand.
108 (let ((out (assoc-ref outputs "out")))
109 ;; 'configure' doesn't understand '--host'.
110 ,@(if (%current-target-system)
111 `((setenv "CHOST" ,(%current-target-system)))
113 (invoke "./configure"
114 (string-append "--prefix=" out)))))
115 (add-after 'install 'move-static-library
116 (lambda* (#:key outputs #:allow-other-keys)
117 (let ((out (assoc-ref outputs "out"))
118 (static (assoc-ref outputs "static")))
119 (with-directory-excursion (string-append out "/lib")
120 (install-file "libz.a" (string-append static "/lib"))
121 (delete-file "libz.a")
123 (home-page "https://zlib.net/")
124 (synopsis "Compression library")
126 "zlib is designed to be a free, general-purpose, legally unencumbered --
127 that is, not covered by any patents -- lossless data-compression library for
128 use on virtually any computer hardware and operating system. The zlib data
129 format is itself portable across platforms. Unlike the LZW compression method
130 used in Unix compress(1) and in the GIF image format, the compression method
131 currently used in zlib essentially never expands the data. (LZW can double or
132 triple the file size in extreme cases.) zlib's memory footprint is also
133 independent of the input data and can be reduced, if necessary, at some cost
135 (license license:zlib)))
137 (define-public minizip
140 (version (package-version zlib))
141 (source (package-source zlib))
142 (build-system gnu-build-system)
145 (modify-phases %standard-phases
146 (add-after 'unpack 'enter-source
147 (lambda _ (chdir "contrib/minizip") #t))
148 (add-after 'install 'remove-crypt-h
149 (lambda* (#:key outputs #:allow-other-keys)
150 ;; Remove <minizip/crypt.h> because it interferes with libc's
151 ;; <crypt.h> given that 'minizip.pc' says "-I…/include/minizip".
152 ;; Fedora does the same:
153 ;; <https://src.fedoraproject.org/rpms/zlib/c/4d2785ec3116947872f6f32dc4104e6d36d8a7a4?branch=master>.
154 (let ((out (assoc-ref outputs "out")))
155 (delete-file (string-append out "/include/minizip/crypt.h"))
158 `(("autoconf" ,autoconf)
159 ("automake" ,automake)
160 ("libtool" ,libtool)))
161 (propagated-inputs `(("zlib" ,zlib)))
162 (home-page (package-home-page zlib))
163 (synopsis "Zip Compression library")
165 "Minizip is a minimalistic library that supports compressing,
166 extracting and viewing ZIP archives. This version is extracted from
167 the @code{zlib} source.")
168 (license (package-license zlib))))
170 (define-public fastjar
176 (uri (string-append "mirror://savannah/fastjar/fastjar-"
180 "0iginbz2m15hcsa3x4y7v3mhk54gr1r7m3ghx0pg4n46vv2snmpi"))))
181 (build-system gnu-build-system)
182 (inputs `(("zlib" ,zlib)))
183 (home-page "https://savannah.nongnu.org/projects/fastjar")
184 (synopsis "Replacement for Sun's 'jar' utility")
186 "FastJar is an attempt to create a much faster replacement for Sun's
187 @code{jar} utility. Instead of being written in Java, FastJar is written in C.")
188 (license license:gpl2+)))
190 (define-public libtar
198 "ftp://ftp.feep.net/pub/software/libtar/libtar-"
201 "mirror://debian/pool/main/libt/libtar/libtar_"
202 version ".orig.tar.gz")))
205 "02cihzl77ia0dcz7z2cga2412vyhhs5pa2355q4wpwbyga2lrwjh"))
206 (patches (search-patches "libtar-CVE-2013-4420.patch"))))
207 (build-system gnu-build-system)
208 (arguments `(#:tests? #f)) ; no "check" target
210 `(("autoconf" ,autoconf)
211 ("automake" ,automake)
212 ("libtool" ,libtool)))
215 (synopsis "C library for manipulating POSIX tar files")
217 "libtar is a C library for manipulating POSIX tar files. It handles
218 adding and extracting files to/from a tar archive.")
219 (home-page "https://repo.or.cz/libtar.git")
220 (license license:bsd-3)))
228 (uri (string-append "mirror://gnu/gzip/gzip-"
232 "1h6p374d3j8d4cdfydzls021xa2yby8myc0h8d6m8bc7k6ncq9c4"))))
233 (build-system gnu-build-system)
234 (synopsis "General file (de)compression (using lzw)")
236 ;; FIXME: The test suite wants `less', and optionally Perl.
239 (modify-phases %standard-phases
240 (add-after 'unpack 'patch-for-glibc-2.28
242 ;; Adjust the bundled gnulib to work with glibc 2.28. See e.g.
243 ;; "m4-gnulib-libio.patch". This is a phase rather than patch
244 ;; or snippet to work around <https://bugs.gnu.org/32347>.
245 (substitute* (find-files "lib" "\\.c$")
246 (("#if defined _IO_ftrylockfile")
247 "#if defined _IO_EOF_SEEN"))
248 (substitute* "lib/stdio-impl.h"
249 (("^/\\* BSD stdio derived implementations")
250 (string-append "#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN\n"
251 "# define _IO_IN_BACKUP 0x100\n"
253 "/* BSD stdio derived implementations")))
255 (add-after 'unpack 'use-absolute-name-of-gzip
256 (lambda* (#:key outputs #:allow-other-keys)
257 (substitute* "gunzip.in"
259 (string-append "exec " (assoc-ref outputs "out")
263 "GNU Gzip provides data compression and decompression utilities; the
264 typical extension is \".gz\". Unlike the \"zip\" format, it compresses a single
265 file; as a result, it is often used in conjunction with \"tar\", resulting in
266 \".tar.gz\" or \".tgz\", etc.")
267 (license license:gpl3+)
268 (home-page "https://www.gnu.org/software/gzip/")))
276 (uri (string-append "https://sourceware.org/pub/bzip2/bzip2-"
280 "0s92986cv0p692icqlw1j42y9nld8zd83qwhzbqd61p1dqbh6nmb"))))
281 (build-system gnu-build-system)
283 `(#:modules ((guix build gnu-build-system)
288 (modify-phases %standard-phases
289 (add-after 'set-paths 'hide-input-bzip2
290 (lambda* (#:key inputs #:allow-other-keys)
291 (let ((bzip2 (assoc-ref inputs "bzip2")))
293 ;; Prevent the build system from retaining a reference to
294 ;; BZIP2 from INPUTS.
296 (setenv "LIBRARY_PATH"
297 (string-join (delete (string-append bzip2 "/lib")
298 (string-split (getenv "LIBRARY_PATH")
301 (format #t "environment variable `LIBRARY_PATH' set to `~a'~%"
302 (getenv "LIBRARY_PATH")))
303 (format #t "no bzip2 found, nothing done~%"))
306 (lambda* (#:key target #:allow-other-keys)
307 (when ,(%current-target-system)
308 ;; Cross-compilation: use the cross tools.
309 (substitute* (find-files "." "Makefile")
311 (string-append "CC = " target "-gcc\n"))
313 (string-append "AR = " target "-ar\n"))
315 (string-append "RANLIB = " target "-ranlib\n"))
316 (("^all:(.*)test" _ prerequisites)
317 ;; Remove 'all' -> 'test' dependency.
318 (string-append "all:" prerequisites "\n"))))
320 (add-before 'build 'build-shared-lib
321 (lambda* (#:key inputs #:allow-other-keys)
322 (patch-makefile-SHELL "Makefile-libbz2_so")
323 (invoke "make" "-f" "Makefile-libbz2_so")))
324 (add-after 'install 'install-shared-lib
325 (lambda* (#:key outputs #:allow-other-keys)
326 ;; The Makefile above does not have an 'install' target, nor does
327 ;; it create all the (un)versioned symlinks, so we handle it here.
328 (let* ((out (assoc-ref outputs "out"))
329 (libdir (string-append out "/lib"))
331 ;; Locate the built library (e.g. "libbz2.so.1.0.6").
332 (lib (car (scandir "."
334 (and (string-prefix? soname file)
336 (stat:type (lstat file))))))))
337 (soversion (string-drop lib (+ 1 (string-length soname)))))
338 (install-file lib libdir)
339 (with-directory-excursion libdir
340 ;; Create symlinks libbz2.so.1 -> libbz2.so.1.0, etc.
341 (let loop ((base soname)
342 (numbers (string-split soversion #\.)))
343 (unless (null? numbers)
344 (let ((so-file (string-append base "." (car numbers))))
345 (symlink so-file base)
346 (loop so-file (cdr numbers))))))
348 (add-after 'install-shared-lib 'move-static-lib
349 (lambda* (#:key outputs #:allow-other-keys)
350 (let ((out (assoc-ref outputs "out"))
351 (static (assoc-ref outputs "static")))
352 (with-directory-excursion (string-append out "/lib")
353 (install-file "libbz2.a" (string-append static "/lib"))
354 (delete-file "libbz2.a")
356 (add-after 'install-shared-lib 'patch-scripts
357 (lambda* (#:key outputs inputs #:allow-other-keys)
358 (let* ((out (assoc-ref outputs "out")))
359 (substitute* (string-append out "/bin/bzdiff")
363 #:make-flags (list (string-append "PREFIX="
364 (assoc-ref %outputs "out")))
366 ;; Don't attempt to run the tests when cross-compiling.
367 ,@(if (%current-target-system)
370 (outputs '("out" "static"))
371 (synopsis "High-quality data compression program")
373 "bzip2 is a freely available, patent free (see below), high-quality data
374 compressor. It typically compresses files to within 10% to 15% of the best
375 available techniques (the PPM family of statistical compressors), whilst
376 being around twice as fast at compression and six times faster at
378 (license (license:non-copyleft "file://LICENSE"
379 "See LICENSE in the distribution."))
380 (home-page "https://web.archive.org/web/20180801004107/http://www.bzip.org/")))
382 (define-public lbzip2
383 ;; The last 2.5 release is 4 years behind the newest commit (from 2018) and
384 ;; may create files that can't even be decompressed by newer bzip2 versions.
385 (let ((commit "b6dc48a7b9bfe6b340ed1f6d72133608ad57144b")
389 (version (git-version "2.5" revision commit))
394 (url "https://github.com/kjn/lbzip2")
397 (base32 "140xp00dmjsr6c3dwb4dwf0pzlgf159igri321inbinsjiclkngy"))
398 (file-name (git-file-name name version))))
399 (build-system gnu-build-system)
402 (modify-phases %standard-phases
403 (add-after 'unpack 'unpack-gnulib
404 (lambda* (#:key inputs #:allow-other-keys)
405 (let ((gnulib (assoc-ref inputs "gnulib")))
406 (copy-recursively gnulib "lib")
407 (setenv "PATH" (string-append "lib:" (getenv "PATH")))
409 (delete 'bootstrap) ; gnulib still has unpatched shebangs
410 (add-after 'patch-source-shebangs 'bootstrap
412 (invoke "sh" "build-aux/autogen.sh")
415 `(("autoconf" ,autoconf)
416 ("automake" ,automake)
418 ,(let ((commit "2d431ac35c4943a3655c07ba91870d2323321b43"))
422 (url "git://git.savannah.gnu.org/gnulib.git")
425 (base32 "1f0xr4w89bqvhzsfcflcagdixidrk41k00k7kpr91w9lazfis4kf"))
426 (file-name (git-file-name "gnulib" commit)))))
428 (synopsis "Parallel bzip2 compression utility")
430 "lbzip2 is a multi-threaded compression utility with support for the
431 bzip2 compressed file format. lbzip2 can process standard bz2 files in
432 parallel. It uses POSIX threading model (pthreads), which allows it to take
433 full advantage of symmetric multiprocessing (SMP) systems. It has been proven
434 to scale linearly, even to over one hundred processor cores. lbzip2 is fully
435 compatible with bzip2 – both at file format and command line level.")
436 ;; lbzip2.org now looks fishy. There is no source code to be found.
437 ;; Reported upstream: <https://github.com/kjn/lbzip2/issues/26>.
438 (home-page "https://github.com/kjn/lbzip2")
439 (license license:gpl3+))))
441 (define-public pbzip2
447 (uri (string-append "https://launchpad.net/pbzip2/"
448 (version-major+minor version) "/" version
449 "/+download/" name "-" version ".tar.gz"))
452 "1rnvgcdixjzbrmcr1nv9b6ccrjfrhryaj7jwz28yxxv6lam3xlcg"))))
453 (build-system gnu-build-system)
457 `(#:tests? #f ; no tests
458 #:phases (modify-phases %standard-phases
459 (delete 'configure)) ; no configure script
460 #:make-flags (list (string-append "PREFIX=" %output))))
461 (home-page (string-append "https://web.archive.org/web/20180412020219/"
462 "http://compression.ca/pbzip2/"))
463 (synopsis "Parallel bzip2 implementation")
465 "Pbzip2 is a parallel implementation of the bzip2 block-sorting file
466 compressor that uses pthreads and achieves near-linear speedup on SMP machines.
467 The output of this version is fully compatible with bzip2 v1.0.2 (i.e. anything
468 compressed with pbzip2 can be decompressed with bzip2).")
469 (license (license:non-copyleft "file://COPYING"
470 "See COPYING in the distribution."))))
478 (uri (list (string-append "http://tukaani.org/xz/xz-" version
480 (string-append "http://multiprecision.org/guix/xz-"
484 "0ibi2zsfaz6l756spjwc5rayf4ckgc9hwmy8qinppcyk4svz64mm"))))
485 (build-system gnu-build-system)
488 (modify-phases %standard-phases
489 (add-after 'install 'move-static-lib
490 (lambda* (#:key outputs #:allow-other-keys)
491 (let ((out (assoc-ref outputs "out"))
492 (static (assoc-ref outputs "static")))
493 (mkdir-p (string-append static "/lib"))
494 (rename-file (string-append out "/lib/liblzma.a")
495 (string-append static "/lib/liblzma.a"))
496 ;; Remove reference to the static library from the .la file
497 ;; so Libtool does the right thing when both the shared and
498 ;; static library is available.
499 (substitute* (string-append out "/lib/liblzma.la")
500 (("^old_library='liblzma.a'") "old_library=''"))
502 (outputs '("out" "static"))
503 (synopsis "General-purpose data compression")
505 "XZ Utils is free general-purpose data compression software with high
506 compression ratio. XZ Utils were written for POSIX-like systems, but also
507 work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils.
509 The core of the XZ Utils compression code is based on LZMA SDK, but it has
510 been modified quite a lot to be suitable for XZ Utils. The primary
511 compression algorithm is currently LZMA2, which is used inside the .xz
512 container format. With typical files, XZ Utils create 30 % smaller output
513 than gzip and 15 % smaller output than bzip2.")
514 (license (list license:gpl2+ license:lgpl2.1+)) ; bits of both
515 (home-page "https://tukaani.org/xz/")))
524 "https://github.com/fragglet/lhasa/releases/download/v"
525 version "/lhasa-" version ".tar.gz"))
528 "092zi9av18ma20c6h9448k0bapvx2plnp292741dvfd9hmgqxc1z"))))
529 (build-system gnu-build-system)
532 (modify-phases %standard-phases
533 (add-before 'check 'set-up-test-environment
534 (lambda* (#:key inputs #:allow-other-keys)
535 (setenv "TZDIR" (string-append (assoc-ref inputs "tzdata")
539 `(("tzdata" ,tzdata-for-tests)))
540 (home-page "https://fragglet.github.com/lhasa/")
541 (synopsis "LHA archive decompressor")
542 (description "Lhasa is a replacement for the Unix LHA tool, for
543 decompressing .lzh (LHA / LHarc) and .lzs (LArc) archives. The backend for the
544 tool is a library, so that it can be reused for other purposes. Lhasa aims to
545 be compatible with as many types of lzh/lzs archives as possible. It also aims
546 to generate the same output as the (non-free) Unix LHA tool, so that it will
547 act as a free drop-in replacement.")
548 (license license:isc)))
557 (uri (string-append "http://www.oberhumer.com/opensource/lzo/download/lzo-"
561 "0wm04519pd3g8hqpjqhfr72q8qmbiwqaxcs3cndny9h86aa95y60"))))
562 (build-system gnu-build-system)
563 (arguments '(#:configure-flags '("--enable-shared")))
564 (home-page "http://www.oberhumer.com/opensource/lzo")
566 "Data compression library suitable for real-time data de-/compression")
568 "LZO is a data compression library which is suitable for data
569 de-/compression in real-time. This means it favours speed over
572 LZO is written in ANSI C. Both the source code and the compressed data
573 format are designed to be portable across platforms.")
574 (license license:gpl2+)))
583 (uri (string-append "http://www.lzop.org/download/lzop-"
587 "0h9gb8q7y54m9mvy3jvsmxf21yx8fc3ylzh418hgbbv0i8mbcwky"))))
588 (build-system gnu-build-system)
589 (inputs `(("lzo" ,lzo)))
590 (home-page "https://www.lzop.org/")
591 (synopsis "Compress or expand files")
593 "Lzop is a file compressor which is very similar to gzip. Lzop uses the
594 LZO data compression library for compression services, and its main advantages
595 over gzip are much higher compression and decompression speed (at the cost of
596 some compression ratio).")
597 (license license:gpl2+)))
605 (uri (string-append "mirror://savannah/lzip/lzip-"
609 "12qdcw5k1cx77brv9yxi1h4dzwibhfmdpigrj43nfk8nscwm12z4"))))
610 (build-system gnu-build-system)
611 (home-page "https://www.nongnu.org/lzip/lzip.html")
612 (synopsis "Lossless data compressor based on the LZMA algorithm")
614 "Lzip is a lossless data compressor with a user interface similar to the
615 one of gzip or bzip2. Lzip decompresses almost as fast as gzip and compresses
616 more than bzip2, which makes it well-suited for software distribution and data
617 archiving. Lzip is a clean implementation of the LZMA algorithm.")
618 (license license:gpl3+)))
620 (define-public lziprecover
626 (uri (string-append "mirror://savannah/lzip/lziprecover/"
627 "lziprecover-" version ".tar.gz"))
630 "094w2z8fz41yaq0gkyr61cl7pb1d7kchpl5dka7rvm3qvbb7ncd2"))))
631 (build-system gnu-build-system)
632 (home-page "https://www.nongnu.org/lzip/lziprecover.html")
633 (synopsis "Recover and decompress data from damaged lzip files")
635 "Lziprecover is a data recovery tool and decompressor for files in the lzip
636 compressed data format (.lz). It can test the integrity of lzip files, extract
637 data from damaged ones, and repair most files with small errors (up to one
638 single-byte error per member) entirely.
640 Lziprecover is not a replacement for regular backups, but a last line of defence
641 when even the backups are corrupt. It can recover files by merging the good
642 parts of two or more damaged copies, such as can be easily produced by running
643 @command{ddrescue} on a failing device.
645 This package also includes @command{unzcrash}, a tool to test the robustness of
646 decompressors when faced with corrupted input.")
647 (license (list license:bsd-2 ; arg_parser.{cc,h}
648 license:gpl2+)))) ; everything else
650 (define-public sharutils
657 (uri (string-append "mirror://gnu/sharutils/sharutils-"
659 (patches (search-patches "sharutils-CVE-2018-1000097.patch"))
662 "16isapn8f39lnffc3dp4dan05b7x6mnc76v6q5nn8ysxvvvwy19b"))
663 (modules '((guix build utils)))
666 (substitute* (find-files "lib" "\\.c$")
667 (("#if defined _IO_ftrylockfile")
668 "#if defined _IO_EOF_SEEN"))
669 (substitute* "lib/stdio-impl.h"
670 (("^/\\* BSD stdio derived implementations")
671 (string-append "#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN\n"
672 "# define _IO_IN_BACKUP 0x100\n"
674 "/* BSD stdio derived implementations")))
676 (build-system gnu-build-system)
681 (modify-phases %standard-phases
682 (add-after 'patch-source-shebangs 'unpatch-source-shebang
683 ;; revert the patch-shebang phase on a script which is
686 (substitute* "tests/shar-1.ok"
687 (((which "sh")) "/bin/sh"))
689 (home-page "https://www.gnu.org/software/sharutils/")
690 (synopsis "Archives in shell scripts, uuencode/uudecode")
692 "GNU sharutils is a package for creating and manipulating shell
693 archives that can be readily emailed. A shell archive is a file that can be
694 processed by a Bourne-type shell to unpack the original collection of files.
695 This package is mostly for compatibility and historical interest.")
696 (license license:gpl3+)))
698 (define-public sfarklib
705 (url "https://github.com/raboof/sfArkLib")
707 (file-name (git-file-name name version))
710 "0jrxy24gak7q5ml06p5jjgzk9i5r2mkfjk4ycirkp4kg7k5a237w"))))
711 (build-system gnu-build-system)
713 `(#:tests? #f ;no "check" target
715 (modify-phases %standard-phases
717 (lambda* (#:key outputs #:allow-other-keys)
718 (substitute* "Makefile"
719 (("/usr/local") (assoc-ref outputs "out")))
723 (home-page "https://github.com/raboof/sfArkLib")
724 (synopsis "Library for SoundFont decompression")
726 "SfArkLib is a C++ library for decompressing SoundFont files compressed
727 with the sfArk algorithm.")
728 (license license:gpl3+)))
730 (define-public sfarkxtc
731 (let ((commit "13cd6f93725a90d91ec5ea75babf1dbd694ac463")
735 (version (git-version "0" revision commit))
737 ;; There are no release tarballs, so we just fetch the latest
738 ;; commit at this time.
741 (url "https://github.com/raboof/sfarkxtc")
743 (file-name (git-file-name name version))
746 "1mb1jyk1m11l1gppd9hmql9cyp55sdf7jk5rbc7acky1z4k4mv19"))))
747 (build-system gnu-build-system)
749 `(#:tests? #f ;no "check" target
751 (modify-phases %standard-phases
753 (lambda* (#:key outputs #:allow-other-keys)
754 (substitute* "Makefile"
755 (("/usr/local") (assoc-ref outputs "out")))
759 ("sfarklib" ,sfarklib)))
760 (home-page "https://github.com/raboof/sfarkxtc")
761 (synopsis "Basic sfArk decompressor")
762 (description "SfArk extractor converts SoundFonts in the compressed legacy
763 sfArk file format to the uncompressed sf2 format.")
764 (license license:gpl3+))))
766 (define-public libmspack
769 (home-page "https://cabextract.org.uk/libmspack/")
774 (uri (string-append home-page name "-" version "alpha.tar.gz"))
776 (base32 "13janaqsvm7aqc4agjgd4819pbgqv50j88bh5kci1z70wvg65j5s"))))
777 (build-system gnu-build-system)
779 `(#:configure-flags '("--disable-static")))
780 (synopsis "Compression tools for some formats used by Microsoft")
782 "The purpose of libmspack is to provide both compression and
783 decompression of some loosely related file formats used by Microsoft.")
784 (license license:lgpl2.1+)))
793 (uri (git-reference (url "https://github.com/lz4/lz4")
794 (commit (string-append "v" version))))
797 "0lpaypmk70ag2ks3kf2dl4ac3ba40n5kc1ainkp9wfjawz76mh61"))
798 (file-name (git-file-name name version))))
799 (build-system gnu-build-system)
803 ("valgrind" ,valgrind)))
805 `(#:test-target "test"
806 #:make-flags (list "CC=gcc"
807 (string-append "prefix=" (assoc-ref %outputs "out")))
808 #:phases (modify-phases %standard-phases
809 (delete 'configure) ;no configure script
810 (add-before 'check 'disable-broken-test
812 ;; XXX: test_install.sh fails when prefix is a subdirectory.
813 (substitute* "tests/Makefile"
814 (("^test: (.*) test-install" _ targets)
815 (string-append "test: " targets)))
817 (add-after 'install 'delete-static-library
818 (lambda* (#:key outputs #:allow-other-keys)
819 (let ((out (assoc-ref outputs "out")))
820 (delete-file (string-append out "/lib/liblz4.a"))
822 (home-page "https://www.lz4.org")
823 (synopsis "Compression algorithm focused on speed")
824 (description "LZ4 is a lossless compression algorithm, providing
825 compression speed at 400 MB/s per core (0.16 Bytes/cycle). It also features an
826 extremely fast decoder, with speed in multiple GB/s per core (0.71 Bytes/cycle).
827 A high compression derivative, called LZ4_HC, is also provided. It trades CPU
828 time for compression ratio.")
829 ;; The libraries (lz4, lz4hc, and xxhash) are BSD licenced. The command
830 ;; line interface programs (lz4, fullbench, fuzzer, datagen) are GPL2+.
831 (license (list license:bsd-2 license:gpl2+))))
833 (define-public squashfs-tools
835 (name "squashfs-tools")
839 (uri (string-append "mirror://sourceforge/squashfs/squashfs/"
840 "squashfs" version "/"
841 "squashfs" version ".tar.gz"))
844 "0zmhvczscqz0mzh4b9m8m42asq14db0a6lc8clp5ljq5ybrv70d9"))))
845 (build-system gnu-build-system)
847 '(#:tests? #f ; no check target
853 (string-append "INSTALL_DIR=" %output "/bin"))
855 (modify-phases %standard-phases
858 (chdir "squashfs-tools")
865 (home-page "https://github.com/plougher/squashfs-tools")
866 (synopsis "Tools to create and extract squashfs file systems")
868 "Squashfs is a highly compressed read-only file system for Linux. It uses
869 zlib to compress files, inodes, and directories. All blocks are packed to
870 minimize the data overhead, and block sizes of between 4K and 1M are supported.
871 It is intended to be used for archival use, for live CDs, and for embedded
872 systems where low overhead is needed. This package allows you to create and
873 extract such file systems.")
874 (license license:gpl2+)))
882 (uri (string-append "http://zlib.net/pigz/"
883 name "-" version ".tar.gz"))
886 "0wsgw5vwl23jrnpsvd8v3xcp5k4waw5mk0164fynjhkv58i1dy54"))))
887 (build-system gnu-build-system)
890 (modify-phases %standard-phases
893 (lambda* (#:key outputs #:allow-other-keys)
894 (let* ((out (assoc-ref outputs "out"))
895 (bin (string-append out "/bin"))
896 (man (string-append out "/share/man/man1")))
897 (install-file "pigz" bin)
898 (symlink "pigz" (string-append bin "/unpigz"))
899 (install-file "pigz.1" man)
902 (list ,(string-append "CC=" (cc-for-target)))
903 #:test-target "tests"))
904 (inputs `(("zlib" ,zlib)))
905 (home-page "https://zlib.net/pigz/")
906 (synopsis "Parallel implementation of gzip")
908 "This package provides a parallel implementation of gzip that exploits
909 multiple processors and multiple cores when compressing data.")
911 ;; Things under zopfli/ are under ASL2.0, but 4 files at the top-level,
912 ;; written by Mark Adler, are under another non-copyleft license.
913 (license license:asl2.0)))
922 "https://github.com/vasi/pixz/releases/download/v" version
923 "/pixz-" version ".tar.xz"))
926 "1ifxr18f2h75gkcrkx8033kwmwmrcgxshpaawyc2n4dzn1p2rqz5"))))
927 (build-system gnu-build-system)
929 `(("pkg-config" ,pkg-config)
930 ("libarchive" ,libarchive)))
931 (home-page "https://github.com/vasi/pixz")
932 (synopsis "Parallel indexing implementation of LZMA")
934 "The existing XZ Utils provide great compression in the .xz file format,
935 but they produce just one big block of compressed data. Pixz instead produces
936 a collection of smaller blocks which makes random access to the original data
937 possible and can compress in parallel. This is especially useful for large
939 (license license:bsd-2)))
941 (define-public bsdiff
945 (home-page "https://www.daemonology.net/bsdiff/")
948 (uri (string-append home-page name "-" version ".tar.gz"))
951 "0j2zm3z271x5aw63mwhr3vymzn45p2vvrlrpm9cz2nywna41b0hq"))))
952 (build-system gnu-build-system)
954 `(#:make-flags (list "INSTALL=install" "CC=gcc"
955 (string-append "PREFIX=" (assoc-ref %outputs "out")))
956 #:phases (modify-phases %standard-phases
958 (add-before 'build 'fix-Makefile
960 (substitute* "Makefile"
961 ;; Adjust syntax to make it compatible with GNU Make.
963 ;; Help install(1) create the target directory.
964 (("\\$\\{PREFIX\\}") "-D -t ${PREFIX}"))
966 #:tests? #f)) ;no tests
969 (synopsis "Patch binary files")
971 "@command{bsdiff} and @command{bspatch} are tools for building and
972 applying patches to binary files. By using suffix sorting (specifically
973 Larsson and Sadakane's @code{qsufsort}) and taking advantage of how
974 executable files change, bsdiff routinely produces binary patches 50-80%
975 smaller than those produced by @code{Xdelta}.")
976 (license license:bsd-2)))
978 (define-public cabextract
981 (home-page "https://cabextract.org.uk/")
985 (uri (string-append home-page "cabextract-" version ".tar.gz"))
988 "19qwhl2r8ip95q4vxzxg2kp4p125hjmc9762sns1dwwf7ikm7hmg"))
989 (modules '((guix build utils)))
992 ;; Delete bundled libmspack.
993 (delete-file-recursively "mspack")
995 (build-system gnu-build-system)
997 '(#:configure-flags '("--with-external-libmspack")
999 (modify-phases %standard-phases
1000 ;; cabextract needs some of libmspack's header files.
1001 ;; These are located in the "mspack" directory of libmspack.
1002 (add-before 'build 'unpack-libmspack
1003 (lambda* (#:key inputs #:allow-other-keys)
1004 (let ((dir-name "libmspack-src"))
1006 (invoke "tar" "-xvf" (assoc-ref inputs "libmspack-source")
1007 "-C" dir-name "--strip-components" "1")
1008 (rename-file (string-append dir-name "/mspack")
1010 (delete-file-recursively dir-name)
1013 `(("pkg-config" ,pkg-config)))
1015 `(("libmspack" ,libmspack)
1016 ("libmspack-source" ,(package-source libmspack))))
1017 (synopsis "Tool to unpack Cabinet archives")
1018 (description "Extracts files out of Microsoft Cabinet (.cab) archives")
1019 ;; Some source files specify gpl2+, lgpl2+, however COPYING is gpl3.
1020 (license license:gpl3+)))
1022 (define-public xdelta
1030 (url "https://github.com/jmacd/xdelta")
1031 (commit (string-append "v" version))))
1032 (file-name (git-file-name name version))
1035 "09mmsalc7dwlvgrda56s2k927rpl3a5dzfa88aslkqcjnr790wjy"))
1037 ;; This file isn't freely distributable and has no effect on building.
1039 (delete-file "xdelta3/draft-korn-vcdiff.txt")
1041 (build-system gnu-build-system)
1043 `(("autoconf" ,autoconf)
1044 ("automake" ,automake)))
1047 (modify-phases %standard-phases
1048 (add-after 'unpack 'enter-build-directory
1049 (lambda _ (chdir "xdelta3") #t)))))
1050 (home-page "http://xdelta.org")
1051 (synopsis "Delta encoder for binary files")
1052 (description "xdelta encodes only the differences between two binary files
1053 using the VCDIFF algorithm and patch file format described in RFC 3284. It can
1054 also be used to apply such patches. xdelta is similar to @command{diff} and
1055 @command{patch}, but is not limited to plain text and does not generate
1056 human-readable output.")
1057 (license license:asl2.0)))
1059 (define-public lrzip
1067 "http://ck.kolivas.org/apps/lrzip/lrzip-" version ".tar.bz2"))
1070 "0mb449vmmwpkalq732jdyginvql57nxyd31sszb108yps1lf448d"))
1071 (patches (search-patches "lrzip-CVE-2017-8842.patch"))))
1072 (build-system gnu-build-system)
1074 `(;; nasm is only required when building for 32-bit x86 platforms
1075 ,@(if (string-prefix? "i686" (or (%current-target-system)
1084 (home-page "http://ck.kolivas.org/apps/lrzip/")
1085 (synopsis "Large file compressor with a very high compression ratio")
1086 (description "lrzip is a compression utility that uses long-range
1087 redundancy reduction to improve the subsequent compression ratio of
1088 larger files. It can then further compress the result with the ZPAQ or
1089 LZMA algorithms for maximum compression, or LZO for maximum speed. This
1090 choice between size or speed allows for either better compression than
1091 even LZMA can provide, or a higher speed than gzip while compressing as
1093 (license (list license:gpl3+
1094 license:public-domain)))) ; most files in lzma/
1096 (define-public snappy
1104 (url "https://github.com/google/snappy")
1106 (file-name (git-file-name name version))
1108 (base32 "1j0kslq2dvxgkcxl1gakhvsa731yrcvcaipcp5k8k7ayicvkv9jv"))
1109 (patches (search-patches "snappy-add-O2-flag-in-CmakeLists.txt.patch"))))
1110 (build-system cmake-build-system)
1112 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")))
1113 (home-page "https://github.com/google/snappy")
1114 (synopsis "Fast compressor/decompressor")
1115 (description "Snappy is a compression/decompression library. It does not
1116 aim for maximum compression, or compatibility with any other compression library;
1117 instead, it aims for very high speeds and reasonable compression. For instance,
1118 compared to the fastest mode of zlib, Snappy is an order of magnitude faster
1119 for most inputs, but the resulting compressed files are anywhere from 20% to
1121 (license license:asl2.0)))
1123 (define-public p7zip
1129 (uri (string-append "mirror://sourceforge/" name "/" name "/"
1130 version "/" name "_" version
1131 "_src_all.tar.bz2"))
1134 "07rlwbbgszq8i7m8jh3x6j2w2hc9a72dc7fmqawnqkwlwb00mcjy"))
1135 (modules '((guix build utils)))
1138 ;; Remove non-free source files
1139 (for-each delete-file
1141 (find-files "CPP/7zip/Compress" "Rar.*")
1142 (find-files "CPP/7zip/Crypto" "Rar.*")
1143 (find-files "DOC/unRarLicense.txt")
1144 (find-files "Utils/file_Codecs_Rar_so.py")))
1145 (delete-file-recursively "CPP/7zip/Archive/Rar")
1146 (delete-file-recursively "CPP/7zip/Compress/Rar")
1148 (patches (search-patches "p7zip-CVE-2016-9296.patch"
1149 "p7zip-CVE-2017-17969.patch"
1150 "p7zip-remove-unused-code.patch"))))
1151 (build-system gnu-build-system)
1154 (list (string-append "DEST_HOME=" (assoc-ref %outputs "out")) "all3")
1156 (modify-phases %standard-phases
1158 (lambda* (#:key system outputs #:allow-other-keys)
1160 (let ((system ,(or (%current-target-system)
1161 (%current-system))))
1163 ((string-prefix? "x86_64" system)
1164 "makefile.linux_amd64_asm")
1165 ((string-prefix? "i686" system)
1166 "makefile.linux_x86_asm_gcc_4.X")
1168 "makefile.linux_any_cpu_gcc_4.X")))
1169 "makefile.machine")))
1172 (invoke "make" "test")
1173 (invoke "make" "test_7z")
1174 (invoke "make" "test_7zr"))))))
1176 (let ((system (or (%current-target-system)
1177 (%current-system))))
1178 `(,@(cond ((string-prefix? "x86_64" system)
1180 ((string-prefix? "i686" system)
1183 (home-page "http://p7zip.sourceforge.net/")
1184 (synopsis "Command-line file archiver with high compression ratio")
1185 (description "p7zip is a command-line port of 7-Zip, a file archiver that
1186 handles the 7z format which features very high compression ratios.")
1187 (license (list license:lgpl2.1+
1189 license:public-domain))))
1191 (define-public gzstream
1198 ;; No versioned URL, but last release was in 2003.
1199 "http://www.cs.unc.edu/Research/compgeom/gzstream/gzstream.tgz")
1200 (file-name (string-append name "-" version ".tgz"))
1203 "00y19pqjsdj5zcrx4p9j56pl73vayfwnb7y2hvp423nx0cwv5b4r"))
1204 (modules '((guix build utils)))
1206 ;; Remove pre-compiled object.
1208 (delete-file "gzstream.o")
1210 (build-system gnu-build-system)
1212 `(#:test-target "test"
1214 (modify-phases %standard-phases
1217 (lambda* (#:key outputs #:allow-other-keys)
1218 (let* ((out (assoc-ref outputs "out"))
1219 (lib (string-append out "/lib"))
1220 (include (string-append out "/include")))
1221 (install-file "libgzstream.a" lib)
1222 (install-file "gzstream.h" include)
1224 (propagated-inputs `(("zlib" ,zlib)))
1225 (home-page "http://www.cs.unc.edu/Research/compgeom/gzstream/")
1226 (synopsis "Compressed C++ iostream")
1227 (description "gzstream is a small library for providing zlib
1228 functionality in a C++ iostream.")
1229 (license license:lgpl2.1+)))
1237 (method url-fetch/zipbomb)
1238 (uri (string-append "http://mattmahoney.net/dc/zpaq"
1239 (string-delete #\. version) ".zip"))
1242 "066l94yyladlfzri877nh2dhkvspagjn3m5bmv725fmhkr9c4pp8"))
1243 (modules '((guix build utils)))
1245 ;; Delete irrelevant pre-compiled binaries.
1247 (for-each delete-file (find-files "." "\\.exe$"))
1249 (build-system gnu-build-system)
1252 (modify-phases %standard-phases
1253 (delete 'configure)) ; no ‘configure’ script
1256 (string-append "CPPFLAGS=-Dunix"
1257 ,(match (or (%current-target-system)
1262 ;; These should be safe, lowest-common-denominator instruction sets,
1263 ;; allowing for some optimisation while remaining reproducible.
1264 (string-append "CXXFLAGS=-O3 -DNDEBUG"
1265 ,(match (or (%current-target-system)
1267 ("x86_64-linux" " -march=nocona -mtune=generic")
1268 ("i686-linux" " -march=i686 -mtune=generic")
1269 ("armhf-linux" " -mtune=generic-armv7-a")
1271 (string-append "PREFIX="
1272 (assoc-ref %outputs "out")))))
1274 `(("perl" ,perl))) ; for pod2man
1275 (home-page "http://mattmahoney.net/dc/zpaq.html")
1276 (synopsis "Incremental journaling archiver")
1277 (description "ZPAQ is a command-line archiver for realistic situations with
1278 many duplicate and already compressed files. It backs up only those files
1279 modified since the last update. All previous versions remain untouched and can
1280 be independently recovered. Identical files are only stored once (known as
1281 @dfn{de-duplication}). Archives can also be encrypted.
1283 ZPAQ is intended to back up user data, not entire operating systems. It ignores
1284 owner and group IDs, ACLs, extended attributes, or special file types like
1285 devices, sockets, or named pipes. It does not follow or restore symbolic links
1286 or junctions, and always follows hard links.")
1287 (license (list license:public-domain
1288 ;; libzpaq.cpp contains a mix of public-domain and
1289 ;; expat-licenced (or ‘MIT’) code.
1292 (define-public unshield
1297 (origin (method git-fetch)
1299 (url "http://github.com/twogood/unshield.git")
1301 (file-name (git-file-name name version))
1304 "19wn22vszhci8dfcixx5rliz7phx3lv5ablvhjlclvj75k2vsdqd"))))
1305 (build-system cmake-build-system)
1308 ("openssl" ,openssl)
1309 ;; Test data that is otherwise downloaded with curl.
1310 ("unshield-avigomanager11b22.zip"
1314 "https://www.dropbox.com/s/8r4b6752swe3nhu/"
1315 "unshield-avigomanager11b22.zip?dl=1"))
1317 (base32 "0fwq7lih04if68wpwpsk5wjqyvh32db76a41sq6gbx4dn1lc3ddn"))
1318 (file-name "unshield-avigomanager11b22.zip")))
1319 ("unshield-baldurs_gate_patch_v1_1_4315_international.zip"
1323 "https://www.dropbox.com/s/9ruil8oi6amjbbk/"
1324 "unshield-baldurs_gate_patch_v1_1_4315_international.zip?dl=1"))
1326 (base32 "0spaxf6dardlhqxz3ys09fzamj007q3nfyw4xng6gh3qp9780maj"))
1327 (file-name "unshield-baldurs_gate_patch_v1_1_4315_international.zip")))
1328 ("unshield-the-feeble-files-spanish.zip"
1332 "https://www.dropbox.com/s/1ng0z9kfxc7eb1e/"
1333 "unshield-the-feeble-files-spanish.zip?dl=1"))
1335 (base32 "1k5cw6vnpja8yjlnhx5124xrw9i8s1l539hfdqqrqz3l5gn0bnyd"))
1336 (file-name "unshield-the-feeble-files-spanish.zip")))))
1338 `(("unzip" ,unzip)))
1340 `(#:out-of-source? #f
1342 (modify-phases %standard-phases
1343 (add-before 'check 'pre-check
1344 (lambda* (#:key inputs #:allow-other-keys)
1345 (for-each (lambda (i)
1346 (copy-file (assoc-ref inputs i)
1347 (string-append "test/v0/" i)))
1348 '("unshield-avigomanager11b22.zip"
1349 "unshield-baldurs_gate_patch_v1_1_4315_international.zip"
1350 "unshield-the-feeble-files-spanish.zip"))
1351 (substitute* (find-files "test/" "/*\\.sh")
1352 ;; Tests expect the unshield binary in a specific
1354 (("/var/tmp/unshield/bin/unshield")
1355 (string-append (getcwd) "/src/unshield"))
1356 ;; We no longer need to download the data.
1358 (("curl -(|f)sSL -o test.zip .*") ""))
1359 (substitute* "test/v0/avigomanager.sh"
1361 (string-append (getcwd)
1362 "/test/v0/unshield-avigomanager11b22.zip")))
1363 (substitute* "test/v0/baldurs_gate_patch_v1_1_4315_international.sh"
1367 "/test/v0/unshield-baldurs_gate_patch_v1_1_4315_international.zip")))
1368 (substitute* "test/v0/the-feeble-files-spanish.sh"
1370 (string-append (getcwd)
1371 "/test/v0/unshield-the-feeble-files-spanish.zip")))
1375 (invoke "./run-tests.sh"))))))
1376 (home-page "https://github.com/twogood/unshield")
1377 (synopsis "Extract CAB files from InstallShield installers")
1379 "@command{unshield} is a tool and library for extracting @file{.cab}
1380 archives from InstallShield installers.")
1381 (license license:expat)))
1390 (uri (string-append "https://github.com/facebook/zstd/releases/download/"
1391 "v" version "/zstd-" version ".tar.gz"))
1393 (base32 "05ckxap00qvc0j51d3ci38150cxsw82w7s9zgd5fgzspnzmp1vsr"))))
1394 (build-system gnu-build-system)
1395 (outputs '("out" ;1.2MiB executables and documentation
1396 "lib" ;1.2MiB shared library and headers
1397 "static")) ;1.2MiB static library
1400 (modify-phases %standard-phases
1401 (delete 'configure) ;no configure script
1402 (add-after 'install 'adjust-library-locations
1403 (lambda* (#:key outputs #:allow-other-keys)
1404 (let* ((out (assoc-ref outputs "out"))
1405 (lib (assoc-ref outputs "lib"))
1406 (static (assoc-ref outputs "static"))
1407 (shared-libs (string-append lib "/lib"))
1408 (static-libs (string-append static "/lib")))
1409 ;; Move the static library to its own output to save ~1MiB.
1410 (mkdir-p static-libs)
1411 (for-each (lambda (ar)
1412 (link ar (string-append static-libs "/"
1415 (find-files shared-libs "\\.a$"))
1417 ;; Make sure the pkg-config file refers to the right output.
1418 (substitute* (string-append shared-libs "/pkgconfig/libzstd.pc")
1420 (string-append "prefix=" lib "\n")))
1425 (string-append "PREFIX=" (assoc-ref %outputs "out"))
1426 (string-append "LIBDIR=" (assoc-ref %outputs "lib") "/lib")
1427 (string-append "INCLUDEDIR=" (assoc-ref %outputs "lib") "/include")
1428 ;; Skip auto-detection of, and creating a dependency on, the build
1429 ;; environment's ‘xz’ for what amounts to a dubious feature anyway.
1431 ;; Not currently detected, but be explicit & avoid surprises later.
1434 (home-page "https://facebook.github.io/zstd/")
1435 (synopsis "Zstandard real-time compression algorithm")
1436 (description "Zstandard (@command{zstd}) is a lossless compression algorithm
1437 that combines very fast operation with a compression ratio comparable to that of
1438 zlib. In most scenarios, both compression and decompression can be performed in
1439 ‘real time’. The compressor can be configured to provide the most suitable
1440 trade-off between compression ratio and speed, without affecting decompression
1442 (license (list license:bsd-3 ; the main top-level LICENSE file
1443 license:bsd-2 ; many files explicitly state 2-Clause
1444 license:gpl2 ; the main top-level COPYING file
1445 license:gpl3+ ; tests/gzip/*.sh
1446 license:expat ; lib/dictBuilder/divsufsort.[ch]
1447 license:public-domain ; zlibWrapper/examples/fitblk*
1448 license:zlib)))) ; zlibWrapper/{gz*.c,gzguts.h}
1450 (define-public pzstd
1453 (version (package-version zstd))
1454 (source (package-source zstd))
1455 (build-system gnu-build-system)
1457 `(("googletest" ,googletest)))
1460 (modify-phases %standard-phases
1461 (add-after 'unpack 'enter-subdirectory
1462 (lambda _ (chdir "contrib/pzstd") #t))
1463 (delete 'configure) ; no configure script
1464 (add-before 'check 'compile-tests
1465 (lambda* (#:key make-flags #:allow-other-keys)
1466 (apply invoke "make" "tests" make-flags)))
1467 (add-after 'install 'install-documentation
1468 (lambda* (#:key outputs #:allow-other-keys)
1469 (let* ((out (assoc-ref outputs "out"))
1470 (doc (string-append out "/share/doc/" ,name)))
1472 (install-file "README.md" doc)
1476 (string-append "PREFIX=" (assoc-ref %outputs "out")))))
1477 (home-page (package-home-page zstd))
1478 (synopsis "Threaded implementation of the Zstandard compression algorithm")
1479 (description "Parallel Zstandard (PZstandard or @command{pzstd}) is a
1480 multi-threaded implementation of the @uref{http://zstd.net/, Zstandard
1481 compression algorithm}. It is fully compatible with the original Zstandard file
1482 format and command-line interface, and can be used as a drop-in replacement.
1484 Compression is distributed over multiple processor cores to improve performance,
1485 as is the decompression of data compressed in this manner. Data compressed by
1486 other implementations will only be decompressed by two threads: one performing
1487 the actual decompression, the other input and output.")
1488 (license (package-license zstd))))
1497 (uri (string-append "mirror://sourceforge/infozip"
1498 "/Zip%203.x%20%28latest%29/3.0/zip30.tar.gz"))
1501 "0sb3h3067pzf3a7mlxn1hikpcjrsvycjcnj9hl9b1c3ykcgvps7h"))))
1502 (build-system gnu-build-system)
1503 (inputs `(("bzip2" ,bzip2)))
1505 `(#:tests? #f ; no test target
1506 #:make-flags (let ((out (assoc-ref %outputs "out")))
1507 (list "-f" "unix/Makefile"
1508 (string-append "prefix=" out)
1509 (string-append "MANDIR=" out "/share/man/man1")))
1511 (modify-phases %standard-phases
1513 (lambda* (#:key (make-flags '()) #:allow-other-keys)
1514 (apply invoke "make" "generic_gcc" make-flags)))
1515 (delete 'configure))))
1516 (home-page "http://www.info-zip.org/Zip.html")
1517 (synopsis "Compression and file packing utility")
1519 "Zip is a compression and file packaging/archive utility. Zip is useful
1520 for packaging a set of files for distribution, for archiving files, and for
1521 saving disk space by temporarily compressing unused files or directories.
1522 Zip puts one or more compressed files into a single ZIP archive, along with
1523 information about the files (name, path, date, time of last modification,
1524 protection, and check information to verify file integrity). An entire
1525 directory structure can be packed into a ZIP archive with a single command.
1527 Zip has one compression method (deflation) and can also store files without
1528 compression. Zip automatically chooses the better of the two for each file.
1529 Compression ratios of 2:1 to 3:1 are common for text files.")
1530 (license (license:non-copyleft "file://LICENSE"
1531 "See LICENSE in the distribution."))))
1533 (define-public unzip
1534 (package (inherit zip)
1540 (uri (string-append "mirror://sourceforge/infozip"
1541 "/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz"))
1544 "0dxx11knh3nk95p2gg2ak777dd11pr7jx5das2g49l262scrcv83"))
1545 (patches (search-patches "unzip-CVE-2014-8139.patch"
1546 "unzip-CVE-2014-8140.patch"
1547 "unzip-CVE-2014-8141.patch"
1548 "unzip-CVE-2014-9636.patch"
1549 "unzip-CVE-2015-7696.patch"
1550 "unzip-CVE-2015-7697.patch"
1551 "unzip-allow-greater-hostver-values.patch"
1552 "unzip-initialize-symlink-flag.patch"
1553 "unzip-remove-build-date.patch"
1554 "unzip-attribs-overflow.patch"
1555 "unzip-overflow-on-invalid-input.patch"
1556 "unzip-format-secure.patch"
1557 "unzip-overflow-long-fsize.patch"))))
1558 (build-system gnu-build-system)
1559 ;; no inputs; bzip2 is not supported, since not compiled with BZ_NO_STDIO
1561 `(#:phases (modify-phases %standard-phases
1563 (add-after 'unpack 'fortify
1565 ;; Mitigate CVE-2018-1000035, an exploitable buffer overflow.
1566 ;; This environment variable is recommended in 'unix/Makefile'
1567 ;; for passing flags to the C compiler.
1568 (setenv "LOCAL_UNZIP" "-D_FORTIFY_SOURCE=1")
1571 (lambda* (#:key make-flags #:allow-other-keys)
1572 (apply invoke "make"
1573 `("-j" ,(number->string
1574 (parallel-job-count))
1577 #:make-flags (list "-f" "unix/Makefile"
1578 (string-append "prefix=" %output)
1579 (string-append "MANDIR=" %output "/share/man/man1"))))
1580 (home-page "http://www.info-zip.org/UnZip.html")
1581 (synopsis "Decompression and file extraction utility")
1583 "UnZip is an extraction utility for archives compressed in .zip format,
1584 also called \"zipfiles\".
1586 UnZip lists, tests, or extracts files from a .zip archive. The default
1587 behaviour (with no options) is to extract into the current directory, and
1588 subdirectories below it, all files from the specified zipfile. UnZip
1589 recreates the stored directory structure by default.")
1590 (license (license:non-copyleft "file://LICENSE"
1591 "See LICENSE in the distribution."))))
1593 (define-public zziplib
1597 (home-page "https://github.com/gdraheim/zziplib")
1600 (uri (git-reference (url home-page)
1601 (commit (string-append "v" version))))
1602 (file-name (git-file-name name version))
1603 (patches (search-patches "zziplib-CVE-2018-16548.patch"))
1606 "0fbk9k7ryas2wh2ykwkvm1pbi40i88rfvc3dydh9xyd7w2jcki92"))))
1607 (build-system gnu-build-system)
1609 `(#:phases (modify-phases %standard-phases
1610 (add-before 'check 'make-files-writable
1612 (for-each make-file-writable
1613 (find-files "test" #:directories? #t))
1616 ;; XXX: The default test target attempts to download external resources and
1617 ;; fails without error: <https://github.com/gdraheim/zziplib/issues/53>.
1618 ;; To prevent confusing log messages, just run a simple zip test that works.
1619 #:test-target "check-readme"))
1622 (native-inputs `(("perl" ,perl) ; for the documentation
1623 ("pkg-config" ,pkg-config)
1624 ;; for the documentation; Python 3 not supported,
1625 ;; http://forums.gentoo.org/viewtopic-t-863161-start-0.html
1626 ("python" ,python-2)
1627 ("zip" ,zip))) ; to create test files
1628 (synopsis "Library for accessing zip files")
1630 "ZZipLib is a library based on zlib for accessing zip files.")
1631 ;; zziplib is dual licensed under LGPL2.0+ and MPL1.1. Some example source
1632 ;; files carry the Zlib license; see "docs/copying.html" for details.
1633 (license (list license:lgpl2.0+ license:mpl1.1))))
1635 (define-public libzip
1642 "https://libzip.org/download/libzip-" version ".tar.xz"))
1645 "0ck1dk7zn5qzpgxklg0r26nfsf04xb6c46gsig060hkvvgzp6156"))))
1649 `(("gnutls" ,gnutls)
1651 ("openssl" ,openssl)
1653 (build-system cmake-build-system)
1654 (home-page "https://libzip.org")
1655 (synopsis "C library for reading, creating, and modifying zip archives")
1656 (description "Libzip is a C library for reading, creating, and modifying
1657 zip archives. Files can be added from data buffers, files, or compressed data
1658 copied directly from other zip archives. Changes made without closing the
1659 archive can be reverted.")
1660 (license license:bsd-3)))
1662 (define-public atool
1669 (uri (string-append "http://savannah.nongnu.org/download/atool/atool-"
1673 "0fvhzip2v08jgnlfpyj6rapan39xlsl1ksgq4lp8gfsai2ah1xma"))))
1674 (build-system gnu-build-system)
1677 (modify-phases %standard-phases
1678 (add-after 'unpack 'embed-absolute-file-name
1679 (lambda* (#:key inputs #:allow-other-keys)
1680 (substitute* "atool"
1681 (("(^\\$::cfg_path_file.*= )'file'" _ pre)
1682 (string-append pre "'" (assoc-ref inputs "file")
1688 (home-page "https://www.nongnu.org/atool/")
1689 (synopsis "Universal tool to manage file archives of various types")
1690 (description "The main command is @command{aunpack} which extracts files
1691 from an archive. The other commands provided are @command{apack} (to create
1692 archives), @command{als} (to list files in archives), and @command{acat} (to
1693 extract files to standard out). As @command{atool} invokes external programs
1694 to handle the archives, not all commands may be supported for a certain type
1696 (license license:gpl2+)))
1698 (define-public lunzip
1705 (uri (string-append "mirror://savannah/lzip/lunzip/"
1706 "lunzip-" version ".tar.gz"))
1708 (base32 "19zq3gmlbia2krq4k4zs1j0xjdv7nsdzqvfb0pyca5n53h2mzb91"))))
1709 (build-system gnu-build-system)
1712 (list ,(string-append "CC=" (cc-for-target)))))
1713 (home-page "https://www.nongnu.org/lzip/lunzip.html")
1714 (synopsis "Small, stand-alone lzip decompressor")
1716 "Lunzip is a decompressor for files in the lzip compression format (.lz),
1717 written as a single small C tool with no dependencies. This makes it
1718 well-suited to embedded and other systems without a C++ compiler, or for use in
1719 applications such as software installers that need only to decompress files,
1721 Lunzip is intended to be fully compatible with the regular lzip package.")
1722 (license (list license:bsd-2 ; carg_parser.[ch]
1723 license:gpl2+)))) ; everything else
1725 (define-public clzip
1732 (uri (string-append "mirror://savannah/lzip/clzip/"
1733 "clzip-" version ".tar.gz"))
1735 (base32 "1h14dmc9fi10gcdpdpbgq1bwvcxvivppilj64pf720x8mw915mfr"))))
1736 (build-system gnu-build-system)
1739 (list ,(string-append "CC=" (cc-for-target)))))
1740 (home-page "https://www.nongnu.org/lzip/clzip.html")
1741 (synopsis "Small, stand-alone lzip compressor and decompressor")
1743 "Clzip is a compressor and decompressor for files in the lzip compression
1744 format (.lz), written as a single small C tool with no dependencies. This makes
1745 it well-suited to embedded and other systems without a C++ compiler, or for use
1746 in other applications like package managers.
1747 Clzip is intended to be fully compatible with the regular lzip package.")
1748 (license (list license:bsd-2 ; carg_parser.[ch], lzd in clzip.texi
1751 (define-public lzlib
1758 (uri (string-append "mirror://savannah/lzip/lzlib/"
1759 "lzlib-" version ".tar.gz"))
1761 (base32 "0djdj4sg33rzi4k84cygvnp09bfsv6i8wy2k7i67rayib63myp3c"))))
1762 (build-system gnu-build-system)
1766 "--enable-shared"))) ; only static (.a) is built by default
1767 (home-page "https://www.nongnu.org/lzip/lzlib.html")
1768 (synopsis "Lzip data compression C library")
1770 "Lzlib is a C library for in-memory LZMA compression and decompression in
1771 the lzip format. It supports integrity checking of the decompressed data, and
1772 all functions are thread-safe. The library should never crash, even in case of
1774 (license (list license:bsd-2 ; the library itself
1775 license:gpl2+)))) ; main.c (i.e. minilzip used by tests)
1777 (define-public plzip
1784 (uri (string-append "mirror://savannah/lzip/plzip/"
1785 "plzip-" version ".tar.gz"))
1787 (base32 "04indil809qgfmz776imb3dnhkysh7zk28jcv3mw0ahl2lyaxbzd"))))
1788 (build-system gnu-build-system)
1790 `(("lzlib" ,lzlib)))
1791 (home-page "https://www.nongnu.org/lzip/plzip.html")
1792 (synopsis "Parallel lossless data compressor for the lzip format")
1794 "Plzip is a massively parallel (multi-threaded) lossless data compressor
1795 and decompressor that uses the lzip file format (.lz). Files produced by plzip
1796 are fully compatible with lzip and can be rescued with lziprecover.
1797 On multiprocessor machines, plzip can compress and decompress large files much
1798 faster than lzip, at the cost of a slightly reduced compression ratio (0.4% to
1799 2%). The number of usable threads is limited by file size: on files of only a
1800 few MiB, plzip is no faster than lzip.
1801 Files that were compressed with regular lzip will also not be decompressed
1802 faster by plzip, unless the @code{-b} option was used: lzip usually produces
1803 single-member files which can't be decompressed in parallel.")
1804 (license (list license:bsd-2 ; arg_parser.{cc,h}
1805 license:gpl2+)))) ; everything else
1807 (define-public innoextract
1809 (name "innoextract")
1814 (uri (string-append "https://constexpr.org/innoextract/files/"
1815 "innoextract-" version "/"
1816 "/innoextract-" version ".tar.gz"))
1818 (base32 "09l1z1nbl6ijqqwszdwch9mqr54qb7df0wp2sd77v17dq6gsci33"))))
1819 (build-system cmake-build-system)
1822 (inputs `(("boost" ,boost)
1823 ("libiconv" ,libiconv)
1825 (native-inputs `(("pkg-config" ,pkg-config)))
1826 (home-page "https://constexpr.org/innoextract/")
1827 (synopsis "Tool for extracting Inno Setup installers")
1828 (description "innoextract allows extracting Inno Setup installers under
1829 non-Windows systems without running the actual installer using wine.")
1830 (license license:zlib)))
1832 (define-public google-brotli
1834 (name "google-brotli")
1840 (url "https://github.com/google/brotli")
1841 (commit (string-append "v" version))))
1842 (file-name (git-file-name name version))
1844 (base32 "1811b55wdfg4kbsjcgh1kc938g118jpvif97ilgrmbls25dfpvvw"))))
1845 (build-system cmake-build-system)
1848 (modify-phases %standard-phases
1849 (add-after 'install 'rename-static-libraries
1850 ;; The build tools put a 'static' suffix on the static libraries, but
1851 ;; other applications don't know how to find these.
1852 (lambda* (#:key outputs #:allow-other-keys)
1853 (let ((lib (string-append (assoc-ref %outputs "out") "/lib/")))
1854 (rename-file (string-append lib "libbrotlicommon-static.a")
1855 (string-append lib "libbrotlicommon.a"))
1856 (rename-file (string-append lib "libbrotlidec-static.a")
1857 (string-append lib "libbrotlidec.a"))
1858 (rename-file (string-append lib "libbrotlienc-static.a")
1859 (string-append lib "libbrotlienc.a"))
1862 (list ;; Defaults to "lib64" on 64-bit archs.
1863 (string-append "-DCMAKE_INSTALL_LIBDIR="
1864 (assoc-ref %outputs "out") "/lib"))))
1865 (home-page "https://github.com/google/brotli")
1866 (synopsis "General-purpose lossless compression")
1867 (description "This package provides the reference implementation of Brotli,
1868 a generic-purpose lossless compression algorithm that compresses data using a
1869 combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd
1870 order context modeling, with a compression ratio comparable to the best
1871 currently available general-purpose compression methods. It is similar in speed
1872 with @code{deflate} but offers more dense compression.
1874 The specification of the Brotli Compressed Data Format is defined in RFC 7932.")
1875 (license license:expat)))
1877 (define-public brotli
1878 ;; We used to provide an older version under the name "brotli".
1879 (deprecated-package "brotli" google-brotli))
1881 (define-public python-google-brotli
1883 (inherit google-brotli)
1884 (name "python-google-brotli")
1885 (build-system python-build-system)
1887 (synopsis "Python interface to google-brotli")
1888 (description "@code{python-google-brotli} provides a Python interface to
1889 @code{google-brotli}, an implementation of the Brotli lossless compression
1898 (uri (string-append "https://www.oberhumer.com/opensource/"
1899 name "/download/" name "-" version ".tar.gz"))
1902 "0j036lkwsxvm15gr29n8wn07cqq79dswjs9k54939ms5zngjjrdq"))))
1903 (build-system gnu-build-system)
1905 `(;; UCL 1.03 fails to build with newer C standards.
1906 #:configure-flags '("CFLAGS=-std=gnu90"
1907 "--enable-shared" "--disable-static")))
1908 (home-page "https://www.oberhumer.com/opensource/ucl/")
1909 (synopsis "Portable lossless data compression library")
1910 (description "UCL implements a number of compression algorithms that
1911 achieve an excellent compression ratio while allowing fast decompression.
1912 Decompression requires no additional memory.
1914 Compared to LZO, the UCL algorithms achieve a better compression ratio but
1915 decompression is a little bit slower.")
1916 (license license:gpl2+)))
1924 (uri (string-append "https://github.com/upx/upx/releases/download/v"
1925 version "/upx-" version "-src.tar.xz"))
1928 "051pk5jk8fcfg5mpgzj43z5p4cn7jy5jbyshyn78dwjqr7slsxs7"))))
1929 (build-system gnu-build-system)
1939 (modify-phases %standard-phases
1940 (delete 'configure) ; no configure script
1941 (delete 'check) ; no test suite
1942 (add-before 'build 'patch-exec-bin-sh
1944 (substitute* (list "Makefile"
1946 (("/bin/sh") (which "sh")))
1949 (lambda* (#:key outputs #:allow-other-keys)
1950 (let* ((out (assoc-ref outputs "out"))
1951 (bin (string-append out "/bin")))
1953 (copy-file "src/upx.out" (string-append bin "/upx")))
1955 (home-page "https://upx.github.io/")
1956 (synopsis "Compression tool for executables")
1958 "The Ultimate Packer for eXecutables (UPX) is an executable file
1959 compressor. UPX typically reduces the file size of programs and shared
1960 libraries by around 50%--70%, thus reducing disk space, network load times,
1961 download times, and other distribution and storage costs.")
1962 (license license:gpl2+)))
1964 (define-public quazip
1971 (url "https://github.com/stachenov/quazip")
1972 (commit (string-append "v" version))))
1973 (file-name (git-file-name name version))
1976 "11icgwv2xyxhd1hm1add51xv54zwkcqkg85d1xqlgiigvbm196iq"))))
1977 (build-system cmake-build-system)
1979 `(#:tests? #f)) ;no test
1981 `(("doxygen" ,doxygen)))
1983 `(("qtbase" ,qtbase)
1985 (home-page "https://stachenov.github.io/quazip/index.html")
1986 (synopsis "Qt/C++ wrapper for Minizip")
1987 (description "QuaZIP is a simple C++ wrapper over Gilles Vollant's
1988 ZIP/UNZIP package that can be used to access ZIP archives. It uses
1989 Trolltech's Qt toolkit.
1991 QuaZIP allows you to access files inside ZIP archives using QIODevice
1992 API, and that means that you can also use QTextStream, QDataStream or
1993 whatever you would like to use on your zipped files.
1995 QuaZIP provides complete abstraction of the ZIP/UNZIP API, for both
1996 reading from and writing to ZIP archives. ")
1997 ;; Project is distributed under LGPL, but "quazip/z*" "quazip/unzip.*" are
1998 ;; distributed under zlib terms.
1999 (license (list license:lgpl2.1+ license:zlib))))
2001 (define-public zutils
2008 (uri (string-append "mirror://savannah/zutils/zutils-" version ".tar.lz"))
2010 (base32 "0y2wm8wqr1wi1b1fv45dn50njv4q81p6ifx0279ji1bq56qkrn2r"))))
2011 (build-system gnu-build-system)
2014 (list "--sysconfdir=/etc")
2016 (modify-phases %standard-phases
2017 (add-before 'check 'disable-failing-tests
2018 ;; XXX https://lists.nongnu.org/archive/html/zutils-bug/2020-07/msg00005.html
2020 (substitute* "testsuite/check.sh"
2021 (("\"\\$\\{ZGREP\\}\" -N -L \"GNU\"") "true")
2022 (("\"\\$\\{ZGREP\\}\" -N -L \"nx_pattern\"") "false"))
2025 (lambda* (#:key make-flags outputs #:allow-other-keys)
2026 (apply invoke "make" "install"
2027 (string-append "sysconfdir=" (assoc-ref outputs "out")
2031 ;; Needed to extract the source tarball and run the test suite.
2033 (home-page "https://www.nongnu.org/zutils/zutils.html")
2034 (synopsis "Utilities that transparently operate on compressed files")
2036 "Zutils is a collection of utilities able to process any combination of
2037 compressed and uncompressed files transparently. If any given file, including
2038 standard input, is compressed, its decompressed content is used instead.
2040 @command{zcat}, @command{zcmp}, @command{zdiff}, and @command{zgrep} are
2041 improved replacements for the shell scripts provided by GNU gzip.
2042 @command{ztest} tests the integrity of supported compressed files.
2043 @command{zupdate} recompresses files with lzip, similar to gzip's
2046 Supported compression formats are bzip2, gzip, lzip, and xz. Zutils uses
2047 external compressors: the compressor to be used for each format is configurable
2048 at run time, and must be installed separately.")
2049 (license (list license:bsd-2 ; arg_parser.{cc,h}
2050 license:gpl2+)))) ; the rest
2052 (define-public makeself-safeextract
2053 (let ((commit "1a95e121fa8e3c02d307ae37b9b7834e616c3683"))
2055 (name "makeself-safeextract")
2056 (version (git-version "0.0.0" "1" commit))
2057 (home-page "https://github.com/ssokolow/makeself_safeextract")
2064 (file-name (git-file-name name version))
2067 "1anlinaj9lvfi8bn00wp11vzqq0f9sig4fm9yrspisx31v0z4a2c"))))
2068 (build-system trivial-build-system)
2070 `(("python" ,python-2)
2074 `(#:modules ((guix build utils))
2077 (use-modules (guix build utils))
2078 (let* ((name "makeself_safeextract")
2079 (source (string-append (assoc-ref %build-inputs "source")
2081 (bin (string-append (assoc-ref %outputs "out") "/bin"))
2082 (target (string-append bin "/" name))
2083 (python (string-append (assoc-ref %build-inputs "python") "/bin"))
2084 (7z (string-append (assoc-ref %build-inputs "p7zip") "/bin/7z"))
2085 (unzip (string-append (assoc-ref %build-inputs "unzip") "/bin/unzip")))
2086 (setenv "PATH" (string-append (getenv "PATH") ":" python))
2088 (copy-file source target)
2090 (("'7z'") (format #f "'~a'" 7z))
2091 (("'unzip'") (format #f "'~a'" unzip)))
2092 (patch-shebang target)))))
2093 (synopsis "Extract makeself and mojo archives without running untrusted code")
2094 (description "This package provides a script to unpack self-extracting
2095 archives generated by @command{makeself} or @command{mojo} without running the
2096 possibly untrusted extraction shell script.")
2097 (license license:gpl3+))))
2099 (define-public ncompress
2106 (url "https://github.com/vapier/ncompress")
2107 (commit (string-append "v" version))))
2108 (patches (search-patches "ncompress-fix-softlinks.patch"))
2109 (file-name (string-append name "-" version ".tar.gz"))
2112 "1a4yir1ilafz0nzxdwigj204j4yy2zljbc501nsaqqm3dxdap8zn"))))
2114 '(#:make-flags (list "CC=gcc"
2115 (string-append "BINDIR=" %output "/bin")
2116 (string-append "MANDIR=" %output "/share/man/man1"))
2117 #:phases (modify-phases %standard-phases
2118 (delete 'configure))))
2119 (build-system gnu-build-system)
2120 (home-page "https://github.com/vapier/ncompress/")
2121 (synopsis "Original Lempel-Ziv compress/uncompress programs")
2122 (description "(N)compress provides the original compress and uncompress
2123 programs that used to be the de facto UNIX standard for compressing and
2124 uncompressing files. These programs implement a fast, simple Lempel-Ziv (LZW)
2125 file compression algorithm.")
2126 (license license:gpl2+)))
2128 (define-public xarchiver
2131 (version "0.5.4.15")
2136 (url "https://github.com/ib/xarchiver")
2138 (file-name (git-file-name name version))
2140 (base32 "0a3y54r5zp2c0cqm77r07qrl1vh200wvqmbhm35diy22fvkq5mwc"))))
2141 (build-system glib-or-gtk-build-system)
2143 `(("gettext" ,gettext-minimal)
2144 ("intltool" ,intltool)
2145 ("libxslt" ,libxslt)
2146 ("pkg-config" ,pkg-config)))
2148 `(("adwaita-icon-theme" ,adwaita-icon-theme) ; hard-coded theme
2150 (home-page "https://github.com/ib/xarchiver")
2151 (synopsis "Graphical front-end for archive operations")
2152 (description "Xarchiver is a front-end to various command line archiving
2153 tools. It uses GTK+ tool-kit and is designed to be desktop-environment
2154 independent. Supported formats are 7z, ARJ, bzip2, gzip, LHA, lzma, lzop,
2155 RAR, RPM, DEB, tar, and ZIP. It cannot perform functions for archives, whose
2156 archiver is not installed.")
2157 (license license:gpl2+)))
2159 (define-public tarsplitter
2161 (name "tarsplitter")
2166 (url "https://github.com/AQUAOSOTech/tarsplitter")
2167 (commit (string-append "v" version))))
2168 (file-name (git-file-name name version))
2171 "17qkg95r97kcrs17b0mcqswx99280ni47j5yx8xa7nl3bdhm6325"))))
2172 (build-system go-build-system)
2174 `(#:import-path "github.com/AQUAOSOTech/tarsplitter"
2175 #:install-source? #f
2177 (modify-phases %standard-phases
2178 (add-after 'install 'install-documentation
2179 (lambda* (#:key import-path outputs #:allow-other-keys)
2180 (let* ((source (string-append "src/" import-path))
2181 (out (assoc-ref outputs "out"))
2182 (doc (string-append out "/share/doc/" ,name "-" ,version)))
2183 (with-directory-excursion source
2184 (install-file "README.md" doc))
2186 (home-page "https://github.com/AQUAOSOTech/tarsplitter")
2187 (synopsis "Multithreaded tar utility")
2189 "Archive huge numbers of files, or split massive tar archives into smaller
2191 (license license:expat)))
2193 (define-public c-blosc
2200 (url "https://github.com/Blosc/c-blosc")
2201 (commit (string-append "v" version))))
2202 (file-name (git-file-name name version))
2205 "1ywq8j70149859vvs19wgjq89d6xsvvmvm2n1dmkzpchxgrvnw70"))))
2206 (build-system cmake-build-system)
2207 (home-page "https://blosc.org")
2208 (synopsis "Blocking, shuffling and lossless compression library")
2210 "Blosc is a high performance compressor optimized for binary data. It has
2211 been designed to transmit data to the processor cache faster than the
2212 traditional, non-compressed, direct memory fetch approach via a
2213 @code{memcpy()} system call. Blosc is meant not only to reduce the size of
2214 large datasets on-disk or in-memory, but also to accelerate memory-bound
2216 ;; Blosc itself is released under BSD-3 but it incorporates code under
2217 ;; other non-copyleft licenses.
2218 (license license:bsd-3)))
2227 (url "https://github.com/alucryd/ecm-tools")
2228 (commit (string-append "v" version))))
2229 (file-name (git-file-name name version))
2232 "1rvyx5gcy8lfklgj80szlz3312x45wzx0d9jsgwyvy8f6m4nnb0c"))))
2233 (build-system gnu-build-system)
2235 `(#:tests? #f ; no check target
2237 (list (string-append "CC=" ,(cc-for-target))
2238 (string-append "DESTDIR=" (assoc-ref %outputs "out")))
2240 (modify-phases %standard-phases
2243 (substitute* "Makefile"
2244 (("\\$\\(DESTDIR\\)/usr") "$(DESTDIR)"))
2246 (home-page "https://github.com/alucryd/ecm-tools")
2247 (synopsis "Error code modeler")
2248 (description "ECM is a utility that converts ECM files, i.e., CD data files
2249 with their error correction data losslessly rearranged for better compression,
2250 to their original, binary CD format.")
2251 (license license:gpl3+)))