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