Commit | Line | Data |
---|---|---|
233e7676 | 1 | ;;; GNU Guix --- Functional package management for GNU |
c11ac62d | 2 | ;;; Copyright © 2012, 2013, 2014, 2015, 2017, 2019 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> |
e580597d | 7 | ;;; Copyright © 2015, 2016, 2017, 2018 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> |
07c95566 | 10 | ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il> |
23f3cbb8 | 11 | ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com> |
3fd4b90d | 12 | ;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org> |
f38eabe9 | 13 | ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> |
e4c2136d | 14 | ;;; Copyright © 2016 David Craven <david@craven.ch> |
0dcea35d | 15 | ;;; Copyright © 2016, 2019 Kei Kebreau <kkebreau@posteo.net> |
986dce4f | 16 | ;;; Copyright © 2016, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com> |
47956fa0 | 17 | ;;; Copyright © 2017 ng0 <ng0@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> |
a268f085 | 29 | ;;; |
233e7676 | 30 | ;;; This file is part of GNU Guix. |
a268f085 | 31 | ;;; |
233e7676 | 32 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
a268f085 LC |
33 | ;;; under the terms of the GNU General Public License as published by |
34 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
35 | ;;; your option) any later version. | |
36 | ;;; | |
233e7676 | 37 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
a268f085 LC |
38 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
39 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
40 | ;;; GNU General Public License for more details. | |
41 | ;;; | |
42 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 43 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
a268f085 | 44 | |
1ffa7090 | 45 | (define-module (gnu packages compression) |
b5b73a82 | 46 | #:use-module ((guix licenses) #:prefix license:) |
21b2ec4d | 47 | #:use-module (guix utils) |
a268f085 | 48 | #:use-module (guix packages) |
87f5d366 | 49 | #:use-module (guix download) |
646898b3 | 50 | #:use-module (guix git-download) |
9e6ada8f | 51 | #:use-module (guix build-system cmake) |
b357faac | 52 | #:use-module (guix build-system gnu) |
8ff5c735 | 53 | #:use-module (guix build-system trivial) |
e99dd67a | 54 | #:use-module (gnu packages) |
389eb3fa | 55 | #:use-module (gnu packages assembly) |
69d9792a | 56 | #:use-module (gnu packages autotools) |
23f3cbb8 | 57 | #:use-module (gnu packages backup) |
73f542c3 | 58 | #:use-module (gnu packages base) |
e294c05e | 59 | #:use-module (gnu packages boost) |
0f03c531 | 60 | #:use-module (gnu packages check) |
9e6ada8f | 61 | #:use-module (gnu packages curl) |
09debcf5 | 62 | #:use-module (gnu packages documentation) |
ef5c40aa | 63 | #:use-module (gnu packages file) |
9869bb12 | 64 | #:use-module (gnu packages maths) |
646898b3 | 65 | #:use-module (gnu packages perl) |
23f3cbb8 | 66 | #:use-module (gnu packages pkg-config) |
1ae60db8 | 67 | #:use-module (gnu packages python) |
09debcf5 | 68 | #:use-module (gnu packages qt) |
9e6ada8f | 69 | #:use-module (gnu packages tls) |
82aa2a28 | 70 | #:use-module (gnu packages valgrind) |
36df995c | 71 | #:use-module (ice-9 match) |
646898b3 | 72 | #:use-module ((srfi srfi-1) #:select (last))) |
a268f085 | 73 | |
6a92093d LC |
74 | (define-public zlib |
75 | (package | |
76 | (name "zlib") | |
2b8bea03 | 77 | (version "1.2.11") |
6a92093d LC |
78 | (source |
79 | (origin | |
87f5d366 | 80 | (method url-fetch) |
a67f97fe CR |
81 | (uri (list (string-append "http://zlib.net/zlib-" |
82 | version ".tar.gz") | |
b2859a4f LC |
83 | (string-append "mirror://sourceforge/libpng/zlib/" |
84 | version "/zlib-" version ".tar.gz"))) | |
6a92093d LC |
85 | (sha256 |
86 | (base32 | |
2b8bea03 | 87 | "18dighcs333gsvajvvgqp8l4cx7h1x7yx9gd5xacnk80spyykrf3")))) |
6a92093d | 88 | (build-system gnu-build-system) |
b90289da | 89 | (outputs '("out" "static")) |
6a92093d | 90 | (arguments |
6cd00453 EF |
91 | `(#:phases |
92 | (modify-phases %standard-phases | |
93 | (replace 'configure | |
94 | (lambda* (#:key outputs #:allow-other-keys) | |
95 | ;; Zlib's home-made `configure' fails when passed | |
96 | ;; extra flags like `--enable-fast-install', so we need to | |
97 | ;; invoke it with just what it understand. | |
98 | (let ((out (assoc-ref outputs "out"))) | |
99 | ;; 'configure' doesn't understand '--host'. | |
100 | ,@(if (%current-target-system) | |
101 | `((setenv "CHOST" ,(%current-target-system))) | |
102 | '()) | |
144cc3c4 | 103 | (invoke "./configure" |
b90289da MB |
104 | (string-append "--prefix=" out))))) |
105 | (add-after 'install 'move-static-library | |
106 | (lambda* (#:key outputs #:allow-other-keys) | |
107 | (let ((out (assoc-ref outputs "out")) | |
108 | (static (assoc-ref outputs "static"))) | |
109 | (with-directory-excursion (string-append out "/lib") | |
110 | (install-file "libz.a" (string-append static "/lib")) | |
111 | (delete-file "libz.a") | |
112 | #t))))))) | |
7f1773ea | 113 | (home-page "https://zlib.net/") |
35b9e423 | 114 | (synopsis "Compression library") |
6a92093d LC |
115 | (description |
116 | "zlib is designed to be a free, general-purpose, legally unencumbered -- | |
117 | that is, not covered by any patents -- lossless data-compression library for | |
118 | use on virtually any computer hardware and operating system. The zlib data | |
35b9e423 | 119 | format is itself portable across platforms. Unlike the LZW compression method |
6a92093d LC |
120 | used in Unix compress(1) and in the GIF image format, the compression method |
121 | currently used in zlib essentially never expands the data. (LZW can double or | |
122 | triple the file size in extreme cases.) zlib's memory footprint is also | |
123 | independent of the input data and can be reduced, if necessary, at some cost | |
124 | in compression.") | |
4a44e743 | 125 | (license license:zlib))) |
6a92093d | 126 | |
8298df96 MB |
127 | (define-public minizip |
128 | (package | |
129 | (name "minizip") | |
130 | (version (package-version zlib)) | |
131 | (source (package-source zlib)) | |
132 | (build-system gnu-build-system) | |
133 | (arguments | |
134 | `(#:phases | |
135 | (modify-phases %standard-phases | |
136 | (add-after 'unpack 'enter-source | |
c11ac62d LC |
137 | (lambda _ (chdir "contrib/minizip") #t)) |
138 | (add-after 'install 'remove-crypt-h | |
139 | (lambda* (#:key outputs #:allow-other-keys) | |
140 | ;; Remove <minizip/crypt.h> because it interferes with libc's | |
141 | ;; <crypt.h> given that 'minizip.pc' says "-I…/include/minizip". | |
142 | ;; Fedora does the same: | |
143 | ;; <https://src.fedoraproject.org/rpms/zlib/c/4d2785ec3116947872f6f32dc4104e6d36d8a7a4?branch=master>. | |
144 | (let ((out (assoc-ref outputs "out"))) | |
145 | (delete-file (string-append out "/include/minizip/crypt.h")) | |
146 | #t)))))) | |
8298df96 MB |
147 | (native-inputs |
148 | `(("autoconf" ,autoconf) | |
149 | ("automake" ,automake) | |
150 | ("libtool" ,libtool))) | |
151 | (propagated-inputs `(("zlib" ,zlib))) | |
152 | (home-page (package-home-page zlib)) | |
153 | (synopsis "Zip Compression library") | |
154 | (description | |
155 | "Minizip is a minimalistic library that supports compressing, | |
156 | extracting and viewing ZIP archives. This version is extracted from | |
157 | the @code{zlib} source.") | |
158 | (license (package-license zlib)))) | |
159 | ||
ee97be9f RW |
160 | (define-public fastjar |
161 | (package | |
162 | (name "fastjar") | |
163 | (version "0.98") | |
164 | (source (origin | |
165 | (method url-fetch) | |
166 | (uri (string-append "mirror://savannah/fastjar/fastjar-" | |
167 | version ".tar.gz")) | |
168 | (sha256 | |
169 | (base32 | |
170 | "0iginbz2m15hcsa3x4y7v3mhk54gr1r7m3ghx0pg4n46vv2snmpi")))) | |
171 | (build-system gnu-build-system) | |
172 | (inputs `(("zlib" ,zlib))) | |
340978d7 | 173 | (home-page "https://savannah.nongnu.org/projects/fastjar") |
ee97be9f RW |
174 | (synopsis "Replacement for Sun's 'jar' utility") |
175 | (description | |
36a4366d EF |
176 | "FastJar is an attempt to create a much faster replacement for Sun's |
177 | @code{jar} utility. Instead of being written in Java, FastJar is written in C.") | |
ee97be9f RW |
178 | (license license:gpl2+))) |
179 | ||
58593975 RW |
180 | (define-public libtar |
181 | (package | |
182 | (name "libtar") | |
89d80159 | 183 | (version "1.2.20") |
58593975 RW |
184 | (source (origin |
185 | (method url-fetch) | |
89d80159 EF |
186 | (uri (list |
187 | (string-append | |
188 | "ftp://ftp.feep.net/pub/software/libtar/libtar-" | |
189 | version ".tar.gz") | |
190 | (string-append | |
191 | "mirror://debian/pool/main/libt/libtar/libtar_" | |
192 | version ".orig.tar.gz"))) | |
58593975 RW |
193 | (sha256 |
194 | (base32 | |
e99dd67a EF |
195 | "02cihzl77ia0dcz7z2cga2412vyhhs5pa2355q4wpwbyga2lrwjh")) |
196 | (patches (search-patches "libtar-CVE-2013-4420.patch")))) | |
58593975 | 197 | (build-system gnu-build-system) |
112fcafb | 198 | (arguments `(#:tests? #f)) ; no "check" target |
89d80159 EF |
199 | (native-inputs |
200 | `(("autoconf" ,autoconf) | |
201 | ("automake" ,automake) | |
202 | ("libtool" ,libtool))) | |
203 | (inputs | |
204 | `(("zlib" ,zlib))) | |
58593975 RW |
205 | (synopsis "C library for manipulating POSIX tar files") |
206 | (description | |
207 | "libtar is a C library for manipulating POSIX tar files. It handles | |
208 | adding and extracting files to/from a tar archive.") | |
89d80159 | 209 | (home-page "https://repo.or.cz/libtar.git") |
58593975 RW |
210 | (license license:bsd-3))) |
211 | ||
a268f085 LC |
212 | (define-public gzip |
213 | (package | |
214 | (name "gzip") | |
07c95566 | 215 | (version "1.10") |
a268f085 | 216 | (source (origin |
87f5d366 | 217 | (method url-fetch) |
0db342a5 | 218 | (uri (string-append "mirror://gnu/gzip/gzip-" |
28181faf | 219 | version ".tar.xz")) |
a268f085 LC |
220 | (sha256 |
221 | (base32 | |
07c95566 | 222 | "1h6p374d3j8d4cdfydzls021xa2yby8myc0h8d6m8bc7k6ncq9c4")))) |
a268f085 | 223 | (build-system gnu-build-system) |
f50d2669 | 224 | (synopsis "General file (de)compression (using lzw)") |
a268f085 LC |
225 | (arguments |
226 | ;; FIXME: The test suite wants `less', and optionally Perl. | |
48623f5b RW |
227 | '(#:tests? #f |
228 | #:phases | |
229 | (modify-phases %standard-phases | |
c7b87eed MB |
230 | (add-after 'unpack 'patch-for-glibc-2.28 |
231 | (lambda _ | |
232 | ;; Adjust the bundled gnulib to work with glibc 2.28. See e.g. | |
233 | ;; "m4-gnulib-libio.patch". This is a phase rather than patch | |
234 | ;; or snippet to work around <https://bugs.gnu.org/32347>. | |
235 | (substitute* (find-files "lib" "\\.c$") | |
236 | (("#if defined _IO_ftrylockfile") | |
237 | "#if defined _IO_EOF_SEEN")) | |
238 | (substitute* "lib/stdio-impl.h" | |
239 | (("^/\\* BSD stdio derived implementations") | |
240 | (string-append "#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN\n" | |
241 | "# define _IO_IN_BACKUP 0x100\n" | |
242 | "#endif\n\n" | |
243 | "/* BSD stdio derived implementations"))) | |
244 | #t)) | |
48623f5b RW |
245 | (add-after 'unpack 'use-absolute-name-of-gzip |
246 | (lambda* (#:key outputs #:allow-other-keys) | |
247 | (substitute* "gunzip.in" | |
248 | (("exec gzip") | |
249 | (string-append "exec " (assoc-ref outputs "out") | |
250 | "/bin/gzip"))) | |
251 | #t))))) | |
a268f085 | 252 | (description |
79c311b8 LC |
253 | "GNU Gzip provides data compression and decompression utilities; the |
254 | typical extension is \".gz\". Unlike the \"zip\" format, it compresses a single | |
255 | file; as a result, it is often used in conjunction with \"tar\", resulting in | |
256 | \".tar.gz\" or \".tgz\", etc.") | |
4a44e743 | 257 | (license license:gpl3+) |
6fd52309 | 258 | (home-page "https://www.gnu.org/software/gzip/"))) |
a268f085 LC |
259 | |
260 | (define-public bzip2 | |
03bc86b8 CB |
261 | (package |
262 | (name "bzip2") | |
263 | (version "1.0.6") | |
264 | (source (origin | |
265 | (method url-fetch) | |
7598b678 LF |
266 | ;; XXX The bzip.org domain was allowed to expire. |
267 | (uri (string-append "https://web.archive.org/web/20180624184806/" | |
268 | "http://www.bzip.org/" | |
269 | version "/bzip2-" version ".tar.gz")) | |
03bc86b8 CB |
270 | (sha256 |
271 | (base32 | |
272 | "1kfrc7f0ja9fdn6j1y6yir6li818npy6217hvr3wzmnmzhs8z152")))) | |
273 | (build-system gnu-build-system) | |
274 | (arguments | |
275 | `(#:modules ((guix build gnu-build-system) | |
276 | (guix build utils) | |
5212c52c | 277 | (ice-9 ftw) |
03bc86b8 CB |
278 | (srfi srfi-1)) |
279 | #:phases | |
280 | (modify-phases %standard-phases | |
281 | (replace 'configure | |
282 | (lambda* (#:key target #:allow-other-keys) | |
3158bc04 MW |
283 | (when ,(%current-target-system) |
284 | ;; Cross-compilation: use the cross tools. | |
285 | (substitute* (find-files "." "Makefile") | |
286 | (("CC=.*$") | |
287 | (string-append "CC = " target "-gcc\n")) | |
288 | (("AR=.*$") | |
289 | (string-append "AR = " target "-ar\n")) | |
290 | (("RANLIB=.*$") | |
291 | (string-append "RANLIB = " target "-ranlib\n")) | |
292 | (("^all:(.*)test" _ prerequisites) | |
293 | ;; Remove 'all' -> 'test' dependency. | |
294 | (string-append "all:" prerequisites "\n")))) | |
295 | #t)) | |
03bc86b8 CB |
296 | (add-before 'build 'build-shared-lib |
297 | (lambda* (#:key inputs #:allow-other-keys) | |
298 | (patch-makefile-SHELL "Makefile-libbz2_so") | |
3158bc04 | 299 | (invoke "make" "-f" "Makefile-libbz2_so"))) |
03bc86b8 CB |
300 | (add-after 'install 'install-shared-lib |
301 | (lambda* (#:key outputs #:allow-other-keys) | |
2b786f67 MB |
302 | ;; The Makefile above does not have an 'install' target, nor does |
303 | ;; it create all the (un)versioned symlinks, so we handle it here. | |
03bc86b8 | 304 | (let* ((out (assoc-ref outputs "out")) |
2b786f67 | 305 | (libdir (string-append out "/lib")) |
5212c52c MB |
306 | (soname "libbz2.so") |
307 | ;; Locate the built library (e.g. "libbz2.so.1.0.6"). | |
308 | (lib (car (scandir "." | |
309 | (lambda (file) | |
310 | (and (string-prefix? soname file) | |
311 | (eq? 'regular | |
312 | (stat:type (lstat file)))))))) | |
313 | (soversion (string-drop lib (+ 1 (string-length soname))))) | |
2b786f67 MB |
314 | (install-file lib libdir) |
315 | (with-directory-excursion libdir | |
316 | ;; Create symlinks libbz2.so.1 -> libbz2.so.1.0, etc. | |
5212c52c | 317 | (let loop ((base soname) |
2b786f67 MB |
318 | (numbers (string-split soversion #\.))) |
319 | (unless (null? numbers) | |
320 | (let ((so-file (string-append base "." (car numbers)))) | |
321 | (symlink so-file base) | |
322 | (loop so-file (cdr numbers)))))) | |
323 | #t))) | |
45719c1d MB |
324 | (add-after 'install-shared-lib 'move-static-lib |
325 | (lambda* (#:key outputs #:allow-other-keys) | |
326 | (let ((out (assoc-ref outputs "out")) | |
327 | (static (assoc-ref outputs "static"))) | |
328 | (with-directory-excursion (string-append out "/lib") | |
329 | (install-file "libbz2.a" (string-append static "/lib")) | |
330 | (delete-file "libbz2.a") | |
331 | #t)))) | |
e7ee50f2 CB |
332 | (add-after 'install-shared-lib 'patch-scripts |
333 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
334 | (let* ((out (assoc-ref outputs "out"))) | |
335 | (substitute* (string-append out "/bin/bzdiff") | |
336 | (("/bin/rm") "rm"))) | |
03bc86b8 | 337 | #t))) |
ab4fab19 | 338 | |
03bc86b8 CB |
339 | #:make-flags (list (string-append "PREFIX=" |
340 | (assoc-ref %outputs "out"))) | |
ab4fab19 | 341 | |
03bc86b8 CB |
342 | ;; Don't attempt to run the tests when cross-compiling. |
343 | ,@(if (%current-target-system) | |
344 | '(#:tests? #f) | |
345 | '()))) | |
45719c1d | 346 | (outputs '("out" "static")) |
03bc86b8 CB |
347 | (synopsis "High-quality data compression program") |
348 | (description | |
349 | "bzip2 is a freely available, patent free (see below), high-quality data | |
a268f085 LC |
350 | compressor. It typically compresses files to within 10% to 15% of the best |
351 | available techniques (the PPM family of statistical compressors), whilst | |
352 | being around twice as fast at compression and six times faster at | |
353 | decompression.") | |
03bc86b8 CB |
354 | (license (license:non-copyleft "file://LICENSE" |
355 | "See LICENSE in the distribution.")) | |
7598b678 | 356 | (home-page "https://web.archive.org/web/20180801004107/http://www.bzip.org/"))) |
a268f085 | 357 | |
669b7b83 RW |
358 | (define-public lbzip2 |
359 | (package | |
360 | (name "lbzip2") | |
361 | (version "2.5") | |
362 | (source (origin | |
363 | (method url-fetch) | |
364 | (uri (string-append "http://archive.lbzip2.org/lbzip2-" | |
365 | version ".tar.gz")) | |
366 | (sha256 | |
367 | (base32 | |
f268b744 EF |
368 | "1sahaqc5bw4i0iyri05syfza4ncf5cml89an033fspn97klmxis6")) |
369 | (modules '((guix build utils))) | |
370 | (snippet | |
371 | '(begin | |
f268b744 EF |
372 | (substitute* (find-files "lib" "\\.c$") |
373 | (("#if defined _IO_ftrylockfile") | |
374 | "#if defined _IO_EOF_SEEN")) | |
375 | (substitute* "lib/stdio-impl.h" | |
376 | (("^/\\* BSD stdio derived implementations") | |
377 | (string-append "#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN\n" | |
378 | "# define _IO_IN_BACKUP 0x100\n" | |
379 | "#endif\n\n" | |
380 | "/* BSD stdio derived implementations"))) | |
381 | #t)))) | |
669b7b83 RW |
382 | (build-system gnu-build-system) |
383 | (synopsis "Parallel bzip2 compression utility") | |
384 | (description | |
385 | "lbzip2 is a multi-threaded compression utility with support for the | |
386 | bzip2 compressed file format. lbzip2 can process standard bz2 files in | |
387 | parallel. It uses POSIX threading model (pthreads), which allows it to take | |
388 | full advantage of symmetric multiprocessing (SMP) systems. It has been proven | |
389 | to scale linearly, even to over one hundred processor cores. lbzip2 is fully | |
390 | compatible with bzip2 – both at file format and command line level.") | |
391 | (home-page "http://www.lbzip2.org/") | |
392 | (license license:gpl3+))) | |
393 | ||
5d47eab0 EF |
394 | (define-public pbzip2 |
395 | (package | |
396 | (name "pbzip2") | |
bf867709 | 397 | (version "1.1.13") |
5d47eab0 EF |
398 | (source (origin |
399 | (method url-fetch) | |
21b2ec4d EF |
400 | (uri (string-append "https://launchpad.net/pbzip2/" |
401 | (version-major+minor version) "/" version | |
402 | "/+download/" name "-" version ".tar.gz")) | |
5d47eab0 EF |
403 | (sha256 |
404 | (base32 | |
bf867709 | 405 | "1rnvgcdixjzbrmcr1nv9b6ccrjfrhryaj7jwz28yxxv6lam3xlcg")))) |
5d47eab0 EF |
406 | (build-system gnu-build-system) |
407 | (inputs | |
b3546174 | 408 | `(("bzip2" ,bzip2))) |
5d47eab0 | 409 | (arguments |
bf867709 | 410 | `(#:tests? #f ; no tests |
5d47eab0 | 411 | #:phases (modify-phases %standard-phases |
bf867709 | 412 | (delete 'configure)) ; no configure script |
21b2ec4d | 413 | #:make-flags (list (string-append "PREFIX=" %output)))) |
1ac624cd BH |
414 | (home-page (string-append "https://web.archive.org/web/20180412020219/" |
415 | "http://compression.ca/pbzip2/")) | |
5d47eab0 EF |
416 | (synopsis "Parallel bzip2 implementation") |
417 | (description | |
418 | "Pbzip2 is a parallel implementation of the bzip2 block-sorting file | |
419 | compressor that uses pthreads and achieves near-linear speedup on SMP machines. | |
21b2ec4d | 420 | The output of this version is fully compatible with bzip2 v1.0.2 (i.e. anything |
5d47eab0 EF |
421 | compressed with pbzip2 can be decompressed with bzip2).") |
422 | (license (license:non-copyleft "file://COPYING" | |
21b2ec4d | 423 | "See COPYING in the distribution.")))) |
5d47eab0 | 424 | |
a268f085 LC |
425 | (define-public xz |
426 | (package | |
427 | (name "xz") | |
957aac76 | 428 | (version "5.2.4") |
a268f085 | 429 | (source (origin |
87f5d366 | 430 | (method url-fetch) |
52d76b64 LC |
431 | (uri (list (string-append "http://tukaani.org/xz/xz-" version |
432 | ".tar.gz") | |
433 | (string-append "http://multiprecision.org/guix/xz-" | |
434 | version ".tar.gz"))) | |
a268f085 LC |
435 | (sha256 |
436 | (base32 | |
957aac76 | 437 | "0ibi2zsfaz6l756spjwc5rayf4ckgc9hwmy8qinppcyk4svz64mm")))) |
a268f085 | 438 | (build-system gnu-build-system) |
5b2da2a6 MB |
439 | (arguments |
440 | `(#:phases | |
441 | (modify-phases %standard-phases | |
442 | (add-after 'install 'move-static-lib | |
443 | (lambda* (#:key outputs #:allow-other-keys) | |
444 | (let ((out (assoc-ref outputs "out")) | |
445 | (static (assoc-ref outputs "static"))) | |
446 | (mkdir-p (string-append static "/lib")) | |
447 | (rename-file (string-append out "/lib/liblzma.a") | |
448 | (string-append static "/lib/liblzma.a")) | |
449 | ;; Remove reference to the static library from the .la file | |
450 | ;; so Libtool does the right thing when both the shared and | |
451 | ;; static library is available. | |
452 | (substitute* (string-append out "/lib/liblzma.la") | |
453 | (("^old_library='liblzma.a'") "old_library=''")) | |
454 | #t)))))) | |
455 | (outputs '("out" "static")) | |
35b9e423 | 456 | (synopsis "General-purpose data compression") |
a268f085 LC |
457 | (description |
458 | "XZ Utils is free general-purpose data compression software with high | |
459 | compression ratio. XZ Utils were written for POSIX-like systems, but also | |
460 | work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils. | |
461 | ||
462 | The core of the XZ Utils compression code is based on LZMA SDK, but it has | |
463 | been modified quite a lot to be suitable for XZ Utils. The primary | |
464 | compression algorithm is currently LZMA2, which is used inside the .xz | |
465 | container format. With typical files, XZ Utils create 30 % smaller output | |
466 | than gzip and 15 % smaller output than bzip2.") | |
38bbd61d | 467 | (license (list license:gpl2+ license:lgpl2.1+)) ; bits of both |
58891850 | 468 | (home-page "https://tukaani.org/xz/"))) |
c6eac761 | 469 | |
0dcea35d KK |
470 | (define-public lhasa |
471 | (package | |
472 | (name "lhasa") | |
473 | (version "0.3.1") | |
474 | (source (origin | |
475 | (method url-fetch) | |
476 | (uri (string-append | |
477 | "https://github.com/fragglet/lhasa/releases/download/v" | |
478 | version "/lhasa-" version ".tar.gz")) | |
479 | (sha256 | |
480 | (base32 | |
481 | "092zi9av18ma20c6h9448k0bapvx2plnp292741dvfd9hmgqxc1z")))) | |
482 | (build-system gnu-build-system) | |
483 | (arguments | |
484 | '(#:phases | |
485 | (modify-phases %standard-phases | |
486 | (add-before 'check 'set-up-test-environment | |
487 | (lambda* (#:key inputs #:allow-other-keys) | |
488 | (setenv "TZDIR" (string-append (assoc-ref inputs "tzdata") | |
489 | "/share/zoneinfo")) | |
490 | #t))))) | |
491 | (native-inputs | |
492 | `(("tzdata" ,tzdata))) | |
493 | (home-page "https://fragglet.github.com/lhasa/") | |
494 | (synopsis "LHA archive decompressor") | |
495 | (description "Lhasa is a replacement for the Unix LHA tool, for | |
496 | decompressing .lzh (LHA / LHarc) and .lzs (LArc) archives. The backend for the | |
497 | tool is a library, so that it can be reused for other purposes. Lhasa aims to | |
498 | be compatible with as many types of lzh/lzs archives as possible. It also aims | |
499 | to generate the same output as the (non-free) Unix LHA tool, so that it will | |
500 | act as a free drop-in replacement.") | |
501 | (license license:isc))) | |
502 | ||
c6eac761 LC |
503 | (define-public lzo |
504 | (package | |
505 | (name "lzo") | |
7276eca4 | 506 | (version "2.10") |
c6eac761 LC |
507 | (source |
508 | (origin | |
509 | (method url-fetch) | |
510 | (uri (string-append "http://www.oberhumer.com/opensource/lzo/download/lzo-" | |
511 | version ".tar.gz")) | |
512 | (sha256 | |
513 | (base32 | |
7276eca4 | 514 | "0wm04519pd3g8hqpjqhfr72q8qmbiwqaxcs3cndny9h86aa95y60")))) |
c6eac761 | 515 | (build-system gnu-build-system) |
165fd9d5 | 516 | (arguments '(#:configure-flags '("--enable-shared"))) |
c6eac761 LC |
517 | (home-page "http://www.oberhumer.com/opensource/lzo") |
518 | (synopsis | |
e881752c | 519 | "Data compression library suitable for real-time data de-/compression") |
c6eac761 LC |
520 | (description |
521 | "LZO is a data compression library which is suitable for data | |
522 | de-/compression in real-time. This means it favours speed over | |
523 | compression ratio. | |
524 | ||
525 | LZO is written in ANSI C. Both the source code and the compressed data | |
526 | format are designed to be portable across platforms.") | |
4a44e743 | 527 | (license license:gpl2+))) |
0f323dad | 528 | |
a9f48ff0 EB |
529 | (define-public lzop |
530 | (package | |
531 | (name "lzop") | |
89d159fe | 532 | (version "1.04") |
a9f48ff0 EB |
533 | (source |
534 | (origin | |
535 | (method url-fetch) | |
536 | (uri (string-append "http://www.lzop.org/download/lzop-" | |
537 | version ".tar.gz")) | |
538 | (sha256 | |
539 | (base32 | |
89d159fe | 540 | "0h9gb8q7y54m9mvy3jvsmxf21yx8fc3ylzh418hgbbv0i8mbcwky")))) |
a9f48ff0 EB |
541 | (build-system gnu-build-system) |
542 | (inputs `(("lzo" ,lzo))) | |
6f465a51 | 543 | (home-page "https://www.lzop.org/") |
a9f48ff0 EB |
544 | (synopsis "Compress or expand files") |
545 | (description | |
546 | "Lzop is a file compressor which is very similar to gzip. Lzop uses the | |
547 | LZO data compression library for compression services, and its main advantages | |
548 | over gzip are much higher compression and decompression speed (at the cost of | |
549 | some compression ratio).") | |
550 | (license license:gpl2+))) | |
551 | ||
0f323dad LC |
552 | (define-public lzip |
553 | (package | |
554 | (name "lzip") | |
43d9ed77 | 555 | (version "1.21") |
0f323dad LC |
556 | (source (origin |
557 | (method url-fetch) | |
558 | (uri (string-append "mirror://savannah/lzip/lzip-" | |
559 | version ".tar.gz")) | |
560 | (sha256 | |
561 | (base32 | |
43d9ed77 | 562 | "12qdcw5k1cx77brv9yxi1h4dzwibhfmdpigrj43nfk8nscwm12z4")))) |
0f323dad | 563 | (build-system gnu-build-system) |
340978d7 | 564 | (home-page "https://www.nongnu.org/lzip/lzip.html") |
0f323dad LC |
565 | (synopsis "Lossless data compressor based on the LZMA algorithm") |
566 | (description | |
567 | "Lzip is a lossless data compressor with a user interface similar to the | |
568 | one of gzip or bzip2. Lzip decompresses almost as fast as gzip and compresses | |
0963e3e4 | 569 | more than bzip2, which makes it well-suited for software distribution and data |
0f323dad LC |
570 | archiving. Lzip is a clean implementation of the LZMA algorithm.") |
571 | (license license:gpl3+))) | |
b357faac | 572 | |
9d9fc399 TGR |
573 | (define-public lziprecover |
574 | (package | |
575 | (name "lziprecover") | |
b099b4a7 | 576 | (version "1.21") |
9d9fc399 TGR |
577 | (source (origin |
578 | (method url-fetch) | |
f6145bb6 TGR |
579 | (uri (string-append "mirror://savannah/lzip/lziprecover/" |
580 | "lziprecover-" version ".tar.gz")) | |
9d9fc399 TGR |
581 | (sha256 |
582 | (base32 | |
b099b4a7 | 583 | "094w2z8fz41yaq0gkyr61cl7pb1d7kchpl5dka7rvm3qvbb7ncd2")))) |
9d9fc399 | 584 | (build-system gnu-build-system) |
340978d7 | 585 | (home-page "https://www.nongnu.org/lzip/lziprecover.html") |
9d9fc399 TGR |
586 | (synopsis "Recover and decompress data from damaged lzip files") |
587 | (description | |
588 | "Lziprecover is a data recovery tool and decompressor for files in the lzip | |
589 | compressed data format (.lz). It can test the integrity of lzip files, extract | |
590 | data from damaged ones, and repair most files with small errors (up to one | |
591 | single-byte error per member) entirely. | |
592 | ||
593 | Lziprecover is not a replacement for regular backups, but a last line of defence | |
594 | when even the backups are corrupt. It can recover files by merging the good | |
595 | parts of two or more damaged copies, such as can be easily produced by running | |
596 | @command{ddrescue} on a failing device. | |
597 | ||
598 | This package also includes @command{unzcrash}, a tool to test the robustness of | |
599 | decompressors when faced with corrupted input.") | |
600 | (license (list license:bsd-2 ; arg_parser.{cc,h} | |
601 | license:gpl2+)))) ; everything else | |
602 | ||
b357faac AE |
603 | (define-public sharutils |
604 | (package | |
605 | (name "sharutils") | |
9a59ce24 | 606 | (version "4.15.2") |
b357faac AE |
607 | (source |
608 | (origin | |
609 | (method url-fetch) | |
610 | (uri (string-append "mirror://gnu/sharutils/sharutils-" | |
611 | version ".tar.xz")) | |
d0ee11b2 | 612 | (patches (search-patches "sharutils-CVE-2018-1000097.patch")) |
b357faac AE |
613 | (sha256 |
614 | (base32 | |
b50d58b3 | 615 | "16isapn8f39lnffc3dp4dan05b7x6mnc76v6q5nn8ysxvvvwy19b")) |
211db9ca EF |
616 | (modules '((guix build utils))) |
617 | (snippet | |
618 | '(begin | |
619 | (substitute* (find-files "lib" "\\.c$") | |
620 | (("#if defined _IO_ftrylockfile") | |
621 | "#if defined _IO_EOF_SEEN")) | |
622 | (substitute* "lib/stdio-impl.h" | |
623 | (("^/\\* BSD stdio derived implementations") | |
624 | (string-append "#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN\n" | |
625 | "# define _IO_IN_BACKUP 0x100\n" | |
626 | "#endif\n\n" | |
627 | "/* BSD stdio derived implementations"))) | |
628 | #t)))) | |
b357faac AE |
629 | (build-system gnu-build-system) |
630 | (inputs | |
631 | `(("which" ,which))) | |
632 | (arguments | |
633 | `(#:phases | |
dc1d3cde KK |
634 | (modify-phases %standard-phases |
635 | (add-after 'patch-source-shebangs 'unpatch-source-shebang | |
636 | ;; revert the patch-shebang phase on a script which is | |
637 | ;; in fact test data | |
638 | (lambda _ | |
639 | (substitute* "tests/shar-1.ok" | |
640 | (((which "sh")) "/bin/sh")) | |
641 | #t))))) | |
6fd52309 | 642 | (home-page "https://www.gnu.org/software/sharutils/") |
b357faac AE |
643 | (synopsis "Archives in shell scripts, uuencode/uudecode") |
644 | (description | |
79c311b8 LC |
645 | "GNU sharutils is a package for creating and manipulating shell |
646 | archives that can be readily emailed. A shell archive is a file that can be | |
e881752c | 647 | processed by a Bourne-type shell to unpack the original collection of files. |
79c311b8 | 648 | This package is mostly for compatibility and historical interest.") |
b357faac | 649 | (license license:gpl3+))) |
28469ab0 | 650 | |
646898b3 RW |
651 | (define-public sfarklib |
652 | (package | |
653 | (name "sfarklib") | |
979f9e8a | 654 | (version "2.24") |
646898b3 | 655 | (source (origin |
d40362f4 EF |
656 | (method git-fetch) |
657 | (uri (git-reference | |
658 | (url "https://github.com/raboof/sfArkLib.git") | |
659 | (commit version))) | |
660 | (file-name (git-file-name name version)) | |
646898b3 RW |
661 | (sha256 |
662 | (base32 | |
d40362f4 | 663 | "0jrxy24gak7q5ml06p5jjgzk9i5r2mkfjk4ycirkp4kg7k5a237w")))) |
646898b3 RW |
664 | (build-system gnu-build-system) |
665 | (arguments | |
666 | `(#:tests? #f ;no "check" target | |
667 | #:phases | |
668 | (modify-phases %standard-phases | |
669 | (replace 'configure | |
670 | (lambda* (#:key outputs #:allow-other-keys) | |
671 | (substitute* "Makefile" | |
672 | (("/usr/local") (assoc-ref outputs "out"))) | |
673 | #t))))) | |
674 | (inputs | |
675 | `(("zlib" ,zlib))) | |
676 | (home-page "https://github.com/raboof/sfArkLib") | |
677 | (synopsis "Library for SoundFont decompression") | |
678 | (description | |
679 | "SfArkLib is a C++ library for decompressing SoundFont files compressed | |
680 | with the sfArk algorithm.") | |
681 | (license license:gpl3+))) | |
682 | ||
b5ad1659 | 683 | (define-public sfarkxtc |
3fa31317 RW |
684 | (let ((commit "13cd6f93725a90d91ec5ea75babf1dbd694ac463") |
685 | (revision "1")) | |
686 | (package | |
687 | (name "sfarkxtc") | |
688 | (version (git-version "0" revision commit)) | |
689 | (source (origin | |
690 | ;; There are no release tarballs, so we just fetch the latest | |
691 | ;; commit at this time. | |
692 | (method git-fetch) | |
693 | (uri (git-reference | |
694 | (url "https://github.com/raboof/sfarkxtc.git") | |
695 | (commit commit))) | |
696 | (file-name (git-file-name name version)) | |
697 | (sha256 | |
698 | (base32 | |
699 | "1mb1jyk1m11l1gppd9hmql9cyp55sdf7jk5rbc7acky1z4k4mv19")))) | |
700 | (build-system gnu-build-system) | |
701 | (arguments | |
702 | `(#:tests? #f ;no "check" target | |
703 | #:phases | |
704 | (modify-phases %standard-phases | |
705 | (replace 'configure | |
706 | (lambda* (#:key outputs #:allow-other-keys) | |
707 | (substitute* "Makefile" | |
708 | (("/usr/local") (assoc-ref outputs "out"))) | |
709 | #t))))) | |
710 | (inputs | |
711 | `(("zlib" ,zlib) | |
712 | ("sfarklib" ,sfarklib))) | |
713 | (home-page "https://github.com/raboof/sfarkxtc") | |
714 | (synopsis "Basic sfArk decompressor") | |
715 | (description "SfArk extractor converts SoundFonts in the compressed legacy | |
b5ad1659 | 716 | sfArk file format to the uncompressed sf2 format.") |
3fa31317 | 717 | (license license:gpl3+)))) |
b5ad1659 | 718 | |
27f76fe6 TUBK |
719 | (define-public libmspack |
720 | (package | |
721 | (name "libmspack") | |
27b2f34c | 722 | (home-page "https://cabextract.org.uk/libmspack/") |
511930c2 | 723 | (version "0.10.1") |
27f76fe6 TUBK |
724 | (source |
725 | (origin | |
726 | (method url-fetch) | |
27b2f34c | 727 | (uri (string-append home-page name "-" version "alpha.tar.gz")) |
27f76fe6 | 728 | (sha256 |
511930c2 | 729 | (base32 "13janaqsvm7aqc4agjgd4819pbgqv50j88bh5kci1z70wvg65j5s")))) |
27f76fe6 | 730 | (build-system gnu-build-system) |
03c16bb5 MB |
731 | (arguments |
732 | `(#:configure-flags '("--disable-static"))) | |
27f76fe6 TUBK |
733 | (synopsis "Compression tools for some formats used by Microsoft") |
734 | (description | |
735 | "The purpose of libmspack is to provide both compression and | |
736 | decompression of some loosely related file formats used by Microsoft.") | |
737 | (license license:lgpl2.1+))) | |
73f542c3 | 738 | |
82aa2a28 LF |
739 | (define-public lz4 |
740 | (package | |
741 | (name "lz4") | |
9205f451 | 742 | (version "1.9.2") |
82aa2a28 LF |
743 | (source |
744 | (origin | |
b38cfa1d MB |
745 | (method git-fetch) |
746 | (uri (git-reference (url "https://github.com/lz4/lz4") | |
747 | (commit (string-append "v" version)))) | |
82aa2a28 | 748 | (sha256 |
b496bfea | 749 | (base32 |
9205f451 | 750 | "0lpaypmk70ag2ks3kf2dl4ac3ba40n5kc1ainkp9wfjawz76mh61")) |
b38cfa1d | 751 | (file-name (git-file-name name version)))) |
82aa2a28 | 752 | (build-system gnu-build-system) |
9205f451 MB |
753 | (native-inputs |
754 | `(;; For tests. | |
755 | ("python" ,python) | |
756 | ("valgrind" ,valgrind))) | |
82aa2a28 LF |
757 | (arguments |
758 | `(#:test-target "test" | |
82aa2a28 | 759 | #:make-flags (list "CC=gcc" |
0dd6d21a | 760 | (string-append "prefix=" (assoc-ref %outputs "out"))) |
82aa2a28 | 761 | #:phases (modify-phases %standard-phases |
97e537c3 MB |
762 | (delete 'configure) ;no configure script |
763 | (add-before 'check 'disable-broken-test | |
764 | (lambda _ | |
765 | ;; XXX: test_install.sh fails when prefix is a subdirectory. | |
766 | (substitute* "tests/Makefile" | |
767 | (("^test: (.*) test-install" _ targets) | |
768 | (string-append "test: " targets))) | |
986dce4f MB |
769 | #t)) |
770 | (add-after 'install 'delete-static-library | |
771 | (lambda* (#:key outputs #:allow-other-keys) | |
772 | (let ((out (assoc-ref outputs "out"))) | |
773 | (delete-file (string-append out "/lib/liblz4.a")) | |
774 | #t)))))) | |
fd174342 | 775 | (home-page "https://www.lz4.org") |
82aa2a28 LF |
776 | (synopsis "Compression algorithm focused on speed") |
777 | (description "LZ4 is a lossless compression algorithm, providing | |
778 | compression speed at 400 MB/s per core (0.16 Bytes/cycle). It also features an | |
779 | extremely fast decoder, with speed in multiple GB/s per core (0.71 Bytes/cycle). | |
780 | A high compression derivative, called LZ4_HC, is also provided. It trades CPU | |
781 | time for compression ratio.") | |
b7585ca3 | 782 | ;; The libraries (lz4, lz4hc, and xxhash) are BSD licenced. The command |
82aa2a28 LF |
783 | ;; line interface programs (lz4, fullbench, fuzzer, datagen) are GPL2+. |
784 | (license (list license:bsd-2 license:gpl2+)))) | |
dd8d6d65 SB |
785 | |
786 | (define-public squashfs-tools | |
787 | (package | |
788 | (name "squashfs-tools") | |
957fe1c2 | 789 | (version "4.4") |
dd8d6d65 SB |
790 | (source (origin |
791 | (method url-fetch) | |
de67e922 LF |
792 | (uri (string-append "mirror://sourceforge/squashfs/squashfs/" |
793 | "squashfs" version "/" | |
dd8d6d65 SB |
794 | "squashfs" version ".tar.gz")) |
795 | (sha256 | |
796 | (base32 | |
957fe1c2 | 797 | "0zmhvczscqz0mzh4b9m8m42asq14db0a6lc8clp5ljq5ybrv70d9")))) |
dd8d6d65 SB |
798 | (build-system gnu-build-system) |
799 | (arguments | |
957fe1c2 | 800 | '(#:tests? #f ; no check target |
dd8d6d65 SB |
801 | #:make-flags |
802 | (list "CC=gcc" | |
803 | "XZ_SUPPORT=1" | |
804 | "LZO_SUPPORT=1" | |
805 | "LZ4_SUPPORT=1" | |
806 | (string-append "INSTALL_DIR=" %output "/bin")) | |
807 | #:phases | |
808 | (modify-phases %standard-phases | |
809 | (replace 'configure | |
f793b4ef EF |
810 | (lambda _ |
811 | (chdir "squashfs-tools") | |
f793b4ef | 812 | #t))))) |
dd8d6d65 SB |
813 | (inputs |
814 | `(("lz4" ,lz4) | |
815 | ("lzo" ,lzo) | |
816 | ("xz" ,xz) | |
817 | ("zlib" ,zlib))) | |
c5bb55a8 | 818 | (home-page "https://github.com/plougher/squashfs-tools") |
8f65585b | 819 | (synopsis "Tools to create and extract squashfs file systems") |
dd8d6d65 | 820 | (description |
8f65585b | 821 | "Squashfs is a highly compressed read-only file system for Linux. It uses |
dd8d6d65 SB |
822 | zlib to compress files, inodes, and directories. All blocks are packed to |
823 | minimize the data overhead, and block sizes of between 4K and 1M are supported. | |
824 | It is intended to be used for archival use, for live CDs, and for embedded | |
825 | systems where low overhead is needed. This package allows you to create and | |
8f65585b | 826 | extract such file systems.") |
dd8d6d65 | 827 | (license license:gpl2+))) |
820dc3f5 JM |
828 | |
829 | (define-public pigz | |
830 | (package | |
831 | (name "pigz") | |
9dae73c3 | 832 | (version "2.4") |
820dc3f5 JM |
833 | (source (origin |
834 | (method url-fetch) | |
835 | (uri (string-append "http://zlib.net/pigz/" | |
836 | name "-" version ".tar.gz")) | |
837 | (sha256 | |
838 | (base32 | |
9dae73c3 | 839 | "0wsgw5vwl23jrnpsvd8v3xcp5k4waw5mk0164fynjhkv58i1dy54")))) |
820dc3f5 JM |
840 | (build-system gnu-build-system) |
841 | (arguments | |
842 | `(#:phases | |
843 | (modify-phases %standard-phases | |
844 | (delete 'configure) | |
845 | (replace 'install | |
846 | (lambda* (#:key outputs #:allow-other-keys) | |
847 | (let* ((out (assoc-ref outputs "out")) | |
848 | (bin (string-append out "/bin")) | |
849 | (man (string-append out "/share/man/man1"))) | |
850 | (install-file "pigz" bin) | |
851 | (symlink "pigz" (string-append bin "/unpigz")) | |
852 | (install-file "pigz.1" man) | |
853 | #t)))) | |
854 | #:make-flags (list "CC=gcc") | |
855 | #:test-target "tests")) | |
856 | (inputs `(("zlib" ,zlib))) | |
7f1773ea | 857 | (home-page "https://zlib.net/pigz/") |
820dc3f5 JM |
858 | (synopsis "Parallel implementation of gzip") |
859 | (description | |
860 | "This package provides a parallel implementation of gzip that exploits | |
861 | multiple processors and multiple cores when compressing data.") | |
862 | ||
863 | ;; Things under zopfli/ are under ASL2.0, but 4 files at the top-level, | |
864 | ;; written by Mark Adler, are under another non-copyleft license. | |
865 | (license license:asl2.0))) | |
23f3cbb8 BW |
866 | |
867 | (define-public pixz | |
868 | (package | |
869 | (name "pixz") | |
870 | (version "1.0.6") | |
871 | (source (origin | |
872 | (method url-fetch) | |
873 | (uri (string-append | |
874 | "https://github.com/vasi/pixz/releases/download/v" version | |
875 | "/pixz-" version ".tar.xz")) | |
876 | (sha256 | |
877 | (base32 | |
878 | "1s3j7zw6j5zi3fhdxg287ndr3wf6swac7z21mqd1pyiln530gi82")))) | |
879 | (build-system gnu-build-system) | |
880 | (native-inputs | |
881 | `(("pkg-config" ,pkg-config) | |
882 | ("libarchive" ,libarchive))) | |
883 | (home-page "https://github.com/vasi/pixz") | |
884 | (synopsis "Parallel indexing implementation of LZMA") | |
885 | (description | |
886 | "The existing XZ Utils provide great compression in the .xz file format, | |
887 | but they produce just one big block of compressed data. Pixz instead produces | |
888 | a collection of smaller blocks which makes random access to the original data | |
889 | possible and can compress in parallel. This is especially useful for large | |
890 | tarballs.") | |
891 | (license license:bsd-2))) | |
69d9792a | 892 | |
ac83cf22 MB |
893 | (define-public bsdiff |
894 | (package | |
895 | (name "bsdiff") | |
896 | (version "4.3") | |
897 | (home-page "https://www.daemonology.net/bsdiff/") | |
898 | (source (origin | |
899 | (method url-fetch) | |
900 | (uri (string-append home-page name "-" version ".tar.gz")) | |
901 | (sha256 | |
902 | (base32 | |
903 | "0j2zm3z271x5aw63mwhr3vymzn45p2vvrlrpm9cz2nywna41b0hq")))) | |
904 | (build-system gnu-build-system) | |
905 | (arguments | |
906 | `(#:make-flags (list "INSTALL=install" "CC=gcc" | |
907 | (string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
908 | #:phases (modify-phases %standard-phases | |
909 | (delete 'configure) | |
910 | (add-before 'build 'fix-Makefile | |
911 | (lambda _ | |
912 | (substitute* "Makefile" | |
913 | ;; Adjust syntax to make it compatible with GNU Make. | |
914 | (("^\\.") "") | |
915 | ;; Help install(1) create the target directory. | |
916 | (("\\$\\{PREFIX\\}") "-D -t ${PREFIX}")) | |
917 | #t))) | |
918 | #:tests? #f)) ;no tests | |
919 | (inputs | |
920 | `(("bzip2" ,bzip2))) | |
921 | (synopsis "Patch binary files") | |
922 | (description | |
923 | "@command{bsdiff} and @command{bspatch} are tools for building and | |
924 | applying patches to binary files. By using suffix sorting (specifically | |
925 | Larsson and Sadakane's @code{qsufsort}) and taking advantage of how | |
926 | executable files change, bsdiff routinely produces binary patches 50-80% | |
927 | smaller than those produced by @code{Xdelta}.") | |
928 | (license license:bsd-2))) | |
3fd4b90d DM |
929 | |
930 | (define-public cabextract | |
931 | (package | |
932 | (name "cabextract") | |
27b2f34c | 933 | (home-page "https://cabextract.org.uk/") |
bde093c2 | 934 | (version "1.9.1") |
3fd4b90d DM |
935 | (source (origin |
936 | (method url-fetch) | |
393b55d5 | 937 | (uri (string-append home-page "cabextract-" version ".tar.gz")) |
3fd4b90d DM |
938 | (sha256 |
939 | (base32 | |
bde093c2 | 940 | "19qwhl2r8ip95q4vxzxg2kp4p125hjmc9762sns1dwwf7ikm7hmg")) |
92526ade MB |
941 | (modules '((guix build utils))) |
942 | (snippet | |
943 | '(begin | |
944 | ;; Delete bundled libmspack. | |
945 | (delete-file-recursively "mspack") | |
946 | #t)))) | |
3fd4b90d | 947 | (build-system gnu-build-system) |
b3175c70 KK |
948 | (arguments |
949 | '(#:configure-flags '("--with-external-libmspack") | |
950 | #:phases | |
951 | (modify-phases %standard-phases | |
952 | ;; cabextract needs some of libmspack's header files. | |
953 | ;; These are located in the "mspack" directory of libmspack. | |
954 | (add-before 'build 'unpack-libmspack | |
955 | (lambda* (#:key inputs #:allow-other-keys) | |
956 | (let ((dir-name "libmspack-src")) | |
957 | (mkdir dir-name) | |
958 | (invoke "tar" "-xvf" (assoc-ref inputs "libmspack-source") | |
959 | "-C" dir-name "--strip-components" "1") | |
960 | (rename-file (string-append dir-name "/mspack") | |
961 | "mspack") | |
962 | (delete-file-recursively dir-name) | |
963 | #t)))))) | |
3fd4b90d DM |
964 | (native-inputs |
965 | `(("pkg-config" ,pkg-config))) | |
966 | (inputs | |
b3175c70 KK |
967 | `(("libmspack" ,libmspack) |
968 | ("libmspack-source" ,(package-source libmspack)))) | |
3fd4b90d DM |
969 | (synopsis "Tool to unpack Cabinet archives") |
970 | (description "Extracts files out of Microsoft Cabinet (.cab) archives") | |
971 | ;; Some source files specify gpl2+, lgpl2+, however COPYING is gpl3. | |
972 | (license license:gpl3+))) | |
0b073506 TGR |
973 | |
974 | (define-public xdelta | |
975 | (package | |
976 | (name "xdelta") | |
977 | (version "3.1.0") | |
978 | (source | |
979 | (origin | |
0633c77b RW |
980 | (method git-fetch) |
981 | (uri (git-reference | |
982 | (url "https://github.com/jmacd/xdelta.git") | |
983 | (commit (string-append "v" version)))) | |
984 | (file-name (git-file-name name version)) | |
0b073506 TGR |
985 | (sha256 |
986 | (base32 | |
0633c77b | 987 | "09mmsalc7dwlvgrda56s2k927rpl3a5dzfa88aslkqcjnr790wjy")) |
0b073506 TGR |
988 | (snippet |
989 | ;; This file isn't freely distributable and has no effect on building. | |
6cbee49d MW |
990 | '(begin |
991 | (delete-file "xdelta3/draft-korn-vcdiff.txt") | |
992 | #t)))) | |
0b073506 TGR |
993 | (build-system gnu-build-system) |
994 | (native-inputs | |
995 | `(("autoconf" ,autoconf) | |
996 | ("automake" ,automake))) | |
997 | (arguments | |
998 | `(#:phases | |
999 | (modify-phases %standard-phases | |
1000 | (add-after 'unpack 'enter-build-directory | |
e5ff963a | 1001 | (lambda _ (chdir "xdelta3") #t))))) |
69b7fa3e | 1002 | (home-page "http://xdelta.org") |
0b073506 TGR |
1003 | (synopsis "Delta encoder for binary files") |
1004 | (description "xdelta encodes only the differences between two binary files | |
1005 | using the VCDIFF algorithm and patch file format described in RFC 3284. It can | |
1006 | also be used to apply such patches. xdelta is similar to @command{diff} and | |
1007 | @command{patch}, but is not limited to plain text and does not generate | |
1008 | human-readable output.") | |
1009 | (license license:asl2.0))) | |
389eb3fa TGR |
1010 | |
1011 | (define-public lrzip | |
1012 | (package | |
1013 | (name "lrzip") | |
666619d0 | 1014 | (version "0.631") |
389eb3fa TGR |
1015 | (source |
1016 | (origin | |
1017 | (method url-fetch) | |
1018 | (uri (string-append | |
1019 | "http://ck.kolivas.org/apps/lrzip/lrzip-" version ".tar.bz2")) | |
1020 | (sha256 | |
1021 | (base32 | |
5400fdfd TGR |
1022 | "0mb449vmmwpkalq732jdyginvql57nxyd31sszb108yps1lf448d")) |
1023 | (patches (search-patches "lrzip-CVE-2017-8842.patch")))) | |
389eb3fa TGR |
1024 | (build-system gnu-build-system) |
1025 | (native-inputs | |
1026 | `(;; nasm is only required when building for 32-bit x86 platforms | |
1027 | ,@(if (string-prefix? "i686" (or (%current-target-system) | |
1028 | (%current-system))) | |
1029 | `(("nasm" ,nasm)) | |
1030 | '()) | |
1031 | ("perl" ,perl))) | |
1032 | (inputs | |
1033 | `(("bzip2" ,bzip2) | |
1034 | ("lzo" ,lzo) | |
1035 | ("zlib" ,zlib))) | |
1036 | (home-page "http://ck.kolivas.org/apps/lrzip/") | |
1037 | (synopsis "Large file compressor with a very high compression ratio") | |
1038 | (description "lrzip is a compression utility that uses long-range | |
1039 | redundancy reduction to improve the subsequent compression ratio of | |
1040 | larger files. It can then further compress the result with the ZPAQ or | |
1041 | LZMA algorithms for maximum compression, or LZO for maximum speed. This | |
1042 | choice between size or speed allows for either better compression than | |
1043 | even LZMA can provide, or a higher speed than gzip while compressing as | |
1044 | well as bzip2.") | |
1045 | (license (list license:gpl3+ | |
1046 | license:public-domain)))) ; most files in lzma/ | |
e4c2136d DC |
1047 | |
1048 | (define-public snappy | |
1049 | (package | |
1050 | (name "snappy") | |
a5407c76 | 1051 | (version "1.1.8") |
16de7f15 TGR |
1052 | (source |
1053 | (origin | |
898ac8e7 EF |
1054 | (method git-fetch) |
1055 | (uri (git-reference | |
1056 | (url "https://github.com/google/snappy.git") | |
1057 | (commit version))) | |
1058 | (file-name (git-file-name name version)) | |
16de7f15 | 1059 | (sha256 |
a5407c76 | 1060 | (base32 "1j0kslq2dvxgkcxl1gakhvsa731yrcvcaipcp5k8k7ayicvkv9jv")) |
16de7f15 | 1061 | (patches (search-patches "snappy-add-O2-flag-in-CmakeLists.txt.patch")))) |
5a437357 MB |
1062 | (build-system cmake-build-system) |
1063 | (arguments | |
1064 | `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON"))) | |
e4c2136d DC |
1065 | (home-page "https://github.com/google/snappy") |
1066 | (synopsis "Fast compressor/decompressor") | |
5a437357 | 1067 | (description "Snappy is a compression/decompression library. It does not |
e4c2136d | 1068 | aim for maximum compression, or compatibility with any other compression library; |
5a437357 | 1069 | instead, it aims for very high speeds and reasonable compression. For instance, |
e4c2136d DC |
1070 | compared to the fastest mode of zlib, Snappy is an order of magnitude faster |
1071 | for most inputs, but the resulting compressed files are anywhere from 20% to | |
1072 | 100% bigger.") | |
1073 | (license license:asl2.0))) | |
adbd7faf KK |
1074 | |
1075 | (define-public p7zip | |
1076 | (package | |
1077 | (name "p7zip") | |
1078 | (version "16.02") | |
1079 | (source (origin | |
1080 | (method url-fetch) | |
1081 | (uri (string-append "mirror://sourceforge/" name "/" name "/" | |
1082 | version "/" name "_" version | |
1083 | "_src_all.tar.bz2")) | |
1084 | (sha256 | |
1085 | (base32 | |
1086 | "07rlwbbgszq8i7m8jh3x6j2w2hc9a72dc7fmqawnqkwlwb00mcjy")) | |
1087 | (modules '((guix build utils))) | |
1088 | (snippet | |
1089 | '(begin | |
1090 | ;; Remove non-free source files | |
1091 | (for-each delete-file | |
1092 | (append | |
1093 | (find-files "CPP/7zip/Compress" "Rar.*") | |
1094 | (find-files "CPP/7zip/Crypto" "Rar.*") | |
1095 | (find-files "DOC/unRarLicense.txt") | |
1096 | (find-files "Utils/file_Codecs_Rar_so.py"))) | |
1097 | (delete-file-recursively "CPP/7zip/Archive/Rar") | |
1098 | (delete-file-recursively "CPP/7zip/Compress/Rar") | |
1099 | #t)) | |
1ac675a5 | 1100 | (patches (search-patches "p7zip-CVE-2016-9296.patch" |
a630c647 | 1101 | "p7zip-CVE-2017-17969.patch" |
1ac675a5 | 1102 | "p7zip-remove-unused-code.patch")))) |
adbd7faf KK |
1103 | (build-system gnu-build-system) |
1104 | (arguments | |
1105 | `(#:make-flags | |
1106 | (list (string-append "DEST_HOME=" (assoc-ref %outputs "out")) "all3") | |
1107 | #:phases | |
1108 | (modify-phases %standard-phases | |
1109 | (replace 'configure | |
1110 | (lambda* (#:key system outputs #:allow-other-keys) | |
8fcdd9d5 MW |
1111 | (invoke "cp" |
1112 | (let ((system ,(or (%current-target-system) | |
1113 | (%current-system)))) | |
1114 | (cond | |
1115 | ((string-prefix? "x86_64" system) | |
1116 | "makefile.linux_amd64_asm") | |
1117 | ((string-prefix? "i686" system) | |
1118 | "makefile.linux_x86_asm_gcc_4.X") | |
1119 | (else | |
1120 | "makefile.linux_any_cpu_gcc_4.X"))) | |
1121 | "makefile.machine"))) | |
adbd7faf KK |
1122 | (replace 'check |
1123 | (lambda _ | |
8fcdd9d5 MW |
1124 | (invoke "make" "test") |
1125 | (invoke "make" "test_7z") | |
1126 | (invoke "make" "test_7zr")))))) | |
0f4f5715 | 1127 | (native-inputs |
adbd7faf KK |
1128 | (let ((system (or (%current-target-system) |
1129 | (%current-system)))) | |
1130 | `(,@(cond ((string-prefix? "x86_64" system) | |
1131 | `(("yasm" ,yasm))) | |
1132 | ((string-prefix? "i686" system) | |
1133 | `(("nasm" ,nasm))) | |
1134 | (else '()))))) | |
1135 | (home-page "http://p7zip.sourceforge.net/") | |
1136 | (synopsis "Command-line file archiver with high compression ratio") | |
1137 | (description "p7zip is a command-line port of 7-Zip, a file archiver that | |
1138 | handles the 7z format which features very high compression ratios.") | |
1139 | (license (list license:lgpl2.1+ | |
1140 | license:gpl2+ | |
1141 | license:public-domain)))) | |
618089f9 MB |
1142 | |
1143 | (define-public gzstream | |
1144 | (package | |
1145 | (name "gzstream") | |
1146 | (version "1.5") | |
1147 | (source (origin | |
1148 | (method url-fetch) | |
1149 | (uri | |
1150 | ;; No versioned URL, but last release was in 2003. | |
1151 | "http://www.cs.unc.edu/Research/compgeom/gzstream/gzstream.tgz") | |
1152 | (file-name (string-append name "-" version ".tgz")) | |
1153 | (sha256 | |
1154 | (base32 | |
1155 | "00y19pqjsdj5zcrx4p9j56pl73vayfwnb7y2hvp423nx0cwv5b4r")) | |
1156 | (modules '((guix build utils))) | |
1157 | (snippet | |
1158 | ;; Remove pre-compiled object. | |
6cbee49d MW |
1159 | '(begin |
1160 | (delete-file "gzstream.o") | |
1161 | #t)))) | |
618089f9 MB |
1162 | (build-system gnu-build-system) |
1163 | (arguments | |
1164 | `(#:test-target "test" | |
1165 | #:phases | |
1166 | (modify-phases %standard-phases | |
1167 | (delete 'configure) | |
1168 | (replace 'install | |
1169 | (lambda* (#:key outputs #:allow-other-keys) | |
1170 | (let* ((out (assoc-ref outputs "out")) | |
1171 | (lib (string-append out "/lib")) | |
1172 | (include (string-append out "/include"))) | |
1173 | (install-file "libgzstream.a" lib) | |
1174 | (install-file "gzstream.h" include) | |
1175 | #t)))))) | |
1176 | (propagated-inputs `(("zlib" ,zlib))) | |
1177 | (home-page "http://www.cs.unc.edu/Research/compgeom/gzstream/") | |
1178 | (synopsis "Compressed C++ iostream") | |
1179 | (description "gzstream is a small library for providing zlib | |
1180 | functionality in a C++ iostream.") | |
1181 | (license license:lgpl2.1+))) | |
36df995c TGR |
1182 | |
1183 | (define-public zpaq | |
1184 | (package | |
1185 | (name "zpaq") | |
1186 | (version "7.15") | |
1187 | (source | |
1188 | (origin | |
1189 | (method url-fetch/zipbomb) | |
1190 | (uri (string-append "http://mattmahoney.net/dc/zpaq" | |
1191 | (string-delete #\. version) ".zip")) | |
1192 | (sha256 | |
1193 | (base32 | |
1194 | "066l94yyladlfzri877nh2dhkvspagjn3m5bmv725fmhkr9c4pp8")) | |
1195 | (modules '((guix build utils))) | |
1196 | (snippet | |
1197 | ;; Delete irrelevant pre-compiled binaries. | |
6cbee49d MW |
1198 | '(begin |
1199 | (for-each delete-file (find-files "." "\\.exe$")) | |
1200 | #t)))) | |
36df995c TGR |
1201 | (build-system gnu-build-system) |
1202 | (arguments | |
1203 | `(#:phases | |
1204 | (modify-phases %standard-phases | |
1205 | (delete 'configure)) ; no ‘configure’ script | |
1206 | #:make-flags | |
1207 | (list | |
1208 | (string-append "CPPFLAGS=-Dunix" | |
1209 | ,(match (or (%current-target-system) | |
1210 | (%current-system)) | |
1211 | ("x86_64-linux" "") | |
1212 | ("i686-linux" "") | |
1213 | (_ " -DNOJIT"))) | |
1214 | ;; These should be safe, lowest-common-denominator instruction sets, | |
1215 | ;; allowing for some optimisation while remaining reproducible. | |
effd7198 | 1216 | (string-append "CXXFLAGS=-O3 -DNDEBUG" |
36df995c TGR |
1217 | ,(match (or (%current-target-system) |
1218 | (%current-system)) | |
effd7198 EF |
1219 | ("x86_64-linux" " -march=nocona -mtune=generic") |
1220 | ("i686-linux" " -march=i686 -mtune=generic") | |
1221 | ("armhf-linux" " -mtune=generic-armv7-a") | |
36df995c TGR |
1222 | (_ ""))) |
1223 | (string-append "PREFIX=" | |
1224 | (assoc-ref %outputs "out"))))) | |
1225 | (native-inputs | |
1226 | `(("perl" ,perl))) ; for pod2man | |
1227 | (home-page "http://mattmahoney.net/dc/zpaq.html") | |
1228 | (synopsis "Incremental journaling archiver") | |
1229 | (description "ZPAQ is a command-line archiver for realistic situations with | |
1230 | many duplicate and already compressed files. It backs up only those files | |
1231 | modified since the last update. All previous versions remain untouched and can | |
1232 | be independently recovered. Identical files are only stored once (known as | |
1233 | @dfn{de-duplication}). Archives can also be encrypted. | |
1234 | ||
1235 | ZPAQ is intended to back up user data, not entire operating systems. It ignores | |
1236 | owner and group IDs, ACLs, extended attributes, or special file types like | |
1237 | devices, sockets, or named pipes. It does not follow or restore symbolic links | |
1238 | or junctions, and always follows hard links.") | |
1239 | (license (list license:public-domain | |
1240 | ;; libzpaq.cpp contains a mix of public-domain and | |
1241 | ;; expat-licenced (or ‘MIT’) code. | |
1242 | license:expat)))) | |
0da8313c | 1243 | |
9e6ada8f MR |
1244 | (define-public unshield |
1245 | (package | |
1246 | (name "unshield") | |
6cf48e8c | 1247 | (version "1.4.3") |
9e6ada8f | 1248 | (source |
298180cd EF |
1249 | (origin (method git-fetch) |
1250 | (uri (git-reference | |
1251 | (url "http://github.com/twogood/unshield.git") | |
1252 | (commit version))) | |
1253 | (file-name (git-file-name name version)) | |
9e6ada8f MR |
1254 | (sha256 |
1255 | (base32 | |
298180cd | 1256 | "19wn22vszhci8dfcixx5rliz7phx3lv5ablvhjlclvj75k2vsdqd")))) |
9e6ada8f MR |
1257 | (build-system cmake-build-system) |
1258 | (inputs | |
1259 | `(("zlib" ,zlib) | |
1260 | ("openssl" ,openssl) | |
6cf48e8c | 1261 | ;; Test data that is otherwise downloaded with curl. |
9e6ada8f MR |
1262 | ("unshield-avigomanager11b22.zip" |
1263 | ,(origin | |
1264 | (method url-fetch) | |
6cf48e8c TGR |
1265 | (uri (string-append |
1266 | "https://www.dropbox.com/s/8r4b6752swe3nhu/" | |
1267 | "unshield-avigomanager11b22.zip?dl=1")) | |
9e6ada8f MR |
1268 | (sha256 |
1269 | (base32 "0fwq7lih04if68wpwpsk5wjqyvh32db76a41sq6gbx4dn1lc3ddn")) | |
1270 | (file-name "unshield-avigomanager11b22.zip"))) | |
6cf48e8c TGR |
1271 | ("unshield-baldurs_gate_patch_v1_1_4315_international.zip" |
1272 | ,(origin | |
1273 | (method url-fetch) | |
1274 | (uri (string-append | |
1275 | "https://www.dropbox.com/s/9ruil8oi6amjbbk/" | |
1276 | "unshield-baldurs_gate_patch_v1_1_4315_international.zip?dl=1")) | |
1277 | (sha256 | |
1278 | (base32 "0spaxf6dardlhqxz3ys09fzamj007q3nfyw4xng6gh3qp9780maj")) | |
1279 | (file-name "unshield-baldurs_gate_patch_v1_1_4315_international.zip"))) | |
9e6ada8f MR |
1280 | ("unshield-the-feeble-files-spanish.zip" |
1281 | ,(origin | |
1282 | (method url-fetch) | |
6cf48e8c TGR |
1283 | (uri (string-append |
1284 | "https://www.dropbox.com/s/1ng0z9kfxc7eb1e/" | |
1285 | "unshield-the-feeble-files-spanish.zip?dl=1")) | |
9e6ada8f MR |
1286 | (sha256 |
1287 | (base32 "1k5cw6vnpja8yjlnhx5124xrw9i8s1l539hfdqqrqz3l5gn0bnyd")) | |
1288 | (file-name "unshield-the-feeble-files-spanish.zip"))))) | |
1289 | (native-inputs | |
1290 | `(("unzip" ,unzip))) | |
1291 | (arguments | |
1292 | `(#:out-of-source? #f | |
1293 | #:phases | |
1294 | (modify-phases %standard-phases | |
1295 | (add-before 'check 'pre-check | |
1296 | (lambda* (#:key inputs #:allow-other-keys) | |
1297 | (for-each (lambda (i) | |
1298 | (copy-file (assoc-ref inputs i) | |
1299 | (string-append "test/v0/" i))) | |
1300 | '("unshield-avigomanager11b22.zip" | |
6cf48e8c | 1301 | "unshield-baldurs_gate_patch_v1_1_4315_international.zip" |
9e6ada8f MR |
1302 | "unshield-the-feeble-files-spanish.zip")) |
1303 | (substitute* (find-files "test/" "/*\\.sh") | |
1304 | ;; Tests expect the unshield binary in a specific | |
1305 | ;; location. | |
1306 | (("/var/tmp/unshield/bin/unshield") | |
1307 | (string-append (getcwd) "/src/unshield")) | |
1308 | ;; We no longer need to download the data. | |
1309 | ((".?URL=.*$") "") | |
1310 | (("curl -(|f)sSL -o test.zip .*") "")) | |
1311 | (substitute* "test/v0/avigomanager.sh" | |
1312 | (("test.zip") | |
1313 | (string-append (getcwd) | |
6cf48e8c TGR |
1314 | "/test/v0/unshield-avigomanager11b22.zip"))) |
1315 | (substitute* "test/v0/baldurs_gate_patch_v1_1_4315_international.sh" | |
1316 | (("test.zip") | |
1317 | (string-append | |
1318 | (getcwd) | |
1319 | "/test/v0/unshield-baldurs_gate_patch_v1_1_4315_international.zip"))) | |
9e6ada8f MR |
1320 | (substitute* "test/v0/the-feeble-files-spanish.sh" |
1321 | (("test.zip") | |
1322 | (string-append (getcwd) | |
1323 | "/test/v0/unshield-the-feeble-files-spanish.zip"))) | |
1324 | #t)) | |
1325 | (replace 'check | |
1326 | (lambda _ | |
df04bd25 | 1327 | (invoke "./run-tests.sh")))))) |
9e6ada8f MR |
1328 | (home-page "https://github.com/twogood/unshield") |
1329 | (synopsis "Extract CAB files from InstallShield installers") | |
1330 | (description | |
1331 | "@command{unshield} is a tool and library for extracting @file{.cab} | |
1332 | archives from InstallShield installers.") | |
1333 | (license license:expat))) | |
1334 | ||
f6ac3101 TGR |
1335 | (define-public zstd |
1336 | (package | |
1337 | (name "zstd") | |
bfbc2d87 | 1338 | (version "1.4.2") |
3880537c TGR |
1339 | (source |
1340 | (origin | |
1341 | (method url-fetch) | |
1342 | (uri (string-append "https://github.com/facebook/zstd/releases/download/" | |
1343 | "v" version "/zstd-" version ".tar.gz")) | |
1344 | (sha256 | |
bfbc2d87 | 1345 | (base32 "1ja3nrjynmiwwdjrf6crraizkbagp7y414bqqq2ady91nn1hjwqj")))) |
f6ac3101 | 1346 | (build-system gnu-build-system) |
ec0de9d8 MB |
1347 | (outputs '("out" ;1.1MiB executables and documentation |
1348 | "lib" ;1MiB shared library and headers | |
1349 | "static")) ;1MiB static library | |
f6ac3101 TGR |
1350 | (arguments |
1351 | `(#:phases | |
1352 | (modify-phases %standard-phases | |
ec0de9d8 MB |
1353 | (delete 'configure) ;no configure script |
1354 | (add-after 'install 'adjust-library-locations | |
1355 | (lambda* (#:key outputs #:allow-other-keys) | |
1356 | (let* ((out (assoc-ref outputs "out")) | |
1357 | (lib (assoc-ref outputs "lib")) | |
1358 | (static (assoc-ref outputs "static")) | |
1359 | (shared-libs (string-append lib "/lib")) | |
1360 | (static-libs (string-append static "/lib"))) | |
1361 | ;; Move the static library to its own output to save ~1MiB. | |
1362 | (mkdir-p static-libs) | |
1363 | (for-each (lambda (ar) | |
1364 | (link ar (string-append static-libs "/" | |
1365 | (basename ar))) | |
1366 | (delete-file ar)) | |
1367 | (find-files shared-libs "\\.a$")) | |
1368 | ||
1369 | ;; While here, remove prefix= from the pkg-config file because it | |
1370 | ;; is unused, and because it contains a needless reference to $out. | |
1371 | ;; XXX: It would be great if #:disallow-references worked between | |
1372 | ;; outputs. | |
1373 | (substitute* (string-append shared-libs "/pkgconfig/libzstd.pc") | |
1374 | (("^prefix=.*") "")) | |
1375 | ||
1376 | #t)))) | |
f6ac3101 TGR |
1377 | #:make-flags |
1378 | (list "CC=gcc" | |
f45e314e | 1379 | (string-append "PREFIX=" (assoc-ref %outputs "out")) |
ec0de9d8 MB |
1380 | (string-append "LIBDIR=" (assoc-ref %outputs "lib") "/lib") |
1381 | (string-append "INCLUDEDIR=" (assoc-ref %outputs "lib") "/include") | |
f45e314e TGR |
1382 | ;; Skip auto-detection of, and creating a dependency on, the build |
1383 | ;; environment's ‘xz’ for what amounts to a dubious feature anyway. | |
1384 | "HAVE_LZMA=0" | |
1385 | ;; Not currently detected, but be explicit & avoid surprises later. | |
1386 | "HAVE_LZ4=0" | |
e8073063 | 1387 | "HAVE_ZLIB=0"))) |
2f325b63 | 1388 | (home-page "https://facebook.github.io/zstd/") |
f6ac3101 TGR |
1389 | (synopsis "Zstandard real-time compression algorithm") |
1390 | (description "Zstandard (@command{zstd}) is a lossless compression algorithm | |
1391 | that combines very fast operation with a compression ratio comparable to that of | |
1392 | zlib. In most scenarios, both compression and decompression can be performed in | |
1393 | ‘real time’. The compressor can be configured to provide the most suitable | |
1394 | trade-off between compression ratio and speed, without affecting decompression | |
1395 | speed.") | |
1396 | (license (list license:bsd-3 ; the main top-level LICENSE file | |
16123d1d | 1397 | license:bsd-2 ; many files explicitly state 2-Clause |
5a719dee | 1398 | license:gpl2 ; the main top-level COPYING file |
16123d1d TGR |
1399 | license:gpl3+ ; tests/gzip/*.sh |
1400 | license:expat ; lib/dictBuilder/divsufsort.[ch] | |
f6ac3101 TGR |
1401 | license:public-domain ; zlibWrapper/examples/fitblk* |
1402 | license:zlib)))) ; zlibWrapper/{gz*.c,gzguts.h} | |
0f03c531 TGR |
1403 | |
1404 | (define-public pzstd | |
1405 | (package | |
1406 | (name "pzstd") | |
1407 | (version (package-version zstd)) | |
1408 | (source (package-source zstd)) | |
1409 | (build-system gnu-build-system) | |
1410 | (native-inputs | |
c695fb76 | 1411 | `(("googletest" ,googletest))) |
0f03c531 TGR |
1412 | (arguments |
1413 | `(#:phases | |
1414 | (modify-phases %standard-phases | |
1415 | (add-after 'unpack 'enter-subdirectory | |
9f6f726c | 1416 | (lambda _ (chdir "contrib/pzstd") #t)) |
0f03c531 TGR |
1417 | (delete 'configure) ; no configure script |
1418 | (add-before 'check 'compile-tests | |
1419 | (lambda* (#:key make-flags #:allow-other-keys) | |
745e83ca | 1420 | (apply invoke "make" "tests" make-flags))) |
0f03c531 TGR |
1421 | (add-after 'install 'install-documentation |
1422 | (lambda* (#:key outputs #:allow-other-keys) | |
1423 | (let* ((out (assoc-ref outputs "out")) | |
1424 | (doc (string-append out "/share/doc/" ,name))) | |
1425 | (mkdir-p doc) | |
1426 | (install-file "README.md" doc) | |
1427 | #t)))) | |
1428 | #:make-flags | |
1429 | (list "CC=gcc" | |
1430 | (string-append "PREFIX=" (assoc-ref %outputs "out"))))) | |
1431 | (home-page (package-home-page zstd)) | |
1432 | (synopsis "Threaded implementation of the Zstandard compression algorithm") | |
1433 | (description "Parallel Zstandard (PZstandard or @command{pzstd}) is a | |
1434 | multi-threaded implementation of the @uref{http://zstd.net/, Zstandard | |
1435 | compression algorithm}. It is fully compatible with the original Zstandard file | |
1436 | format and command-line interface, and can be used as a drop-in replacement. | |
1437 | ||
1438 | Compression is distributed over multiple processor cores to improve performance, | |
1439 | as is the decompression of data compressed in this manner. Data compressed by | |
1440 | other implementations will only be decompressed by two threads: one performing | |
1441 | the actual decompression, the other input and output.") | |
1442 | (license (package-license zstd)))) | |
148585c2 AI |
1443 | |
1444 | (define-public zip | |
1445 | (package | |
1446 | (name "zip") | |
1447 | (version "3.0") | |
1448 | (source | |
1449 | (origin | |
1450 | (method url-fetch) | |
1451 | (uri (string-append "mirror://sourceforge/infozip" | |
1452 | "/Zip%203.x%20%28latest%29/3.0/zip30.tar.gz")) | |
1453 | (sha256 | |
1454 | (base32 | |
1455 | "0sb3h3067pzf3a7mlxn1hikpcjrsvycjcnj9hl9b1c3ykcgvps7h")))) | |
1456 | (build-system gnu-build-system) | |
1457 | (inputs `(("bzip2" ,bzip2))) | |
1458 | (arguments | |
1459 | `(#:tests? #f ; no test target | |
1460 | #:make-flags (let ((out (assoc-ref %outputs "out"))) | |
1461 | (list "-f" "unix/Makefile" | |
1462 | (string-append "prefix=" out) | |
1463 | (string-append "MANDIR=" out "/share/man/man1"))) | |
148585c2 AI |
1464 | #:phases |
1465 | (modify-phases %standard-phases | |
1466 | (replace 'build | |
1467 | (lambda* (#:key (make-flags '()) #:allow-other-keys) | |
b0559d24 | 1468 | (apply invoke "make" "generic_gcc" make-flags))) |
148585c2 AI |
1469 | (delete 'configure)))) |
1470 | (home-page "http://www.info-zip.org/Zip.html") | |
1471 | (synopsis "Compression and file packing utility") | |
1472 | (description | |
1473 | "Zip is a compression and file packaging/archive utility. Zip is useful | |
1474 | for packaging a set of files for distribution, for archiving files, and for | |
1475 | saving disk space by temporarily compressing unused files or directories. | |
1476 | Zip puts one or more compressed files into a single ZIP archive, along with | |
1477 | information about the files (name, path, date, time of last modification, | |
1478 | protection, and check information to verify file integrity). An entire | |
1479 | directory structure can be packed into a ZIP archive with a single command. | |
1480 | ||
1481 | Zip has one compression method (deflation) and can also store files without | |
1482 | compression. Zip automatically chooses the better of the two for each file. | |
1483 | Compression ratios of 2:1 to 3:1 are common for text files.") | |
1484 | (license (license:non-copyleft "file://LICENSE" | |
1485 | "See LICENSE in the distribution.")))) | |
1486 | ||
1487 | (define-public unzip | |
1488 | (package (inherit zip) | |
1489 | (name "unzip") | |
1490 | (version "6.0") | |
1491 | (source | |
1492 | (origin | |
1493 | (method url-fetch) | |
1494 | (uri (string-append "mirror://sourceforge/infozip" | |
1495 | "/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz")) | |
1496 | (sha256 | |
1497 | (base32 | |
1498 | "0dxx11knh3nk95p2gg2ak777dd11pr7jx5das2g49l262scrcv83")) | |
1499 | (patches (search-patches "unzip-CVE-2014-8139.patch" | |
1500 | "unzip-CVE-2014-8140.patch" | |
1501 | "unzip-CVE-2014-8141.patch" | |
1502 | "unzip-CVE-2014-9636.patch" | |
1503 | "unzip-CVE-2015-7696.patch" | |
1504 | "unzip-CVE-2015-7697.patch" | |
1505 | "unzip-allow-greater-hostver-values.patch" | |
1506 | "unzip-initialize-symlink-flag.patch" | |
1507 | "unzip-remove-build-date.patch" | |
1508 | "unzip-attribs-overflow.patch" | |
1509 | "unzip-overflow-on-invalid-input.patch" | |
1510 | "unzip-format-secure.patch" | |
1511 | "unzip-overflow-long-fsize.patch")))) | |
1512 | (build-system gnu-build-system) | |
1513 | ;; no inputs; bzip2 is not supported, since not compiled with BZ_NO_STDIO | |
1514 | (arguments | |
1515 | `(#:phases (modify-phases %standard-phases | |
1516 | (delete 'configure) | |
190376a1 MW |
1517 | (add-after 'unpack 'fortify |
1518 | (lambda _ | |
1519 | ;; Mitigate CVE-2018-1000035, an exploitable buffer overflow. | |
1520 | ;; This environment variable is recommended in 'unix/Makefile' | |
1521 | ;; for passing flags to the C compiler. | |
1522 | (setenv "LOCAL_UNZIP" "-D_FORTIFY_SOURCE=1") | |
1523 | #t)) | |
148585c2 AI |
1524 | (replace 'build |
1525 | (lambda* (#:key make-flags #:allow-other-keys) | |
fa76696b MW |
1526 | (apply invoke "make" |
1527 | `("-j" ,(number->string | |
1528 | (parallel-job-count)) | |
1529 | ,@make-flags | |
1530 | "generic_gcc"))))) | |
148585c2 AI |
1531 | #:make-flags (list "-f" "unix/Makefile" |
1532 | (string-append "prefix=" %output) | |
1533 | (string-append "MANDIR=" %output "/share/man/man1")))) | |
1534 | (home-page "http://www.info-zip.org/UnZip.html") | |
1535 | (synopsis "Decompression and file extraction utility") | |
1536 | (description | |
1537 | "UnZip is an extraction utility for archives compressed in .zip format, | |
1538 | also called \"zipfiles\". | |
1539 | ||
1540 | UnZip lists, tests, or extracts files from a .zip archive. The default | |
1541 | behaviour (with no options) is to extract into the current directory, and | |
1542 | subdirectories below it, all files from the specified zipfile. UnZip | |
1543 | recreates the stored directory structure by default.") | |
1544 | (license (license:non-copyleft "file://LICENSE" | |
1545 | "See LICENSE in the distribution.")))) | |
1546 | ||
1547 | (define-public zziplib | |
1548 | (package | |
1549 | (name "zziplib") | |
3f986ff6 | 1550 | (version "0.13.69") |
790b66e3 | 1551 | (replacement zziplib/fixed) |
3f986ff6 | 1552 | (home-page "https://github.com/gdraheim/zziplib") |
d0a52e65 MB |
1553 | (source (origin |
1554 | (method git-fetch) | |
1555 | (uri (git-reference (url home-page) | |
1556 | (commit (string-append "v" version)))) | |
1557 | (file-name (git-file-name name version)) | |
1558 | (sha256 | |
1559 | (base32 | |
1560 | "0fbk9k7ryas2wh2ykwkvm1pbi40i88rfvc3dydh9xyd7w2jcki92")))) | |
148585c2 | 1561 | (build-system gnu-build-system) |
d0a52e65 MB |
1562 | (arguments |
1563 | `(#:phases (modify-phases %standard-phases | |
1564 | (add-before 'check 'make-files-writable | |
1565 | (lambda _ | |
1566 | (for-each make-file-writable | |
1567 | (find-files "test" #:directories? #t)) | |
b0dc2454 MB |
1568 | #t))) |
1569 | ||
1570 | ;; XXX: The default test target attempts to download external resources and | |
1571 | ;; fails without error: <https://github.com/gdraheim/zziplib/issues/53>. | |
1572 | ;; To prevent confusing log messages, just run a simple zip test that works. | |
1573 | #:test-target "check-readme")) | |
148585c2 AI |
1574 | (inputs |
1575 | `(("zlib" ,zlib))) | |
1576 | (native-inputs `(("perl" ,perl) ; for the documentation | |
1577 | ("pkg-config" ,pkg-config) | |
1578 | ;; for the documentation; Python 3 not supported, | |
1579 | ;; http://forums.gentoo.org/viewtopic-t-863161-start-0.html | |
1580 | ("python" ,python-2) | |
1581 | ("zip" ,zip))) ; to create test files | |
148585c2 AI |
1582 | (synopsis "Library for accessing zip files") |
1583 | (description | |
1584 | "ZZipLib is a library based on zlib for accessing zip files.") | |
0d729c5b MB |
1585 | ;; zziplib is dual licensed under LGPL2.0+ and MPL1.1. Some example source |
1586 | ;; files carry the Zlib license; see "docs/copying.html" for details. | |
1587 | (license (list license:lgpl2.0+ license:mpl1.1)))) | |
148585c2 | 1588 | |
790b66e3 EF |
1589 | (define zziplib/fixed |
1590 | (package | |
1591 | (inherit zziplib) | |
1592 | (source (origin | |
1593 | (inherit (package-source zziplib)) | |
1594 | (patches (search-patches "zziplib-CVE-2018-16548.patch")))))) | |
1595 | ||
06de4aaf TF |
1596 | (define-public libzip |
1597 | (package | |
1598 | (name "libzip") | |
dcc3f215 | 1599 | (version "1.6.1") |
06de4aaf TF |
1600 | (source (origin |
1601 | (method url-fetch) | |
1602 | (uri (string-append | |
66fea0c4 | 1603 | "https://libzip.org/download/libzip-" version ".tar.xz")) |
06de4aaf TF |
1604 | (sha256 |
1605 | (base32 | |
dcc3f215 | 1606 | "0h9nsgkw0dk4srsvmz6xy6f9l4h815xn07j8h40l8gqvcxxaqpbh")))) |
06de4aaf TF |
1607 | (native-inputs |
1608 | `(("perl" ,perl))) | |
1609 | (inputs | |
a9b15d4c | 1610 | `(("gnutls" ,gnutls) |
dcc3f215 | 1611 | ("liblzma" ,xz) |
a9b15d4c BH |
1612 | ("openssl" ,openssl) |
1613 | ("zlib" ,zlib))) | |
80486319 | 1614 | (build-system cmake-build-system) |
8d6c7456 | 1615 | (home-page "https://libzip.org") |
06de4aaf TF |
1616 | (synopsis "C library for reading, creating, and modifying zip archives") |
1617 | (description "Libzip is a C library for reading, creating, and modifying | |
1618 | zip archives. Files can be added from data buffers, files, or compressed data | |
1619 | copied directly from other zip archives. Changes made without closing the | |
1620 | archive can be reverted.") | |
1621 | (license license:bsd-3))) | |
ef5c40aa SR |
1622 | |
1623 | (define-public atool | |
1624 | (package | |
1625 | (name "atool") | |
1626 | (version "0.39.0") | |
1627 | (source | |
1628 | (origin | |
1629 | (method url-fetch) | |
1630 | (uri (string-append "http://savannah.nongnu.org/download/atool/atool-" | |
1631 | version ".tar.gz")) | |
1632 | (sha256 | |
1633 | (base32 | |
1634 | "0fvhzip2v08jgnlfpyj6rapan39xlsl1ksgq4lp8gfsai2ah1xma")))) | |
1635 | (build-system gnu-build-system) | |
1636 | (arguments | |
1637 | `(#:phases | |
1638 | (modify-phases %standard-phases | |
1639 | (add-after 'unpack 'embed-absolute-file-name | |
1640 | (lambda* (#:key inputs #:allow-other-keys) | |
1641 | (substitute* "atool" | |
1642 | (("(^\\$::cfg_path_file.*= )'file'" _ pre) | |
1643 | (string-append pre "'" (assoc-ref inputs "file") | |
1644 | "/bin/file'"))) | |
1645 | #t))))) | |
1646 | (inputs | |
1647 | `(("perl" ,perl) | |
1648 | ("file" ,file))) | |
340978d7 | 1649 | (home-page "https://www.nongnu.org/atool/") |
ef5c40aa SR |
1650 | (synopsis "Universal tool to manage file archives of various types") |
1651 | (description "The main command is @command{aunpack} which extracts files | |
1652 | from an archive. The other commands provided are @command{apack} (to create | |
1653 | archives), @command{als} (to list files in archives), and @command{acat} (to | |
1654 | extract files to standard out). As @command{atool} invokes external programs | |
1655 | to handle the archives, not all commands may be supported for a certain type | |
1656 | of archives.") | |
1657 | (license license:gpl2+))) | |
b44ecca6 | 1658 | |
34e8cf22 TGR |
1659 | (define-public lunzip |
1660 | (package | |
1661 | (name "lunzip") | |
9f4f085f | 1662 | (version "1.11") |
34e8cf22 TGR |
1663 | (source |
1664 | (origin | |
1665 | (method url-fetch) | |
a28cd477 TGR |
1666 | (uri (string-append "mirror://savannah/lzip/lunzip/" |
1667 | "lunzip-" version ".tar.gz")) | |
34e8cf22 | 1668 | (sha256 |
9f4f085f | 1669 | (base32 "19zq3gmlbia2krq4k4zs1j0xjdv7nsdzqvfb0pyca5n53h2mzb91")))) |
34e8cf22 TGR |
1670 | (build-system gnu-build-system) |
1671 | (arguments | |
1672 | `(#:configure-flags | |
1673 | (list "CC=gcc"))) | |
340978d7 | 1674 | (home-page "https://www.nongnu.org/lzip/lunzip.html") |
34e8cf22 TGR |
1675 | (synopsis "Small, stand-alone lzip decompressor") |
1676 | (description | |
1677 | "Lunzip is a decompressor for files in the lzip compression format (.lz), | |
1678 | written as a single small C tool with no dependencies. This makes it | |
1679 | well-suited to embedded and other systems without a C++ compiler, or for use in | |
1680 | applications such as software installers that need only to decompress files, | |
1681 | not compress them. | |
1682 | Lunzip is intended to be fully compatible with the regular lzip package.") | |
1683 | (license (list license:bsd-2 ; carg_parser.[ch] | |
1684 | license:gpl2+)))) ; everything else | |
5dca4c76 TGR |
1685 | |
1686 | (define-public clzip | |
1687 | (package | |
1688 | (name "clzip") | |
11b1c71d | 1689 | (version "1.11") |
5dca4c76 TGR |
1690 | (source |
1691 | (origin | |
1692 | (method url-fetch) | |
39e5d3b6 TGR |
1693 | (uri (string-append "mirror://savannah/lzip/clzip/" |
1694 | "clzip-" version ".tar.gz")) | |
5dca4c76 | 1695 | (sha256 |
11b1c71d | 1696 | (base32 "1h14dmc9fi10gcdpdpbgq1bwvcxvivppilj64pf720x8mw915mfr")))) |
5dca4c76 TGR |
1697 | (build-system gnu-build-system) |
1698 | (arguments | |
1699 | `(#:configure-flags | |
1700 | (list "CC=gcc"))) | |
340978d7 | 1701 | (home-page "https://www.nongnu.org/lzip/clzip.html") |
5dca4c76 TGR |
1702 | (synopsis "Small, stand-alone lzip compressor and decompressor") |
1703 | (description | |
1704 | "Clzip is a compressor and decompressor for files in the lzip compression | |
1705 | format (.lz), written as a single small C tool with no dependencies. This makes | |
1706 | it well-suited to embedded and other systems without a C++ compiler, or for use | |
1707 | in other applications like package managers. | |
1708 | Clzip is intended to be fully compatible with the regular lzip package.") | |
1709 | (license (list license:bsd-2 ; carg_parser.[ch], lzd in clzip.texi | |
1710 | license:gpl2+)))) | |
2e3b1a92 TGR |
1711 | |
1712 | (define-public lzlib | |
1713 | (package | |
1714 | (name "lzlib") | |
29904223 | 1715 | (version "1.11") |
2e3b1a92 TGR |
1716 | (source |
1717 | (origin | |
1718 | (method url-fetch) | |
76b2f084 TGR |
1719 | (uri (string-append "mirror://savannah/lzip/lzlib/" |
1720 | "lzlib-" version ".tar.gz")) | |
2e3b1a92 | 1721 | (sha256 |
29904223 | 1722 | (base32 "0djdj4sg33rzi4k84cygvnp09bfsv6i8wy2k7i67rayib63myp3c")))) |
2e3b1a92 | 1723 | (build-system gnu-build-system) |
2e3b1a92 TGR |
1724 | (arguments |
1725 | `(#:configure-flags | |
1726 | (list "CC=gcc" | |
1727 | "--enable-shared"))) ; only static (.a) is built by default | |
340978d7 | 1728 | (home-page "https://www.nongnu.org/lzip/lzlib.html") |
2e3b1a92 TGR |
1729 | (synopsis "Lzip data compression C library") |
1730 | (description | |
1731 | "Lzlib is a C library for in-memory LZMA compression and decompression in | |
1732 | the lzip format. It supports integrity checking of the decompressed data, and | |
1733 | all functions are thread-safe. The library should never crash, even in case of | |
1734 | corrupted input.") | |
1735 | (license (list license:bsd-2 ; the library itself | |
1736 | license:gpl2+)))) ; main.c (i.e. minilzip used by tests) | |
8c4ca853 TGR |
1737 | |
1738 | (define-public plzip | |
1739 | (package | |
1740 | (name "plzip") | |
ff0e1eed | 1741 | (version "1.8") |
8c4ca853 TGR |
1742 | (source |
1743 | (origin | |
1744 | (method url-fetch) | |
894669a7 TGR |
1745 | (uri (string-append "mirror://savannah/lzip/plzip/" |
1746 | "plzip-" version ".tar.gz")) | |
8c4ca853 | 1747 | (sha256 |
ff0e1eed | 1748 | (base32 "04indil809qgfmz776imb3dnhkysh7zk28jcv3mw0ahl2lyaxbzd")))) |
8c4ca853 TGR |
1749 | (build-system gnu-build-system) |
1750 | (inputs | |
1751 | `(("lzlib" ,lzlib))) | |
340978d7 | 1752 | (home-page "https://www.nongnu.org/lzip/plzip.html") |
8c4ca853 TGR |
1753 | (synopsis "Parallel lossless data compressor for the lzip format") |
1754 | (description | |
1755 | "Plzip is a massively parallel (multi-threaded) lossless data compressor | |
1756 | and decompressor that uses the lzip file format (.lz). Files produced by plzip | |
1757 | are fully compatible with lzip and can be rescued with lziprecover. | |
1758 | On multiprocessor machines, plzip can compress and decompress large files much | |
1759 | faster than lzip, at the cost of a slightly reduced compression ratio (0.4% to | |
1760 | 2%). The number of usable threads is limited by file size: on files of only a | |
1761 | few MiB, plzip is no faster than lzip. | |
1762 | Files that were compressed with regular lzip will also not be decompressed | |
1763 | faster by plzip, unless the @code{-b} option was used: lzip usually produces | |
1764 | single-member files which can't be decompressed in parallel.") | |
1765 | (license (list license:bsd-2 ; arg_parser.{cc,h} | |
1766 | license:gpl2+)))) ; everything else | |
e294c05e RH |
1767 | |
1768 | (define-public innoextract | |
1769 | (package | |
1770 | (name "innoextract") | |
46b0136e | 1771 | (version "1.8") |
e294c05e RH |
1772 | (source |
1773 | (origin | |
1774 | (method url-fetch) | |
ff983864 EF |
1775 | (uri (string-append "https://github.com/dscharrer/innoextract/releases" |
1776 | "/download/" version | |
1777 | "/innoextract-" version ".tar.gz")) | |
e294c05e RH |
1778 | (sha256 |
1779 | (base32 | |
46b0136e | 1780 | "0saj50n8ds85shygy4mq1h6s99510r9wgjjdll4dmvhra4lzcy2y")))) |
e294c05e RH |
1781 | (build-system cmake-build-system) |
1782 | (arguments | |
4788c1ae | 1783 | `(#:tests? #f |
4788c1ae MB |
1784 | #:phases (modify-phases %standard-phases |
1785 | (add-before 'configure 'glibc-is-already-a-system-library | |
1786 | (lambda _ | |
1787 | ;; Prevent the build system from passing the glibc | |
1788 | ;; header files to GCC as "system headers", because | |
1789 | ;; it conflicts with the system headers already known | |
1790 | ;; to GCC, causing #include_next failures. | |
1791 | (substitute* "CMakeLists.txt" | |
1792 | (("include_directories\\(SYSTEM \\$\\{iconv") | |
1793 | "include_directories(${iconv")) | |
1794 | #t))))) | |
4cb9b726 | 1795 | (inputs `(("boost" ,boost) |
e294c05e RH |
1796 | ("libiconv" ,libiconv) |
1797 | ("xz" ,xz))) | |
1798 | (native-inputs `(("pkg-config" ,pkg-config))) | |
1799 | (home-page "https://constexpr.org/innoextract/") | |
1800 | (synopsis "Tool for extracting Inno Setup installers") | |
1801 | (description "innoextract allows extracting Inno Setup installers under | |
1802 | non-Windows systems without running the actual installer using wine.") | |
1803 | (license license:zlib))) | |
2ed0ef2f LF |
1804 | |
1805 | (define-public google-brotli | |
1806 | (package | |
1807 | (name "google-brotli") | |
598c2bbc | 1808 | (version "1.0.7") |
fc82c175 TGR |
1809 | (source |
1810 | (origin | |
1811 | (method git-fetch) | |
1812 | (uri (git-reference | |
1813 | (url "https://github.com/google/brotli.git") | |
1814 | (commit (string-append "v" version)))) | |
1815 | (file-name (git-file-name name version)) | |
1816 | (sha256 | |
598c2bbc | 1817 | (base32 "1811b55wdfg4kbsjcgh1kc938g118jpvif97ilgrmbls25dfpvvw")))) |
2ed0ef2f LF |
1818 | (build-system cmake-build-system) |
1819 | (arguments | |
1820 | `(#:phases | |
1821 | (modify-phases %standard-phases | |
1822 | (add-after 'install 'rename-static-libraries | |
1823 | ;; The build tools put a 'static' suffix on the static libraries, but | |
1824 | ;; other applications don't know how to find these. | |
1825 | (lambda* (#:key outputs #:allow-other-keys) | |
1826 | (let ((lib (string-append (assoc-ref %outputs "out") "/lib/"))) | |
1827 | (rename-file (string-append lib "libbrotlicommon-static.a") | |
1828 | (string-append lib "libbrotlicommon.a")) | |
1829 | (rename-file (string-append lib "libbrotlidec-static.a") | |
1830 | (string-append lib "libbrotlidec.a")) | |
1831 | (rename-file (string-append lib "libbrotlienc-static.a") | |
1832 | (string-append lib "libbrotlienc.a")) | |
1833 | #t)))) | |
1834 | #:configure-flags | |
1835 | (list ;; Defaults to "lib64" on 64-bit archs. | |
1836 | (string-append "-DCMAKE_INSTALL_LIBDIR=" | |
1837 | (assoc-ref %outputs "out") "/lib")))) | |
1838 | (home-page "https://github.com/google/brotli") | |
1839 | (synopsis "General-purpose lossless compression") | |
1840 | (description "This package provides the reference implementation of Brotli, | |
1841 | a generic-purpose lossless compression algorithm that compresses data using a | |
1842 | combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd | |
1843 | order context modeling, with a compression ratio comparable to the best | |
1844 | currently available general-purpose compression methods. It is similar in speed | |
1845 | with @code{deflate} but offers more dense compression. | |
1846 | ||
1847 | The specification of the Brotli Compressed Data Format is defined in RFC 7932.") | |
1848 | (license license:expat))) | |
71987177 | 1849 | |
83ac7cb4 LDB |
1850 | (define-public brotli |
1851 | ;; We used to provide an older version under the name "brotli". | |
1852 | (deprecated-package "brotli" google-brotli)) | |
1853 | ||
71987177 PN |
1854 | (define-public ucl |
1855 | (package | |
1856 | (name "ucl") | |
1857 | (version "1.03") | |
1858 | (source (origin | |
1859 | (method url-fetch) | |
01c8b90b | 1860 | (uri (string-append "https://www.oberhumer.com/opensource/" |
71987177 PN |
1861 | name "/download/" name "-" version ".tar.gz")) |
1862 | (sha256 | |
1863 | (base32 | |
1864 | "0j036lkwsxvm15gr29n8wn07cqq79dswjs9k54939ms5zngjjrdq")))) | |
1865 | (build-system gnu-build-system) | |
7349f926 MB |
1866 | (arguments |
1867 | `(;; UCL 1.03 fails to build with newer C standards. | |
41c27444 MB |
1868 | #:configure-flags '("CFLAGS=-std=gnu90" |
1869 | "--enable-shared" "--disable-static"))) | |
01c8b90b | 1870 | (home-page "https://www.oberhumer.com/opensource/ucl/") |
71987177 PN |
1871 | (synopsis "Portable lossless data compression library") |
1872 | (description "UCL implements a number of compression algorithms that | |
1873 | achieve an excellent compression ratio while allowing fast decompression. | |
1874 | Decompression requires no additional memory. | |
1875 | ||
1876 | Compared to LZO, the UCL algorithms achieve a better compression ratio but | |
1877 | decompression is a little bit slower.") | |
1878 | (license license:gpl2+))) | |
5735256d PN |
1879 | |
1880 | (define-public upx | |
1881 | (package | |
1882 | (name "upx") | |
f5255ed3 | 1883 | (version "3.96") |
5735256d PN |
1884 | (source (origin |
1885 | (method url-fetch) | |
1886 | (uri (string-append "https://github.com/upx/upx/releases/download/v" | |
de5bc83c | 1887 | version "/upx-" version "-src.tar.xz")) |
5735256d PN |
1888 | (sha256 |
1889 | (base32 | |
f5255ed3 | 1890 | "051pk5jk8fcfg5mpgzj43z5p4cn7jy5jbyshyn78dwjqr7slsxs7")))) |
5735256d | 1891 | (build-system gnu-build-system) |
d8963031 MB |
1892 | (native-inputs |
1893 | `(("perl" ,perl))) | |
1894 | (inputs | |
1895 | `(("ucl" ,ucl) | |
1896 | ("zlib" ,zlib))) | |
5735256d PN |
1897 | (arguments |
1898 | `(#:make-flags | |
f5255ed3 | 1899 | (list "all") |
5735256d PN |
1900 | #:phases |
1901 | (modify-phases %standard-phases | |
7046106e TGR |
1902 | (delete 'configure) ; no configure script |
1903 | (delete 'check) ; no test suite | |
5735256d PN |
1904 | (add-before 'build 'patch-exec-bin-sh |
1905 | (lambda _ | |
7046106e TGR |
1906 | (substitute* (list "Makefile" |
1907 | "src/Makefile") | |
5735256d PN |
1908 | (("/bin/sh") (which "sh"))) |
1909 | #t)) | |
7046106e | 1910 | (replace 'install |
5735256d PN |
1911 | (lambda* (#:key outputs #:allow-other-keys) |
1912 | (let* ((out (assoc-ref outputs "out")) | |
7046106e | 1913 | (bin (string-append out "/bin"))) |
5735256d PN |
1914 | (mkdir-p bin) |
1915 | (copy-file "src/upx.out" (string-append bin "/upx"))) | |
7046106e | 1916 | #t))))) |
5735256d PN |
1917 | (home-page "https://upx.github.io/") |
1918 | (synopsis "Compression tool for executables") | |
1919 | (description | |
1920 | "The Ultimate Packer for eXecutables (UPX) is an executable file | |
1921 | compressor. UPX typically reduces the file size of programs and shared | |
1922 | libraries by around 50%--70%, thus reducing disk space, network load times, | |
1923 | download times, and other distribution and storage costs.") | |
1924 | (license license:gpl2+))) | |
09debcf5 NG |
1925 | |
1926 | (define-public quazip | |
1927 | (package | |
1928 | (name "quazip") | |
1929 | (version "0.8.1") | |
1930 | (source (origin | |
1931 | (method git-fetch) | |
1932 | (uri (git-reference | |
1933 | (url "https://github.com/stachenov/quazip.git") | |
1934 | (commit (string-append "v" version)))) | |
1935 | (file-name (git-file-name name version)) | |
1936 | (sha256 | |
1937 | (base32 | |
1938 | "1g473gnsbkvxpsv8lbsmhspn7jnq86b05zzgqh11r581v8ndvz5s")))) | |
1939 | (build-system cmake-build-system) | |
1940 | (arguments | |
1941 | `(#:tests? #f)) ;no test | |
1942 | (native-inputs | |
1943 | `(("doxygen" ,doxygen))) | |
1944 | (inputs | |
1945 | `(("qtbase" ,qtbase) | |
1946 | ("zlib" ,zlib))) | |
1947 | (home-page "https://stachenov.github.io/quazip/index.html") | |
1948 | (synopsis "Qt/C++ wrapper for Minizip") | |
1949 | (description "QuaZIP is a simple C++ wrapper over Gilles Vollant's | |
1950 | ZIP/UNZIP package that can be used to access ZIP archives. It uses | |
1951 | Trolltech's Qt toolkit. | |
1952 | ||
1953 | QuaZIP allows you to access files inside ZIP archives using QIODevice | |
1954 | API, and that means that you can also use QTextStream, QDataStream or | |
1955 | whatever you would like to use on your zipped files. | |
1956 | ||
1957 | QuaZIP provides complete abstraction of the ZIP/UNZIP API, for both | |
1958 | reading from and writing to ZIP archives. ") | |
1959 | ;; Project is distributed under LGPL, but "quazip/z*" "quazip/unzip.*" are | |
1960 | ;; distributed under zlib terms. | |
1961 | (license (list license:lgpl2.1+ license:zlib)))) | |
f5111b4d TGR |
1962 | |
1963 | (define-public zutils | |
1964 | (package | |
1965 | (name "zutils") | |
1966 | ;; Check and remove the lint-hidden-cve property when updating. | |
1967 | (version "1.8") | |
1968 | (source | |
1969 | (origin | |
1970 | (method url-fetch) | |
1971 | (uri (string-append "mirror://savannah/zutils/zutils-" version ".tar.lz")) | |
1972 | (sha256 | |
1973 | (base32 "0dx35mv78fgqgz6sszs05ng8ipz2xy09ry9vpmka2rmy08b7x907")))) | |
1974 | (build-system gnu-build-system) | |
1975 | (arguments | |
1976 | `(#:configure-flags | |
1977 | (list "--sysconfdir=/etc") | |
1978 | #:phases | |
1979 | (modify-phases %standard-phases | |
1980 | (replace 'install | |
1981 | (lambda* (#:key make-flags outputs #:allow-other-keys) | |
1982 | (apply invoke "make" "install" | |
1983 | (string-append "sysconfdir=" (assoc-ref outputs "out") | |
1984 | "/etc") | |
1985 | make-flags)))))) | |
1986 | (native-inputs | |
1987 | ;; Needed to extract the source tarball and run the test suite. | |
1988 | `(("lzip" ,lzip))) | |
1989 | (properties `((lint-hidden-cve . ("CVE-2018-1000637")))) | |
1990 | (home-page "https://www.nongnu.org/zutils/zutils.html") | |
1991 | (synopsis "Utilities that transparently operate on compressed files") | |
1992 | (description | |
1993 | "Zutils is a collection of utilities able to process any combination of | |
1994 | compressed and uncompressed files transparently. If any given file, including | |
1995 | standard input, is compressed, its decompressed content is used instead. | |
1996 | ||
1997 | @command{zcat}, @command{zcmp}, @command{zdiff}, and @command{zgrep} are | |
1998 | improved replacements for the shell scripts provided by GNU gzip. | |
1999 | @command{ztest} tests the integrity of supported compressed files. | |
2000 | @command{zupdate} recompresses files with lzip, similar to gzip's | |
2001 | @command{znew}. | |
2002 | ||
2003 | Supported compression formats are bzip2, gzip, lzip, and xz. Zutils uses | |
2004 | external compressors: the compressor to be used for each format is configurable | |
2005 | at run time, and must be installed separately.") | |
2006 | (license (list license:bsd-2 ; arg_parser.{cc,h} | |
2007 | license:gpl2+)))) ; the rest | |
8ff5c735 PN |
2008 | |
2009 | (define-public makeself-safeextract | |
2010 | (let ((commit "1a95e121fa8e3c02d307ae37b9b7834e616c3683")) | |
2011 | (package | |
2012 | (name "makeself-safeextract") | |
2013 | (version (git-version "0.0.0" "1" commit)) | |
2014 | (home-page "https://github.com/ssokolow/makeself_safeextract") | |
2015 | (source | |
2016 | (origin | |
2017 | (method git-fetch) | |
2018 | (uri (git-reference | |
2019 | (url home-page) | |
2020 | (commit commit))) | |
2021 | (file-name (git-file-name name version)) | |
2022 | (sha256 | |
2023 | (base32 | |
2024 | "1anlinaj9lvfi8bn00wp11vzqq0f9sig4fm9yrspisx31v0z4a2c")))) | |
2025 | (build-system trivial-build-system) | |
2026 | (inputs | |
2027 | `(("python" ,python-2) | |
2028 | ("p7zip" ,p7zip) | |
2029 | ("unzip" ,unzip))) | |
2030 | (arguments | |
2031 | `(#:modules ((guix build utils)) | |
2032 | #:builder | |
2033 | (begin | |
2034 | (use-modules (guix build utils)) | |
2035 | (let* ((name "makeself_safeextract") | |
2036 | (source (string-append (assoc-ref %build-inputs "source") | |
2037 | "/" name ".py")) | |
2038 | (bin (string-append (assoc-ref %outputs "out") "/bin")) | |
2039 | (target (string-append bin "/" name)) | |
2040 | (python (string-append (assoc-ref %build-inputs "python") "/bin")) | |
2041 | (7z (string-append (assoc-ref %build-inputs "p7zip") "/bin/7z")) | |
2042 | (unzip (string-append (assoc-ref %build-inputs "unzip") "/bin/unzip"))) | |
2043 | (setenv "PATH" (string-append (getenv "PATH") ":" python)) | |
2044 | (mkdir-p bin) | |
2045 | (copy-file source target) | |
2046 | (substitute* target | |
2047 | (("'7z'") (format #f "'~a'" 7z)) | |
2048 | (("'unzip'") (format #f "'~a'" unzip))) | |
2049 | (patch-shebang target))))) | |
2050 | (synopsis "Extract makeself and mojo archives without running untrusted code") | |
2051 | (description "This package provides a script to unpack self-extracting | |
2052 | archives generated by @command{makeself} or @command{mojo} without running the | |
2053 | possibly untrusted extraction shell script.") | |
2054 | (license license:gpl3+)))) | |
9720104c JN |
2055 | |
2056 | (define-public ncompress | |
2057 | (package | |
2058 | (name "ncompress") | |
f38eabe9 | 2059 | (version "4.2.4.6") |
9720104c JN |
2060 | (source (origin |
2061 | (method git-fetch) | |
2062 | (uri (git-reference | |
2063 | (url "https://github.com/vapier/ncompress") | |
2064 | (commit (string-append "v" version)))) | |
2065 | (patches (search-patches "ncompress-fix-softlinks.patch")) | |
2066 | (file-name (string-append name "-" version ".tar.gz")) | |
2067 | (sha256 | |
2068 | (base32 | |
f38eabe9 | 2069 | "1a4yir1ilafz0nzxdwigj204j4yy2zljbc501nsaqqm3dxdap8zn")))) |
9720104c JN |
2070 | (arguments |
2071 | '(#:make-flags (list "CC=gcc" | |
2072 | (string-append "BINDIR=" %output "/bin") | |
2073 | (string-append "MANDIR=" %output "/share/man/man1")) | |
2074 | #:phases (modify-phases %standard-phases | |
2075 | (delete 'configure)))) | |
2076 | (build-system gnu-build-system) | |
2077 | (home-page "https://github.com/vapier/ncompress/") | |
2078 | (synopsis "Original Lempel-Ziv compress/uncompress programs") | |
2079 | (description "(N)compress provides the original compress and uncompress | |
2080 | programs that used to be the de facto UNIX standard for compressing and | |
2081 | uncompressing files. These programs implement a fast, simple Lempel-Ziv (LZW) | |
2082 | file compression algorithm.") | |
2083 | (license license:gpl2+))) |