Commit | Line | Data |
---|---|---|
233e7676 | 1 | ;;; GNU Guix --- Functional package management for GNU |
b2859a4f | 2 | ;;; Copyright © 2012, 2013, 2014, 2015, 2017 Ludovic Courtès <ludo@gnu.org> |
b357faac | 3 | ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> |
0a5c3087 | 4 | ;;; Copyright © 2014, 2015 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> |
2b8bea03 | 10 | ;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il> |
23f3cbb8 | 11 | ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com> |
3fd4b90d | 12 | ;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org> |
d5960bf7 | 13 | ;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr> |
e4c2136d | 14 | ;;; Copyright © 2016 David Craven <david@craven.ch> |
3c8ba11a | 15 | ;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net> |
618089f9 | 16 | ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com> |
4a78fd46 | 17 | ;;; Copyright © 2017 Nils Gillmann <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> |
71987177 | 25 | ;;; Copyright © 2018 Pierre Neidhardt <ambrevar@gmail.com> |
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) |
cea83466 | 48 | #:use-module (guix build-system ant) |
9e6ada8f | 49 | #:use-module (guix build-system cmake) |
b357faac | 50 | #:use-module (guix build-system gnu) |
73f542c3 | 51 | #:use-module (guix build-system perl) |
1ae60db8 | 52 | #:use-module (guix build-system python) |
e99dd67a | 53 | #:use-module (gnu packages) |
389eb3fa | 54 | #:use-module (gnu packages assembly) |
69d9792a | 55 | #:use-module (gnu packages autotools) |
23f3cbb8 | 56 | #:use-module (gnu packages backup) |
73f542c3 | 57 | #:use-module (gnu packages base) |
e294c05e | 58 | #:use-module (gnu packages boost) |
0f03c531 | 59 | #:use-module (gnu packages check) |
9e6ada8f | 60 | #:use-module (gnu packages curl) |
ef5c40aa | 61 | #:use-module (gnu packages file) |
cea83466 | 62 | #:use-module (gnu packages java) |
9869bb12 | 63 | #:use-module (gnu packages maths) |
646898b3 | 64 | #:use-module (gnu packages perl) |
d5960bf7 | 65 | #:use-module (gnu packages perl-check) |
23f3cbb8 | 66 | #:use-module (gnu packages pkg-config) |
1ae60db8 | 67 | #:use-module (gnu packages python) |
9e6ada8f | 68 | #:use-module (gnu packages tls) |
82aa2a28 | 69 | #:use-module (gnu packages valgrind) |
36df995c | 70 | #:use-module (ice-9 match) |
646898b3 | 71 | #:use-module ((srfi srfi-1) #:select (last))) |
a268f085 | 72 | |
6a92093d LC |
73 | (define-public zlib |
74 | (package | |
75 | (name "zlib") | |
2b8bea03 | 76 | (version "1.2.11") |
6a92093d LC |
77 | (source |
78 | (origin | |
87f5d366 | 79 | (method url-fetch) |
a67f97fe CR |
80 | (uri (list (string-append "http://zlib.net/zlib-" |
81 | version ".tar.gz") | |
b2859a4f LC |
82 | (string-append "mirror://sourceforge/libpng/zlib/" |
83 | version "/zlib-" version ".tar.gz"))) | |
6a92093d LC |
84 | (sha256 |
85 | (base32 | |
2b8bea03 | 86 | "18dighcs333gsvajvvgqp8l4cx7h1x7yx9gd5xacnk80spyykrf3")))) |
6a92093d LC |
87 | (build-system gnu-build-system) |
88 | (arguments | |
6cd00453 EF |
89 | `(#:phases |
90 | (modify-phases %standard-phases | |
91 | (replace 'configure | |
92 | (lambda* (#:key outputs #:allow-other-keys) | |
93 | ;; Zlib's home-made `configure' fails when passed | |
94 | ;; extra flags like `--enable-fast-install', so we need to | |
95 | ;; invoke it with just what it understand. | |
96 | (let ((out (assoc-ref outputs "out"))) | |
97 | ;; 'configure' doesn't understand '--host'. | |
98 | ,@(if (%current-target-system) | |
99 | `((setenv "CHOST" ,(%current-target-system))) | |
100 | '()) | |
101 | (zero? | |
102 | (system* "./configure" | |
103 | (string-append "--prefix=" out))))))))) | |
7f1773ea | 104 | (home-page "https://zlib.net/") |
35b9e423 | 105 | (synopsis "Compression library") |
6a92093d LC |
106 | (description |
107 | "zlib is designed to be a free, general-purpose, legally unencumbered -- | |
108 | that is, not covered by any patents -- lossless data-compression library for | |
109 | use on virtually any computer hardware and operating system. The zlib data | |
35b9e423 | 110 | format is itself portable across platforms. Unlike the LZW compression method |
6a92093d LC |
111 | used in Unix compress(1) and in the GIF image format, the compression method |
112 | currently used in zlib essentially never expands the data. (LZW can double or | |
113 | triple the file size in extreme cases.) zlib's memory footprint is also | |
114 | independent of the input data and can be reduced, if necessary, at some cost | |
115 | in compression.") | |
4a44e743 | 116 | (license license:zlib))) |
6a92093d | 117 | |
8298df96 MB |
118 | (define-public minizip |
119 | (package | |
120 | (name "minizip") | |
121 | (version (package-version zlib)) | |
122 | (source (package-source zlib)) | |
123 | (build-system gnu-build-system) | |
124 | (arguments | |
125 | `(#:phases | |
126 | (modify-phases %standard-phases | |
127 | (add-after 'unpack 'enter-source | |
128 | (lambda _ (chdir "contrib/minizip") #t)) | |
d10092b8 | 129 | (add-after 'enter-source 'autoreconf |
8298df96 MB |
130 | (lambda _ |
131 | (zero? (system* "autoreconf" "-vif"))))))) | |
132 | (native-inputs | |
133 | `(("autoconf" ,autoconf) | |
134 | ("automake" ,automake) | |
135 | ("libtool" ,libtool))) | |
136 | (propagated-inputs `(("zlib" ,zlib))) | |
137 | (home-page (package-home-page zlib)) | |
138 | (synopsis "Zip Compression library") | |
139 | (description | |
140 | "Minizip is a minimalistic library that supports compressing, | |
141 | extracting and viewing ZIP archives. This version is extracted from | |
142 | the @code{zlib} source.") | |
143 | (license (package-license zlib)))) | |
144 | ||
ee97be9f RW |
145 | (define-public fastjar |
146 | (package | |
147 | (name "fastjar") | |
148 | (version "0.98") | |
149 | (source (origin | |
150 | (method url-fetch) | |
151 | (uri (string-append "mirror://savannah/fastjar/fastjar-" | |
152 | version ".tar.gz")) | |
153 | (sha256 | |
154 | (base32 | |
155 | "0iginbz2m15hcsa3x4y7v3mhk54gr1r7m3ghx0pg4n46vv2snmpi")))) | |
156 | (build-system gnu-build-system) | |
157 | (inputs `(("zlib" ,zlib))) | |
340978d7 | 158 | (home-page "https://savannah.nongnu.org/projects/fastjar") |
ee97be9f RW |
159 | (synopsis "Replacement for Sun's 'jar' utility") |
160 | (description | |
161 | "FastJar is an attempt to create a much faster replacement for Sun's 'jar' | |
162 | utility. Instead of being written in Java, FastJar is written in C.") | |
163 | (license license:gpl2+))) | |
164 | ||
58593975 RW |
165 | (define-public libtar |
166 | (package | |
167 | (name "libtar") | |
89d80159 | 168 | (version "1.2.20") |
58593975 RW |
169 | (source (origin |
170 | (method url-fetch) | |
89d80159 EF |
171 | (uri (list |
172 | (string-append | |
173 | "ftp://ftp.feep.net/pub/software/libtar/libtar-" | |
174 | version ".tar.gz") | |
175 | (string-append | |
176 | "mirror://debian/pool/main/libt/libtar/libtar_" | |
177 | version ".orig.tar.gz"))) | |
58593975 RW |
178 | (sha256 |
179 | (base32 | |
e99dd67a EF |
180 | "02cihzl77ia0dcz7z2cga2412vyhhs5pa2355q4wpwbyga2lrwjh")) |
181 | (patches (search-patches "libtar-CVE-2013-4420.patch")))) | |
58593975 | 182 | (build-system gnu-build-system) |
89d80159 EF |
183 | (arguments |
184 | `(#:tests? #f ;no "check" target | |
185 | #:phases | |
186 | (modify-phases %standard-phases | |
187 | (add-after 'unpack 'autoconf | |
188 | (lambda _ (zero? (system* "sh" "autoreconf" "-vfi"))))))) | |
189 | (native-inputs | |
190 | `(("autoconf" ,autoconf) | |
191 | ("automake" ,automake) | |
192 | ("libtool" ,libtool))) | |
193 | (inputs | |
194 | `(("zlib" ,zlib))) | |
58593975 RW |
195 | (synopsis "C library for manipulating POSIX tar files") |
196 | (description | |
197 | "libtar is a C library for manipulating POSIX tar files. It handles | |
198 | adding and extracting files to/from a tar archive.") | |
89d80159 | 199 | (home-page "https://repo.or.cz/libtar.git") |
58593975 RW |
200 | (license license:bsd-3))) |
201 | ||
a268f085 LC |
202 | (define-public gzip |
203 | (package | |
204 | (name "gzip") | |
0bfb9b43 | 205 | (version "1.8") |
a268f085 | 206 | (source (origin |
87f5d366 | 207 | (method url-fetch) |
0db342a5 | 208 | (uri (string-append "mirror://gnu/gzip/gzip-" |
28181faf | 209 | version ".tar.xz")) |
a268f085 LC |
210 | (sha256 |
211 | (base32 | |
0bfb9b43 | 212 | "1lxv3p4iyx7833mlihkn5wfwmz4cys5nybwpz3dfawag8kn6f5zz")))) |
a268f085 | 213 | (build-system gnu-build-system) |
f50d2669 | 214 | (synopsis "General file (de)compression (using lzw)") |
a268f085 LC |
215 | (arguments |
216 | ;; FIXME: The test suite wants `less', and optionally Perl. | |
48623f5b RW |
217 | '(#:tests? #f |
218 | #:phases | |
219 | (modify-phases %standard-phases | |
220 | (add-after 'unpack 'use-absolute-name-of-gzip | |
221 | (lambda* (#:key outputs #:allow-other-keys) | |
222 | (substitute* "gunzip.in" | |
223 | (("exec gzip") | |
224 | (string-append "exec " (assoc-ref outputs "out") | |
225 | "/bin/gzip"))) | |
226 | #t))))) | |
a268f085 | 227 | (description |
79c311b8 LC |
228 | "GNU Gzip provides data compression and decompression utilities; the |
229 | typical extension is \".gz\". Unlike the \"zip\" format, it compresses a single | |
230 | file; as a result, it is often used in conjunction with \"tar\", resulting in | |
231 | \".tar.gz\" or \".tgz\", etc.") | |
4a44e743 | 232 | (license license:gpl3+) |
6fd52309 | 233 | (home-page "https://www.gnu.org/software/gzip/"))) |
a268f085 LC |
234 | |
235 | (define-public bzip2 | |
03bc86b8 CB |
236 | (package |
237 | (name "bzip2") | |
238 | (version "1.0.6") | |
239 | (source (origin | |
240 | (method url-fetch) | |
241 | (uri (string-append "http://www.bzip.org/" version "/bzip2-" | |
242 | version ".tar.gz")) | |
243 | (sha256 | |
244 | (base32 | |
245 | "1kfrc7f0ja9fdn6j1y6yir6li818npy6217hvr3wzmnmzhs8z152")))) | |
246 | (build-system gnu-build-system) | |
247 | (arguments | |
248 | `(#:modules ((guix build gnu-build-system) | |
249 | (guix build utils) | |
250 | (srfi srfi-1)) | |
251 | #:phases | |
252 | (modify-phases %standard-phases | |
253 | (replace 'configure | |
254 | (lambda* (#:key target #:allow-other-keys) | |
255 | (if ,(%current-target-system) | |
256 | ;; Cross-compilation: use the cross tools. | |
257 | (substitute* (find-files "." "Makefile") | |
258 | (("CC=.*$") | |
259 | (string-append "CC = " target "-gcc\n")) | |
260 | (("AR=.*$") | |
261 | (string-append "AR = " target "-ar\n")) | |
262 | (("RANLIB=.*$") | |
263 | (string-append "RANLIB = " target "-ranlib\n")) | |
264 | (("^all:(.*)test" _ prerequisites) | |
265 | ;; Remove 'all' -> 'test' dependency. | |
266 | (string-append "all:" prerequisites "\n"))) | |
267 | #t))) | |
268 | (add-before 'build 'build-shared-lib | |
269 | (lambda* (#:key inputs #:allow-other-keys) | |
270 | (patch-makefile-SHELL "Makefile-libbz2_so") | |
271 | (zero? (system* "make" "-f" "Makefile-libbz2_so")))) | |
272 | (add-after 'install 'install-shared-lib | |
273 | (lambda* (#:key outputs #:allow-other-keys) | |
274 | (let* ((out (assoc-ref outputs "out")) | |
275 | (libdir (string-append out "/lib"))) | |
276 | (for-each (lambda (file) | |
277 | (let ((base (basename file))) | |
278 | (format #t "installing `~a' to `~a'~%" | |
279 | base libdir) | |
280 | (copy-file file | |
281 | (string-append libdir "/" base)))) | |
282 | (find-files "." "^libbz2\\.so"))) | |
e7ee50f2 CB |
283 | #t)) |
284 | (add-after 'install-shared-lib 'patch-scripts | |
285 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
286 | (let* ((out (assoc-ref outputs "out"))) | |
287 | (substitute* (string-append out "/bin/bzdiff") | |
288 | (("/bin/rm") "rm"))) | |
03bc86b8 | 289 | #t))) |
ab4fab19 | 290 | |
03bc86b8 CB |
291 | #:make-flags (list (string-append "PREFIX=" |
292 | (assoc-ref %outputs "out"))) | |
ab4fab19 | 293 | |
03bc86b8 CB |
294 | ;; Don't attempt to run the tests when cross-compiling. |
295 | ,@(if (%current-target-system) | |
296 | '(#:tests? #f) | |
297 | '()))) | |
298 | (synopsis "High-quality data compression program") | |
299 | (description | |
300 | "bzip2 is a freely available, patent free (see below), high-quality data | |
a268f085 LC |
301 | compressor. It typically compresses files to within 10% to 15% of the best |
302 | available techniques (the PPM family of statistical compressors), whilst | |
303 | being around twice as fast at compression and six times faster at | |
304 | decompression.") | |
03bc86b8 CB |
305 | (license (license:non-copyleft "file://LICENSE" |
306 | "See LICENSE in the distribution.")) | |
307 | (home-page "http://www.bzip.org/"))) | |
a268f085 | 308 | |
669b7b83 RW |
309 | (define-public lbzip2 |
310 | (package | |
311 | (name "lbzip2") | |
312 | (version "2.5") | |
313 | (source (origin | |
314 | (method url-fetch) | |
315 | (uri (string-append "http://archive.lbzip2.org/lbzip2-" | |
316 | version ".tar.gz")) | |
317 | (sha256 | |
318 | (base32 | |
319 | "1sahaqc5bw4i0iyri05syfza4ncf5cml89an033fspn97klmxis6")))) | |
320 | (build-system gnu-build-system) | |
321 | (synopsis "Parallel bzip2 compression utility") | |
322 | (description | |
323 | "lbzip2 is a multi-threaded compression utility with support for the | |
324 | bzip2 compressed file format. lbzip2 can process standard bz2 files in | |
325 | parallel. It uses POSIX threading model (pthreads), which allows it to take | |
326 | full advantage of symmetric multiprocessing (SMP) systems. It has been proven | |
327 | to scale linearly, even to over one hundred processor cores. lbzip2 is fully | |
328 | compatible with bzip2 – both at file format and command line level.") | |
329 | (home-page "http://www.lbzip2.org/") | |
330 | (license license:gpl3+))) | |
331 | ||
5d47eab0 EF |
332 | (define-public pbzip2 |
333 | (package | |
334 | (name "pbzip2") | |
bf867709 | 335 | (version "1.1.13") |
5d47eab0 EF |
336 | (source (origin |
337 | (method url-fetch) | |
21b2ec4d EF |
338 | (uri (string-append "https://launchpad.net/pbzip2/" |
339 | (version-major+minor version) "/" version | |
340 | "/+download/" name "-" version ".tar.gz")) | |
5d47eab0 EF |
341 | (sha256 |
342 | (base32 | |
bf867709 | 343 | "1rnvgcdixjzbrmcr1nv9b6ccrjfrhryaj7jwz28yxxv6lam3xlcg")))) |
5d47eab0 EF |
344 | (build-system gnu-build-system) |
345 | (inputs | |
b3546174 | 346 | `(("bzip2" ,bzip2))) |
5d47eab0 | 347 | (arguments |
bf867709 | 348 | `(#:tests? #f ; no tests |
5d47eab0 | 349 | #:phases (modify-phases %standard-phases |
bf867709 | 350 | (delete 'configure)) ; no configure script |
21b2ec4d | 351 | #:make-flags (list (string-append "PREFIX=" %output)))) |
5d47eab0 EF |
352 | (home-page "http://compression.ca/pbzip2/") |
353 | (synopsis "Parallel bzip2 implementation") | |
354 | (description | |
355 | "Pbzip2 is a parallel implementation of the bzip2 block-sorting file | |
356 | compressor that uses pthreads and achieves near-linear speedup on SMP machines. | |
21b2ec4d | 357 | The output of this version is fully compatible with bzip2 v1.0.2 (i.e. anything |
5d47eab0 EF |
358 | compressed with pbzip2 can be decompressed with bzip2).") |
359 | (license (license:non-copyleft "file://COPYING" | |
21b2ec4d | 360 | "See COPYING in the distribution.")))) |
5d47eab0 | 361 | |
a268f085 LC |
362 | (define-public xz |
363 | (package | |
364 | (name "xz") | |
2738dd99 | 365 | (version "5.2.3") |
a268f085 | 366 | (source (origin |
87f5d366 | 367 | (method url-fetch) |
52d76b64 LC |
368 | (uri (list (string-append "http://tukaani.org/xz/xz-" version |
369 | ".tar.gz") | |
370 | (string-append "http://multiprecision.org/guix/xz-" | |
371 | version ".tar.gz"))) | |
a268f085 LC |
372 | (sha256 |
373 | (base32 | |
2738dd99 | 374 | "1jr8pxnz55ifc8cvp3ivgl79ph9iik5aypsc9cma228aglsqp4ki")))) |
a268f085 | 375 | (build-system gnu-build-system) |
35b9e423 | 376 | (synopsis "General-purpose data compression") |
a268f085 LC |
377 | (description |
378 | "XZ Utils is free general-purpose data compression software with high | |
379 | compression ratio. XZ Utils were written for POSIX-like systems, but also | |
380 | work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils. | |
381 | ||
382 | The core of the XZ Utils compression code is based on LZMA SDK, but it has | |
383 | been modified quite a lot to be suitable for XZ Utils. The primary | |
384 | compression algorithm is currently LZMA2, which is used inside the .xz | |
385 | container format. With typical files, XZ Utils create 30 % smaller output | |
386 | than gzip and 15 % smaller output than bzip2.") | |
38bbd61d | 387 | (license (list license:gpl2+ license:lgpl2.1+)) ; bits of both |
58891850 | 388 | (home-page "https://tukaani.org/xz/"))) |
c6eac761 LC |
389 | |
390 | (define-public lzo | |
391 | (package | |
392 | (name "lzo") | |
7276eca4 | 393 | (version "2.10") |
c6eac761 LC |
394 | (source |
395 | (origin | |
396 | (method url-fetch) | |
397 | (uri (string-append "http://www.oberhumer.com/opensource/lzo/download/lzo-" | |
398 | version ".tar.gz")) | |
399 | (sha256 | |
400 | (base32 | |
7276eca4 | 401 | "0wm04519pd3g8hqpjqhfr72q8qmbiwqaxcs3cndny9h86aa95y60")))) |
c6eac761 | 402 | (build-system gnu-build-system) |
165fd9d5 | 403 | (arguments '(#:configure-flags '("--enable-shared"))) |
c6eac761 LC |
404 | (home-page "http://www.oberhumer.com/opensource/lzo") |
405 | (synopsis | |
e881752c | 406 | "Data compression library suitable for real-time data de-/compression") |
c6eac761 LC |
407 | (description |
408 | "LZO is a data compression library which is suitable for data | |
409 | de-/compression in real-time. This means it favours speed over | |
410 | compression ratio. | |
411 | ||
412 | LZO is written in ANSI C. Both the source code and the compressed data | |
413 | format are designed to be portable across platforms.") | |
4a44e743 | 414 | (license license:gpl2+))) |
0f323dad | 415 | |
1a0a5509 | 416 | (define-public python-lzo |
417 | (package | |
418 | (name "python-lzo") | |
419 | (version "1.11") | |
420 | (source | |
421 | (origin | |
422 | (method url-fetch) | |
423 | (uri (pypi-uri "python-lzo" version)) | |
424 | (sha256 | |
425 | (base32 | |
426 | "11p3ifg14p086byhhin6azx5svlkg8dzw2b5abixik97xd6fm81q")))) | |
427 | (build-system python-build-system) | |
428 | (arguments | |
429 | `(#:test-target "check" | |
430 | #:phases | |
431 | (modify-phases %standard-phases | |
432 | (add-after 'unpack 'patch-setuppy | |
433 | (lambda _ | |
434 | (substitute* "setup.py" | |
435 | (("include_dirs.append\\(.*\\)") | |
436 | (string-append "include_dirs.append('" | |
437 | (assoc-ref %build-inputs "lzo") | |
438 | "/include/lzo" | |
439 | "')"))) | |
440 | #t))))) | |
441 | (inputs | |
442 | `(("lzo" ,lzo))) | |
443 | (home-page "https://github.com/jd-boyd/python-lzo") | |
444 | (synopsis "Python bindings for the LZO data compression library") | |
445 | (description | |
446 | "Python-LZO provides Python bindings for LZO, i.e. you can access | |
447 | the LZO library from your Python scripts thereby compressing ordinary | |
448 | Python strings.") | |
449 | (license license:gpl2+))) | |
450 | ||
451 | (define-public python2-lzo | |
452 | (package-with-python2 python-lzo)) | |
453 | ||
a9f48ff0 EB |
454 | (define-public lzop |
455 | (package | |
456 | (name "lzop") | |
89d159fe | 457 | (version "1.04") |
a9f48ff0 EB |
458 | (source |
459 | (origin | |
460 | (method url-fetch) | |
461 | (uri (string-append "http://www.lzop.org/download/lzop-" | |
462 | version ".tar.gz")) | |
463 | (sha256 | |
464 | (base32 | |
89d159fe | 465 | "0h9gb8q7y54m9mvy3jvsmxf21yx8fc3ylzh418hgbbv0i8mbcwky")))) |
a9f48ff0 EB |
466 | (build-system gnu-build-system) |
467 | (inputs `(("lzo" ,lzo))) | |
6f465a51 | 468 | (home-page "https://www.lzop.org/") |
a9f48ff0 EB |
469 | (synopsis "Compress or expand files") |
470 | (description | |
471 | "Lzop is a file compressor which is very similar to gzip. Lzop uses the | |
472 | LZO data compression library for compression services, and its main advantages | |
473 | over gzip are much higher compression and decompression speed (at the cost of | |
474 | some compression ratio).") | |
475 | (license license:gpl2+))) | |
476 | ||
0f323dad LC |
477 | (define-public lzip |
478 | (package | |
479 | (name "lzip") | |
dac2a056 | 480 | (version "1.19") |
0f323dad LC |
481 | (source (origin |
482 | (method url-fetch) | |
483 | (uri (string-append "mirror://savannah/lzip/lzip-" | |
484 | version ".tar.gz")) | |
485 | (sha256 | |
486 | (base32 | |
dac2a056 | 487 | "1abbch762gv8rjr579q3qyyk6c80plklbv2mw4x0vg71dgsw9bgz")))) |
0f323dad | 488 | (build-system gnu-build-system) |
340978d7 | 489 | (home-page "https://www.nongnu.org/lzip/lzip.html") |
0f323dad LC |
490 | (synopsis "Lossless data compressor based on the LZMA algorithm") |
491 | (description | |
492 | "Lzip is a lossless data compressor with a user interface similar to the | |
493 | one of gzip or bzip2. Lzip decompresses almost as fast as gzip and compresses | |
0963e3e4 | 494 | more than bzip2, which makes it well-suited for software distribution and data |
0f323dad LC |
495 | archiving. Lzip is a clean implementation of the LZMA algorithm.") |
496 | (license license:gpl3+))) | |
b357faac | 497 | |
9d9fc399 TGR |
498 | (define-public lziprecover |
499 | (package | |
500 | (name "lziprecover") | |
910992e4 | 501 | (version "1.20") |
9d9fc399 TGR |
502 | (source (origin |
503 | (method url-fetch) | |
504 | (uri (string-append "mirror://savannah/lzip/" name "/" | |
505 | name "-" version ".tar.gz")) | |
506 | (sha256 | |
507 | (base32 | |
910992e4 | 508 | "0fpnmdxayvd1ff0rk9606dvr431ji6b1v71km4ww244rih1rmmzz")))) |
9d9fc399 | 509 | (build-system gnu-build-system) |
340978d7 | 510 | (home-page "https://www.nongnu.org/lzip/lziprecover.html") |
9d9fc399 TGR |
511 | (synopsis "Recover and decompress data from damaged lzip files") |
512 | (description | |
513 | "Lziprecover is a data recovery tool and decompressor for files in the lzip | |
514 | compressed data format (.lz). It can test the integrity of lzip files, extract | |
515 | data from damaged ones, and repair most files with small errors (up to one | |
516 | single-byte error per member) entirely. | |
517 | ||
518 | Lziprecover is not a replacement for regular backups, but a last line of defence | |
519 | when even the backups are corrupt. It can recover files by merging the good | |
520 | parts of two or more damaged copies, such as can be easily produced by running | |
521 | @command{ddrescue} on a failing device. | |
522 | ||
523 | This package also includes @command{unzcrash}, a tool to test the robustness of | |
524 | decompressors when faced with corrupted input.") | |
525 | (license (list license:bsd-2 ; arg_parser.{cc,h} | |
526 | license:gpl2+)))) ; everything else | |
527 | ||
b357faac AE |
528 | (define-public sharutils |
529 | (package | |
530 | (name "sharutils") | |
9a59ce24 | 531 | (version "4.15.2") |
b357faac AE |
532 | (source |
533 | (origin | |
534 | (method url-fetch) | |
535 | (uri (string-append "mirror://gnu/sharutils/sharutils-" | |
536 | version ".tar.xz")) | |
d0ee11b2 | 537 | (patches (search-patches "sharutils-CVE-2018-1000097.patch")) |
b357faac AE |
538 | (sha256 |
539 | (base32 | |
9a59ce24 | 540 | "16isapn8f39lnffc3dp4dan05b7x6mnc76v6q5nn8ysxvvvwy19b")))) |
b357faac AE |
541 | (build-system gnu-build-system) |
542 | (inputs | |
543 | `(("which" ,which))) | |
544 | (arguments | |
545 | `(#:phases | |
dc1d3cde KK |
546 | (modify-phases %standard-phases |
547 | (add-after 'patch-source-shebangs 'unpatch-source-shebang | |
548 | ;; revert the patch-shebang phase on a script which is | |
549 | ;; in fact test data | |
550 | (lambda _ | |
551 | (substitute* "tests/shar-1.ok" | |
552 | (((which "sh")) "/bin/sh")) | |
553 | #t))))) | |
6fd52309 | 554 | (home-page "https://www.gnu.org/software/sharutils/") |
b357faac AE |
555 | (synopsis "Archives in shell scripts, uuencode/uudecode") |
556 | (description | |
79c311b8 LC |
557 | "GNU sharutils is a package for creating and manipulating shell |
558 | archives that can be readily emailed. A shell archive is a file that can be | |
e881752c | 559 | processed by a Bourne-type shell to unpack the original collection of files. |
79c311b8 | 560 | This package is mostly for compatibility and historical interest.") |
b357faac | 561 | (license license:gpl3+))) |
28469ab0 | 562 | |
646898b3 RW |
563 | (define-public sfarklib |
564 | (package | |
565 | (name "sfarklib") | |
979f9e8a | 566 | (version "2.24") |
646898b3 | 567 | (source (origin |
979f9e8a RW |
568 | (method url-fetch) |
569 | (uri (string-append "https://github.com/raboof/sfArkLib/archive/" | |
570 | version ".tar.gz")) | |
571 | (file-name (string-append name "-" version ".tar.gz")) | |
646898b3 RW |
572 | (sha256 |
573 | (base32 | |
979f9e8a | 574 | "0bzs2d98rk1xw9qwpnc7gmlbxwmwc3dg1rpn310afy9pq1k9clzi")))) |
646898b3 RW |
575 | (build-system gnu-build-system) |
576 | (arguments | |
577 | `(#:tests? #f ;no "check" target | |
578 | #:phases | |
579 | (modify-phases %standard-phases | |
580 | (replace 'configure | |
581 | (lambda* (#:key outputs #:allow-other-keys) | |
582 | (substitute* "Makefile" | |
583 | (("/usr/local") (assoc-ref outputs "out"))) | |
584 | #t))))) | |
585 | (inputs | |
586 | `(("zlib" ,zlib))) | |
587 | (home-page "https://github.com/raboof/sfArkLib") | |
588 | (synopsis "Library for SoundFont decompression") | |
589 | (description | |
590 | "SfArkLib is a C++ library for decompressing SoundFont files compressed | |
591 | with the sfArk algorithm.") | |
592 | (license license:gpl3+))) | |
593 | ||
b5ad1659 | 594 | (define-public sfarkxtc |
698bd297 | 595 | (let ((commit "b5e0a2ba3921f019d74d4b92bd31c36dd19d2cf1")) |
b5ad1659 RW |
596 | (package |
597 | (name "sfarkxtc") | |
698bd297 | 598 | (version (string-take commit 10)) |
b5ad1659 RW |
599 | (source (origin |
600 | ;; There are no release tarballs, so we just fetch the latest | |
601 | ;; commit at this time. | |
602 | (method git-fetch) | |
603 | (uri (git-reference | |
604 | (url "https://github.com/raboof/sfarkxtc.git") | |
698bd297 | 605 | (commit commit))) |
eafe96ea | 606 | (file-name (git-file-name name version)) |
b5ad1659 RW |
607 | (sha256 |
608 | (base32 | |
609 | "0f5x6i46qfl6ry21s7g2p4sd4b2r1g4fb03yqi2vv4kq3saryhvj")))) | |
610 | (build-system gnu-build-system) | |
611 | (arguments | |
612 | `(#:tests? #f ;no "check" target | |
613 | #:phases | |
614 | (modify-phases %standard-phases | |
615 | (replace 'configure | |
616 | (lambda* (#:key outputs #:allow-other-keys) | |
617 | (substitute* "Makefile" | |
618 | (("/usr/local") (assoc-ref outputs "out"))) | |
619 | #t))))) | |
620 | (inputs | |
621 | `(("zlib" ,zlib) | |
622 | ("sfarklib" ,sfarklib))) | |
623 | (home-page "https://github.com/raboof/sfarkxtc") | |
624 | (synopsis "Basic sfArk decompressor") | |
625 | (description "SfArk extractor converts SoundFonts in the compressed legacy | |
626 | sfArk file format to the uncompressed sf2 format.") | |
698bd297 | 627 | (license license:gpl3+)))) |
b5ad1659 | 628 | |
27f76fe6 TUBK |
629 | (define-public libmspack |
630 | (package | |
631 | (name "libmspack") | |
9fa0c0e6 | 632 | (version "0.6") |
27f76fe6 TUBK |
633 | (source |
634 | (origin | |
635 | (method url-fetch) | |
636 | (uri (string-append "http://www.cabextract.org.uk/libmspack/libmspack-" | |
637 | version "alpha.tar.gz")) | |
638 | (sha256 | |
9fa0c0e6 | 639 | (base32 "08gr2pcinas6bdqz3k0286g5cnksmcx813skmdwyca6bmj1fxnqy")))) |
27f76fe6 TUBK |
640 | (build-system gnu-build-system) |
641 | (home-page "http://www.cabextract.org.uk/libmspack/") | |
642 | (synopsis "Compression tools for some formats used by Microsoft") | |
643 | (description | |
644 | "The purpose of libmspack is to provide both compression and | |
645 | decompression of some loosely related file formats used by Microsoft.") | |
646 | (license license:lgpl2.1+))) | |
73f542c3 EB |
647 | |
648 | (define-public perl-compress-raw-bzip2 | |
649 | (package | |
650 | (name "perl-compress-raw-bzip2") | |
df998130 | 651 | (version "2.081") |
73f542c3 EB |
652 | (source |
653 | (origin | |
654 | (method url-fetch) | |
655 | (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/" | |
656 | "Compress-Raw-Bzip2-" version ".tar.gz")) | |
657 | (sha256 | |
658 | (base32 | |
df998130 | 659 | "081mpkjy688lg48997fqh3d7ja12vazmz02fw84495civg4vb4l6")))) |
73f542c3 EB |
660 | (build-system perl-build-system) |
661 | ;; TODO: Use our bzip2 package. | |
662 | (home-page "http://search.cpan.org/dist/Compress-Raw-Bzip2") | |
663 | (synopsis "Low-level interface to bzip2 compression library") | |
664 | (description "This module provides a Perl interface to the bzip2 | |
665 | compression library.") | |
2f3108ad | 666 | (license license:perl-license))) |
8e18514a EB |
667 | |
668 | (define-public perl-compress-raw-zlib | |
669 | (package | |
670 | (name "perl-compress-raw-zlib") | |
e81400ce | 671 | (version "2.081") |
8e18514a EB |
672 | (source |
673 | (origin | |
674 | (method url-fetch) | |
675 | (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/" | |
676 | "Compress-Raw-Zlib-" version ".tar.gz")) | |
677 | (sha256 | |
678 | (base32 | |
e81400ce | 679 | "06rsm9ahp20xfyvd3jc69sd0k8vqysryxc6apzdbn96jbcsdwmp1")))) |
8e18514a EB |
680 | (build-system perl-build-system) |
681 | (inputs | |
682 | `(("zlib" ,zlib))) | |
683 | (arguments | |
684 | `(#:phases (modify-phases %standard-phases | |
685 | (add-before | |
40b084a3 | 686 | 'configure 'configure-zlib |
8e18514a EB |
687 | (lambda* (#:key inputs #:allow-other-keys) |
688 | (call-with-output-file "config.in" | |
689 | (lambda (port) | |
690 | (format port " | |
691 | BUILD_ZLIB = False | |
692 | INCLUDE = ~a/include | |
693 | LIB = ~:*~a/lib | |
694 | OLD_ZLIB = False | |
695 | GZIP_OS_CODE = AUTO_DETECT" | |
696 | (assoc-ref inputs "zlib"))))))))) | |
697 | (home-page "http://search.cpan.org/dist/Compress-Raw-Zlib") | |
698 | (synopsis "Low-level interface to zlib compression library") | |
699 | (description "This module provides a Perl interface to the zlib | |
700 | compression library.") | |
2f3108ad | 701 | (license license:perl-license))) |
8aaafd34 EB |
702 | |
703 | (define-public perl-io-compress | |
704 | (package | |
705 | (name "perl-io-compress") | |
bb034708 | 706 | (version "2.081") |
8aaafd34 EB |
707 | (source |
708 | (origin | |
709 | (method url-fetch) | |
710 | (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/" | |
711 | "IO-Compress-" version ".tar.gz")) | |
712 | (sha256 | |
713 | (base32 | |
bb034708 | 714 | "1na66ns1g3nni0m9q5494ym4swr21hfgpv88mw8wbj2daiswf4aj")))) |
8aaafd34 EB |
715 | (build-system perl-build-system) |
716 | (propagated-inputs | |
bb034708 TGR |
717 | `(("perl-compress-raw-zlib" ,perl-compress-raw-zlib) ; >=2.081 |
718 | ("perl-compress-raw-bzip2" ,perl-compress-raw-bzip2))) ; >=2.081 | |
8aaafd34 EB |
719 | (home-page "http://search.cpan.org/dist/IO-Compress") |
720 | (synopsis "IO Interface to compressed files/buffers") | |
721 | (description "IO-Compress provides a Perl interface to allow reading and | |
722 | writing of compressed data created with the zlib and bzip2 libraries.") | |
2f3108ad | 723 | (license license:perl-license))) |
82aa2a28 LF |
724 | |
725 | (define-public lz4 | |
726 | (package | |
727 | (name "lz4") | |
528d1292 | 728 | (version "1.8.1.2") |
82aa2a28 LF |
729 | (source |
730 | (origin | |
731 | (method url-fetch) | |
b496bfea | 732 | (uri (string-append "https://github.com/lz4/lz4/archive/" |
fc89cb69 | 733 | "v" version ".tar.gz")) |
82aa2a28 | 734 | (sha256 |
b496bfea | 735 | (base32 |
528d1292 | 736 | "1y93h6dyi3026gvpzdv310ldcylnnhwf32n75mdjf8x9fvkskwqj")) |
82aa2a28 LF |
737 | (file-name (string-append name "-" version ".tar.gz")))) |
738 | (build-system gnu-build-system) | |
fc89cb69 | 739 | (native-inputs `(("valgrind" ,valgrind))) ; for tests |
82aa2a28 LF |
740 | (arguments |
741 | `(#:test-target "test" | |
82aa2a28 | 742 | #:make-flags (list "CC=gcc" |
0dd6d21a | 743 | (string-append "prefix=" (assoc-ref %outputs "out"))) |
82aa2a28 | 744 | #:phases (modify-phases %standard-phases |
fc89cb69 | 745 | (delete 'configure)))) ; no configure script |
00d9124d | 746 | (home-page "http://www.lz4.org") |
82aa2a28 LF |
747 | (synopsis "Compression algorithm focused on speed") |
748 | (description "LZ4 is a lossless compression algorithm, providing | |
749 | compression speed at 400 MB/s per core (0.16 Bytes/cycle). It also features an | |
750 | extremely fast decoder, with speed in multiple GB/s per core (0.71 Bytes/cycle). | |
751 | A high compression derivative, called LZ4_HC, is also provided. It trades CPU | |
752 | time for compression ratio.") | |
b7585ca3 | 753 | ;; The libraries (lz4, lz4hc, and xxhash) are BSD licenced. The command |
82aa2a28 LF |
754 | ;; line interface programs (lz4, fullbench, fuzzer, datagen) are GPL2+. |
755 | (license (list license:bsd-2 license:gpl2+)))) | |
dd8d6d65 | 756 | |
1ae60db8 | 757 | (define-public python-lz4 |
758 | (package | |
759 | (name "python-lz4") | |
e9f6a935 | 760 | (version "0.10.1") |
1ae60db8 | 761 | (source |
762 | (origin | |
763 | (method url-fetch) | |
764 | (uri (pypi-uri "lz4" version)) | |
765 | (sha256 | |
766 | (base32 | |
e9f6a935 | 767 | "0ghv1xbaq693kgww1x9c22bplz479ls9szjsaa4ig778ls834hm0")))) |
1ae60db8 | 768 | (build-system python-build-system) |
769 | (native-inputs | |
e9f6a935 TGR |
770 | `(("python-nose" ,python-nose) |
771 | ("python-setuptools-scm" ,python-setuptools-scm))) | |
1ae60db8 | 772 | (home-page "https://github.com/python-lz4/python-lz4") |
b316caaa | 773 | (synopsis "LZ4 bindings for Python") |
1ae60db8 | 774 | (description |
775 | "This package provides python bindings for the lz4 compression library | |
776 | by Yann Collet. The project contains bindings for the LZ4 block format and | |
777 | the LZ4 frame format.") | |
778 | (license license:bsd-3))) | |
779 | ||
780 | (define-public python2-lz4 | |
781 | (package-with-python2 python-lz4)) | |
782 | ||
e7c76b06 RW |
783 | (define-public python-lzstring |
784 | (package | |
785 | (name "python-lzstring") | |
786 | (version "1.0.3") | |
787 | (source | |
788 | (origin | |
789 | (method url-fetch) | |
790 | (uri (pypi-uri "lzstring" version)) | |
791 | (sha256 | |
792 | (base32 | |
793 | "1d3ck454y41mii0gcjabpmp2skb7n0f9zk232gycqdv8z2jxakfm")))) | |
794 | (build-system python-build-system) | |
795 | (propagated-inputs | |
796 | `(("python-future" ,python-future))) | |
797 | (home-page "https://github.com/gkovacs/lz-string-python") | |
798 | (synopsis "String compression") | |
799 | (description "Lz-string is a string compressor library for Python.") | |
800 | (license license:expat))) | |
801 | ||
802 | (define-public python2-lzstring | |
803 | (package-with-python2 python-lzstring)) | |
804 | ||
dd8d6d65 SB |
805 | (define-public squashfs-tools |
806 | (package | |
807 | (name "squashfs-tools") | |
808 | (version "4.3") | |
809 | (source (origin | |
810 | (method url-fetch) | |
de67e922 LF |
811 | (uri (string-append "mirror://sourceforge/squashfs/squashfs/" |
812 | "squashfs" version "/" | |
dd8d6d65 SB |
813 | "squashfs" version ".tar.gz")) |
814 | (sha256 | |
815 | (base32 | |
816 | "1xpklm0y43nd9i6jw43y2xh5zvlmj9ar2rvknh0bh7kv8c95aq0d")))) | |
817 | (build-system gnu-build-system) | |
818 | (arguments | |
819 | '(#:tests? #f ; no check target | |
820 | #:make-flags | |
821 | (list "CC=gcc" | |
822 | "XZ_SUPPORT=1" | |
823 | "LZO_SUPPORT=1" | |
824 | "LZ4_SUPPORT=1" | |
825 | (string-append "INSTALL_DIR=" %output "/bin")) | |
826 | #:phases | |
827 | (modify-phases %standard-phases | |
828 | (replace 'configure | |
829 | (lambda _ | |
830 | (chdir "squashfs-tools")))))) | |
831 | (inputs | |
832 | `(("lz4" ,lz4) | |
833 | ("lzo" ,lzo) | |
834 | ("xz" ,xz) | |
835 | ("zlib" ,zlib))) | |
836 | (home-page "http://squashfs.sourceforge.net/") | |
8f65585b | 837 | (synopsis "Tools to create and extract squashfs file systems") |
dd8d6d65 | 838 | (description |
8f65585b | 839 | "Squashfs is a highly compressed read-only file system for Linux. It uses |
dd8d6d65 SB |
840 | zlib to compress files, inodes, and directories. All blocks are packed to |
841 | minimize the data overhead, and block sizes of between 4K and 1M are supported. | |
842 | It is intended to be used for archival use, for live CDs, and for embedded | |
843 | systems where low overhead is needed. This package allows you to create and | |
8f65585b | 844 | extract such file systems.") |
dd8d6d65 | 845 | (license license:gpl2+))) |
e580597d RW |
846 | |
847 | ;; We need this for building squashfs images with symlinks. | |
848 | (define-public squashfs-tools-next | |
849 | (let ((commit "fb33dfc32b131a1162dcf0e35bd88254ae10e265") | |
850 | (revision "1")) | |
851 | (package (inherit squashfs-tools) | |
852 | (name "squashfs-tools-next") | |
853 | (version (string-append "4.3-" revision (string-take commit 7))) | |
854 | (source (origin | |
855 | (method git-fetch) | |
856 | (uri (git-reference | |
857 | (url "https://github.com/plougher/squashfs-tools.git") | |
858 | (commit commit))) | |
859 | (file-name (git-file-name name version)) | |
860 | (sha256 | |
861 | (base32 | |
862 | "1x2skf8hxzfch978nzx5mh46d4hhi6gl22270hiarjszsjk3bnsx"))))))) | |
820dc3f5 JM |
863 | |
864 | (define-public pigz | |
865 | (package | |
866 | (name "pigz") | |
9dae73c3 | 867 | (version "2.4") |
820dc3f5 JM |
868 | (source (origin |
869 | (method url-fetch) | |
870 | (uri (string-append "http://zlib.net/pigz/" | |
871 | name "-" version ".tar.gz")) | |
872 | (sha256 | |
873 | (base32 | |
9dae73c3 | 874 | "0wsgw5vwl23jrnpsvd8v3xcp5k4waw5mk0164fynjhkv58i1dy54")))) |
820dc3f5 JM |
875 | (build-system gnu-build-system) |
876 | (arguments | |
877 | `(#:phases | |
878 | (modify-phases %standard-phases | |
879 | (delete 'configure) | |
880 | (replace 'install | |
881 | (lambda* (#:key outputs #:allow-other-keys) | |
882 | (let* ((out (assoc-ref outputs "out")) | |
883 | (bin (string-append out "/bin")) | |
884 | (man (string-append out "/share/man/man1"))) | |
885 | (install-file "pigz" bin) | |
886 | (symlink "pigz" (string-append bin "/unpigz")) | |
887 | (install-file "pigz.1" man) | |
888 | #t)))) | |
889 | #:make-flags (list "CC=gcc") | |
890 | #:test-target "tests")) | |
891 | (inputs `(("zlib" ,zlib))) | |
7f1773ea | 892 | (home-page "https://zlib.net/pigz/") |
820dc3f5 JM |
893 | (synopsis "Parallel implementation of gzip") |
894 | (description | |
895 | "This package provides a parallel implementation of gzip that exploits | |
896 | multiple processors and multiple cores when compressing data.") | |
897 | ||
898 | ;; Things under zopfli/ are under ASL2.0, but 4 files at the top-level, | |
899 | ;; written by Mark Adler, are under another non-copyleft license. | |
900 | (license license:asl2.0))) | |
23f3cbb8 BW |
901 | |
902 | (define-public pixz | |
903 | (package | |
904 | (name "pixz") | |
905 | (version "1.0.6") | |
906 | (source (origin | |
907 | (method url-fetch) | |
908 | (uri (string-append | |
909 | "https://github.com/vasi/pixz/releases/download/v" version | |
910 | "/pixz-" version ".tar.xz")) | |
911 | (sha256 | |
912 | (base32 | |
913 | "1s3j7zw6j5zi3fhdxg287ndr3wf6swac7z21mqd1pyiln530gi82")))) | |
914 | (build-system gnu-build-system) | |
915 | (native-inputs | |
916 | `(("pkg-config" ,pkg-config) | |
917 | ("libarchive" ,libarchive))) | |
918 | (home-page "https://github.com/vasi/pixz") | |
919 | (synopsis "Parallel indexing implementation of LZMA") | |
920 | (description | |
921 | "The existing XZ Utils provide great compression in the .xz file format, | |
922 | but they produce just one big block of compressed data. Pixz instead produces | |
923 | a collection of smaller blocks which makes random access to the original data | |
924 | possible and can compress in parallel. This is especially useful for large | |
925 | tarballs.") | |
926 | (license license:bsd-2))) | |
69d9792a EB |
927 | |
928 | (define-public brotli | |
929 | (let ((commit "e992cce7a174d6e2b3486616499d26bb0bad6448") | |
930 | (revision "1")) | |
931 | (package | |
932 | (name "brotli") | |
933 | (version (string-append "0.1-" revision "." | |
934 | (string-take commit 7))) | |
935 | (source (origin | |
936 | (method git-fetch) | |
937 | (uri (git-reference | |
938 | (url "https://github.com/bagder/libbrotli.git") | |
939 | (commit commit) | |
940 | (recursive? #t))) | |
941 | (file-name (string-append name "-" version ".tar.xz")) | |
942 | (sha256 | |
943 | (base32 | |
944 | "1qxxsasvwbbbh6dl3138y9h3fg0q2v7xdk5jjc690bdg7g1wrj6n")) | |
945 | (modules '((guix build utils))) | |
946 | (snippet | |
947 | ;; This is a recursive submodule that is unnecessary for this | |
948 | ;; package, so delete it. | |
949 | '(delete-file-recursively "brotli/terryfy")))) | |
950 | (build-system gnu-build-system) | |
951 | (native-inputs | |
952 | `(("autoconf" ,autoconf) | |
953 | ("automake" ,automake) | |
954 | ("libtool" ,libtool))) | |
955 | (arguments | |
956 | `(#:phases (modify-phases %standard-phases | |
957 | (add-after 'unpack 'autogen | |
958 | (lambda _ | |
959 | (mkdir "m4") | |
960 | (zero? (system* "autoreconf" "-vfi"))))))) | |
961 | (home-page "https://github.com/bagder/libbrotli/") | |
962 | (synopsis "Implementation of the Brotli compression algorithm") | |
963 | (description | |
964 | "Brotli is a general-purpose lossless compression algorithm. It is | |
965 | similar in speed to deflate but offers denser compression. This package | |
966 | provides encoder and a decoder libraries: libbrotlienc and libbrotlidec, | |
967 | respectively, based on the reference implementation from Google.") | |
968 | (license license:expat)))) | |
3fd4b90d DM |
969 | |
970 | (define-public cabextract | |
971 | (package | |
972 | (name "cabextract") | |
973 | (version "1.6") | |
974 | (source (origin | |
975 | (method url-fetch) | |
976 | (uri (string-append | |
977 | "http://cabextract.org.uk/cabextract-" version ".tar.gz")) | |
978 | (sha256 | |
979 | (base32 | |
980 | "1ysmmz25fjghq7mxb2anyyvr1ljxqxzi4piwjhk0sdamcnsn3rnf")))) | |
981 | (build-system gnu-build-system) | |
982 | (arguments '(#:configure-flags '("--with-external-libmspack"))) | |
983 | (native-inputs | |
984 | `(("pkg-config" ,pkg-config))) | |
985 | (inputs | |
986 | `(("libmspack" ,libmspack))) | |
987 | (home-page "http://www.cabextract.org.uk/") | |
988 | (synopsis "Tool to unpack Cabinet archives") | |
989 | (description "Extracts files out of Microsoft Cabinet (.cab) archives") | |
990 | ;; Some source files specify gpl2+, lgpl2+, however COPYING is gpl3. | |
991 | (license license:gpl3+))) | |
0b073506 TGR |
992 | |
993 | (define-public xdelta | |
994 | (package | |
995 | (name "xdelta") | |
996 | (version "3.1.0") | |
997 | (source | |
998 | (origin | |
999 | (method url-fetch) | |
1000 | (uri (string-append "https://github.com/jmacd/xdelta/archive/v" | |
1001 | version ".tar.gz")) | |
1002 | (sha256 | |
1003 | (base32 | |
1004 | "17g2pbbqy6h20qgdjq7ykib7kg5ajh8fwbsfgyjqg8pwg19wy5bm")) | |
1005 | (file-name (string-append name "-" version ".tar.gz")) | |
1006 | (snippet | |
1007 | ;; This file isn't freely distributable and has no effect on building. | |
1008 | '(delete-file "xdelta3/draft-korn-vcdiff.txt")))) | |
1009 | (build-system gnu-build-system) | |
1010 | (native-inputs | |
1011 | `(("autoconf" ,autoconf) | |
1012 | ("automake" ,automake))) | |
1013 | (arguments | |
1014 | `(#:phases | |
1015 | (modify-phases %standard-phases | |
1016 | (add-after 'unpack 'enter-build-directory | |
1017 | (lambda _ (chdir "xdelta3"))) | |
d10092b8 | 1018 | (add-after 'enter-build-directory 'autoconf |
0b073506 | 1019 | (lambda _ (zero? (system* "autoreconf" "-vfi"))))))) |
69b7fa3e | 1020 | (home-page "http://xdelta.org") |
0b073506 TGR |
1021 | (synopsis "Delta encoder for binary files") |
1022 | (description "xdelta encodes only the differences between two binary files | |
1023 | using the VCDIFF algorithm and patch file format described in RFC 3284. It can | |
1024 | also be used to apply such patches. xdelta is similar to @command{diff} and | |
1025 | @command{patch}, but is not limited to plain text and does not generate | |
1026 | human-readable output.") | |
1027 | (license license:asl2.0))) | |
389eb3fa TGR |
1028 | |
1029 | (define-public lrzip | |
1030 | (package | |
1031 | (name "lrzip") | |
666619d0 | 1032 | (version "0.631") |
389eb3fa TGR |
1033 | (source |
1034 | (origin | |
1035 | (method url-fetch) | |
1036 | (uri (string-append | |
1037 | "http://ck.kolivas.org/apps/lrzip/lrzip-" version ".tar.bz2")) | |
1038 | (sha256 | |
1039 | (base32 | |
5400fdfd TGR |
1040 | "0mb449vmmwpkalq732jdyginvql57nxyd31sszb108yps1lf448d")) |
1041 | (patches (search-patches "lrzip-CVE-2017-8842.patch")))) | |
389eb3fa TGR |
1042 | (build-system gnu-build-system) |
1043 | (native-inputs | |
1044 | `(;; nasm is only required when building for 32-bit x86 platforms | |
1045 | ,@(if (string-prefix? "i686" (or (%current-target-system) | |
1046 | (%current-system))) | |
1047 | `(("nasm" ,nasm)) | |
1048 | '()) | |
1049 | ("perl" ,perl))) | |
1050 | (inputs | |
1051 | `(("bzip2" ,bzip2) | |
1052 | ("lzo" ,lzo) | |
1053 | ("zlib" ,zlib))) | |
1054 | (home-page "http://ck.kolivas.org/apps/lrzip/") | |
1055 | (synopsis "Large file compressor with a very high compression ratio") | |
1056 | (description "lrzip is a compression utility that uses long-range | |
1057 | redundancy reduction to improve the subsequent compression ratio of | |
1058 | larger files. It can then further compress the result with the ZPAQ or | |
1059 | LZMA algorithms for maximum compression, or LZO for maximum speed. This | |
1060 | choice between size or speed allows for either better compression than | |
1061 | even LZMA can provide, or a higher speed than gzip while compressing as | |
1062 | well as bzip2.") | |
1063 | (license (list license:gpl3+ | |
1064 | license:public-domain)))) ; most files in lzma/ | |
e4c2136d | 1065 | |
9869bb12 JL |
1066 | (define-public bitshuffle |
1067 | (package | |
1068 | (name "bitshuffle") | |
6370fb2d | 1069 | (version "0.3.4") |
9869bb12 JL |
1070 | (source (origin |
1071 | (method url-fetch) | |
1072 | (uri (pypi-uri "bitshuffle" version)) | |
1073 | (sha256 | |
1074 | (base32 | |
6370fb2d | 1075 | "0ydawb01ghsvmw0lraczhrgvkjj97bpg98f1qqs1cnfp953mdd5v")))) |
9869bb12 JL |
1076 | (build-system python-build-system) |
1077 | (arguments | |
6370fb2d | 1078 | `(#:tests? #f)) ; fail: https://github.com/h5py/h5py/issues/769 |
9869bb12 JL |
1079 | (inputs |
1080 | `(("numpy" ,python-numpy) | |
1081 | ("h5py" ,python-h5py) | |
1082 | ("hdf5" ,hdf5))) | |
1083 | (native-inputs | |
1084 | `(("cython" ,python-cython))) | |
1085 | (home-page "https://github.com/kiyo-masui/bitshuffle") | |
1086 | (synopsis "Filter for improving compression of typed binary data") | |
1087 | (description "Bitshuffle is an algorithm that rearranges typed, binary data | |
1088 | for improving compression, as well as a python/C package that implements this | |
1089 | algorithm within the Numpy framework.") | |
1090 | (license license:expat))) | |
1091 | ||
e4c2136d DC |
1092 | (define-public snappy |
1093 | (package | |
1094 | (name "snappy") | |
5a437357 | 1095 | (version "1.1.7") |
e4c2136d DC |
1096 | (source (origin |
1097 | (method url-fetch) | |
5a437357 MB |
1098 | (uri (string-append "https://github.com/google/snappy/archive/" |
1099 | version ".tar.gz")) | |
1100 | (file-name (string-append "snappy-" version ".tar.gz")) | |
e4c2136d DC |
1101 | (sha256 |
1102 | (base32 | |
5a437357 MB |
1103 | "1m7rcdqzkys5lspj8jcsaah8w33zh28s771bw0ga2lgzfgl05yix")))) |
1104 | (build-system cmake-build-system) | |
1105 | (arguments | |
1106 | `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON"))) | |
e4c2136d DC |
1107 | (home-page "https://github.com/google/snappy") |
1108 | (synopsis "Fast compressor/decompressor") | |
5a437357 | 1109 | (description "Snappy is a compression/decompression library. It does not |
e4c2136d | 1110 | aim for maximum compression, or compatibility with any other compression library; |
5a437357 | 1111 | instead, it aims for very high speeds and reasonable compression. For instance, |
e4c2136d DC |
1112 | compared to the fastest mode of zlib, Snappy is an order of magnitude faster |
1113 | for most inputs, but the resulting compressed files are anywhere from 20% to | |
1114 | 100% bigger.") | |
1115 | (license license:asl2.0))) | |
adbd7faf | 1116 | |
cea83466 JL |
1117 | (define bitshuffle-for-snappy |
1118 | (package | |
1119 | (inherit bitshuffle) | |
1120 | (name "bitshuffle-for-snappy") | |
1121 | (build-system gnu-build-system) | |
1122 | (arguments | |
1123 | `(#:tests? #f | |
1124 | #:phases | |
1125 | (modify-phases %standard-phases | |
1126 | (replace 'configure | |
1127 | (lambda* (#:key outputs #:allow-other-keys) | |
1128 | (with-output-to-file "Makefile" | |
1129 | (lambda _ | |
04e91134 RW |
1130 | (format #t "\ |
1131 | libbitshuffle.so: src/bitshuffle.o src/bitshuffle_core.o src/iochain.o lz4/lz4.o | |
1132 | \tgcc -O3 -ffast-math -std=c99 -o $@ -shared -fPIC $^ | |
1133 | ||
1134 | %.o: %.c | |
1135 | \tgcc -O3 -ffast-math -std=c99 -fPIC -Isrc -Ilz4 -c $< -o $@ | |
1136 | ||
1137 | PREFIX:=~a | |
1138 | LIBDIR:=$(PREFIX)/lib | |
1139 | INCLUDEDIR:=$(PREFIX)/include | |
1140 | ||
1141 | install: libbitshuffle.so | |
1142 | \tinstall -dm755 $(LIBDIR) | |
1143 | \tinstall -dm755 $(INCLUDEDIR) | |
1144 | \tinstall -m755 libbitshuffle.so $(LIBDIR) | |
1145 | \tinstall -m644 src/bitshuffle.h $(INCLUDEDIR) | |
1146 | \tinstall -m644 src/bitshuffle_core.h $(INCLUDEDIR) | |
1147 | \tinstall -m644 src/iochain.h $(INCLUDEDIR) | |
1148 | \tinstall -m644 lz4/lz4.h $(INCLUDEDIR) | |
1149 | " (assoc-ref outputs "out")))) | |
1150 | #t))))) | |
cea83466 JL |
1151 | (inputs '()) |
1152 | (native-inputs '()))) | |
1153 | ||
1154 | (define-public java-snappy | |
1155 | (package | |
1156 | (name "java-snappy") | |
8293d21c | 1157 | (version "1.1.7") |
cea83466 JL |
1158 | (source (origin |
1159 | (method url-fetch) | |
1160 | (uri (string-append "https://github.com/xerial/snappy-java/archive/" | |
1161 | version ".tar.gz")) | |
1162 | (file-name (string-append name "-" version ".tar.gz")) | |
1163 | (sha256 | |
1164 | (base32 | |
8293d21c | 1165 | "0q4kxz2n97czf6g5gzq0d8yz22cgiaj7wp51rzsswh3bi99bpgg5")))) |
cea83466 JL |
1166 | (build-system ant-build-system) |
1167 | (arguments | |
1168 | `(#:jar-name "snappy.jar" | |
1169 | #:source-dir "src/main/java" | |
1170 | #:phases | |
1171 | (modify-phases %standard-phases | |
1172 | (add-before 'build 'remove-binaries | |
1173 | (lambda _ | |
1174 | (delete-file "lib/org/xerial/snappy/OSInfo.class") | |
1175 | (delete-file-recursively "src/main/resources/org/xerial/snappy/native") | |
1176 | #t)) | |
1177 | (add-before 'build 'build-jni | |
1178 | (lambda _ | |
1179 | ;; Rebuild one of the binaries we removed earlier | |
1180 | (system* "javac" "src/main/java/org/xerial/snappy/OSInfo.java" | |
1181 | "-d" "lib") | |
1182 | ;; Link to the dynamic bitshuffle and snappy, not the static ones | |
1183 | (substitute* "Makefile.common" | |
1184 | (("-shared") | |
1185 | "-shared -lbitshuffle -lsnappy")) | |
1186 | (substitute* "Makefile" | |
1187 | ;; Don't try to use git, don't download bitshuffle source | |
1188 | ;; and don't build it. | |
1189 | (("\\$\\(SNAPPY_GIT_UNPACKED\\) ") | |
1190 | "") | |
1191 | ((": \\$\\(SNAPPY_GIT_UNPACKED\\)") | |
1192 | ":") | |
1193 | (("\\$\\(BITSHUFFLE_UNPACKED\\) ") | |
1194 | "") | |
1195 | ((": \\$\\(SNAPPY_SOURCE_CONFIGURED\\)") ":") | |
1196 | ;; What we actually want to build | |
1197 | (("SNAPPY_OBJ:=.*") | |
1198 | "SNAPPY_OBJ:=$(addprefix $(SNAPPY_OUT)/, \ | |
1199 | SnappyNative.o BitShuffleNative.o)\n") | |
1200 | ;; Since we removed the directory structure in "native" during | |
1201 | ;; the previous phase, we need to recreate it. | |
1202 | (("NAME\\): \\$\\(SNAPPY_OBJ\\)") | |
1203 | "NAME): $(SNAPPY_OBJ)\n\t@mkdir -p $(@D)")) | |
1204 | ;; Finally we can run the Makefile to build the dynamic library. | |
8293d21c MB |
1205 | ;; Use the -nocmake target to avoid a dependency on cmake, |
1206 | ;; which in turn requires the "git_unpacked" directory. | |
1207 | (invoke "make" "native-nocmake"))) | |
cea83466 JL |
1208 | ;; Once we have built the shared library, we need to place it in the |
1209 | ;; "build" directory so it can be added to the jar file. | |
1210 | (add-after 'build-jni 'copy-jni | |
1211 | (lambda _ | |
1212 | (copy-recursively "src/main/resources/org/xerial/snappy/native" | |
1213 | "build/classes/org/xerial/snappy/native"))) | |
1214 | (add-before 'check 'fix-failing | |
1215 | (lambda _ | |
8293d21c MB |
1216 | (with-directory-excursion "src/test/java/org/xerial/snappy" |
1217 | ;; This package assumes maven build, which puts results in "target". | |
1218 | ;; We put them in "build" instead, so fix that. | |
1219 | (substitute* "SnappyLoaderTest.java" | |
1220 | (("target/classes") "build/classes")) | |
1221 | ;; This requires Hadoop, which is not in Guix yet. | |
1222 | (delete-file "SnappyHadoopCompatibleOutputStreamTest.java")) | |
1223 | #t))))) | |
cea83466 JL |
1224 | (inputs |
1225 | `(("osgi-framework" ,java-osgi-framework))) | |
1226 | (propagated-inputs | |
1227 | `(("bitshuffle" ,bitshuffle-for-snappy) | |
1228 | ("snappy" ,snappy))) | |
1229 | (native-inputs | |
1230 | `(("junit" ,java-junit) | |
1231 | ("hamcrest" ,java-hamcrest-core) | |
1232 | ("xerial-core" ,java-xerial-core) | |
1233 | ("classworlds" ,java-plexus-classworlds) | |
8293d21c MB |
1234 | ("commons-lang" ,java-commons-lang) |
1235 | ("commons-io" ,java-commons-io) | |
cea83466 JL |
1236 | ("perl" ,perl))) |
1237 | (home-page "https://github.com/xerial/snappy-java") | |
1238 | (synopsis "Compression/decompression algorithm in Java") | |
1239 | (description "Snappy-java is a Java port of the snappy, a fast C++ | |
1240 | compresser/decompresser.") | |
1241 | (license license:asl2.0))) | |
1242 | ||
933ad809 RW |
1243 | (define-public java-snappy-1 |
1244 | (package | |
1245 | (inherit java-snappy) | |
1246 | (version "1.0.3-rc3") | |
1247 | (source (origin | |
1248 | (method url-fetch) | |
1249 | (uri (string-append "https://github.com/xerial/snappy-java/archive/" | |
1250 | "snappy-java-" version ".tar.gz")) | |
1251 | (sha256 | |
1252 | (base32 | |
1253 | "08hsxlqidiqck0q57fshwyv3ynyxy18vmhrai9fyc8mz17m7gsa3")))) | |
1254 | (arguments | |
1255 | `(#:jar-name "snappy.jar" | |
1256 | #:source-dir "src/main/java" | |
1257 | #:phases | |
1258 | (modify-phases %standard-phases | |
1259 | (add-before 'build 'remove-binaries | |
1260 | (lambda _ | |
1261 | (delete-file "lib/org/xerial/snappy/OSInfo.class") | |
1262 | (delete-file-recursively "src/main/resources/org/xerial/snappy/native") | |
1263 | #t)) | |
1264 | (add-before 'build 'build-jni | |
1265 | (lambda _ | |
1266 | ;; Rebuild one of the binaries we removed earlier | |
1267 | (system* "javac" "src/main/java/org/xerial/snappy/OSInfo.java" | |
1268 | "-d" "lib") | |
1269 | ;; Link to the dynamic snappy, not the static ones | |
1270 | (substitute* "Makefile.common" | |
1271 | (("-shared") "-shared -lsnappy")) | |
1272 | (substitute* "Makefile" | |
1273 | ;; Don't download the sources here. | |
1274 | (("\\$\\(SNAPPY_UNPACKED\\) ") "") | |
1275 | ((": \\$\\(SNAPPY_UNPACKED\\) ") ":") | |
1276 | ;; What we actually want to build | |
1277 | (("SNAPPY_OBJ:=.*") | |
1278 | "SNAPPY_OBJ:=$(addprefix $(SNAPPY_OUT)/, SnappyNative.o)\n") | |
1279 | ;; Since we removed the directory structure in "native" during | |
1280 | ;; the previous phase, we need to recreate it. | |
1281 | (("NAME\\): \\$\\(SNAPPY_OBJ\\)") | |
1282 | "NAME): $(SNAPPY_OBJ)\n\t@mkdir -p $(@D)")) | |
1283 | ;; Finally we can run the Makefile to build the dynamic library. | |
1284 | (zero? (system* "make" "native")))) | |
1285 | ;; Once we have built the shared library, we need to place it in the | |
1286 | ;; "build" directory so it can be added to the jar file. | |
1287 | (add-after 'build-jni 'copy-jni | |
1288 | (lambda _ | |
1289 | (copy-recursively "src/main/resources/org/xerial/snappy/native" | |
1290 | "build/classes/org/xerial/snappy/native") | |
1291 | #t)) | |
1292 | (add-before 'check 'fix-tests | |
1293 | (lambda _ | |
1294 | (mkdir-p "src/test/resources/org/xerial/snappy/") | |
1295 | (copy-recursively "src/test/java/org/xerial/snappy/testdata" | |
1296 | "src/test/resources/org/xerial/snappy/testdata") | |
1297 | (install-file "src/test/java/org/xerial/snappy/alice29.txt" | |
1298 | "src/test/resources/org/xerial/snappy/") | |
1299 | #t))))))) | |
1300 | ||
823997e9 JL |
1301 | (define-public java-iq80-snappy |
1302 | (package | |
1303 | (name "java-iq80-snappy") | |
1304 | (version "0.4") | |
1305 | (source (origin | |
1306 | (method url-fetch) | |
1307 | (uri (string-append "https://github.com/dain/snappy/archive/snappy-" | |
1308 | version ".tar.gz")) | |
1309 | (sha256 | |
1310 | (base32 | |
1311 | "0rb3zhci7w9wzd65lfnk7p3ip0n6gb58a9qpx8n7r0231gahyamf")))) | |
1312 | (build-system ant-build-system) | |
1313 | (arguments | |
1314 | `(#:jar-name "iq80-snappy.jar" | |
1315 | #:source-dir "src/main/java" | |
1316 | #:test-dir "src/test" | |
1317 | #:jdk ,icedtea-8 | |
1318 | #:phases | |
1319 | (modify-phases %standard-phases | |
1320 | (replace 'check | |
1321 | (lambda _ | |
1322 | (define (test class) | |
1323 | (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH") | |
1324 | ":build/classes" | |
1325 | ":build/test-classes") | |
1326 | "-Dtest.resources.dir=src/test/resources" | |
1327 | "org.testng.TestNG" "-testclass" | |
1328 | class))) | |
1329 | (system* "ant" "compile-tests") | |
1330 | (and | |
1331 | (test "org.iq80.snappy.SnappyFramedStreamTest") | |
1332 | (test "org.iq80.snappy.SnappyStreamTest")))) | |
1333 | (add-before 'build 'remove-hadoop-dependency | |
1334 | (lambda _ | |
1335 | ;; We don't have hadoop | |
1336 | (delete-file "src/main/java/org/iq80/snappy/HadoopSnappyCodec.java") | |
1337 | (delete-file "src/test/java/org/iq80/snappy/TestHadoopSnappyCodec.java") | |
1338 | #t))))) | |
1339 | (home-page "https://github.com/dain/snappy") | |
1340 | (native-inputs | |
1341 | `(("guava" ,java-guava) | |
1342 | ("java-snappy" ,java-snappy) | |
1343 | ("hamcrest" ,java-hamcrest-core) | |
1344 | ("testng" ,java-testng))) | |
107a14f9 TGR |
1345 | (synopsis "Java port of the Snappy (de)compressor") |
1346 | (description | |
1347 | "Iq80-snappy is a port of the Snappy compressor and decompressor rewritten | |
1348 | in pure Java. This compression code produces a byte-for-byte exact copy of the | |
1349 | output created by the original C++ code, and is extremely fast.") | |
823997e9 JL |
1350 | (license license:asl2.0))) |
1351 | ||
776d2fb1 RW |
1352 | (define-public java-jbzip2 |
1353 | (package | |
1354 | (name "java-jbzip2") | |
1355 | (version "0.9.1") | |
1356 | (source (origin | |
1357 | (method url-fetch) | |
1358 | (uri (string-append "https://storage.googleapis.com/" | |
1359 | "google-code-archive-source/v2/" | |
1360 | "code.google.com/jbzip2/" | |
1361 | "source-archive.zip")) | |
1362 | (file-name (string-append name "-" version ".zip")) | |
1363 | (sha256 | |
1364 | (base32 | |
1365 | "0ncmhlqmrfmj96nqf6p77b9ws35lcfsvpfxzwxi2asissc83z1l3")))) | |
1366 | (build-system ant-build-system) | |
1367 | (native-inputs | |
1368 | `(("unzip" ,unzip) | |
1369 | ("java-junit" ,java-junit))) | |
1370 | (arguments | |
1371 | `(#:tests? #f ; no tests | |
1372 | #:jar-name "jbzip2.jar" | |
1373 | #:source-dir "tags/release-0.9.1/src" | |
1374 | #:phases | |
1375 | (modify-phases %standard-phases | |
1376 | (add-after 'unpack 'fix-encoding-problems | |
1377 | (lambda _ | |
1378 | ;; Some of the files we're patching are | |
1379 | ;; ISO-8859-1-encoded, so choose it as the default | |
1380 | ;; encoding so the byte encoding is preserved. | |
1381 | (with-fluids ((%default-port-encoding #f)) | |
1382 | (substitute* "tags/release-0.9.1/src/org/itadaki/bzip2/HuffmanAllocator.java" | |
1383 | (("Milidi.") "Milidiu"))) | |
1384 | #t))))) | |
1385 | (home-page "https://code.google.com/archive/p/jbzip2/") | |
1386 | (synopsis "Java bzip2 compression/decompression library") | |
1387 | (description "Jbzip2 is a Java bzip2 compression/decompression library. | |
1388 | It can be used as a replacement for the Apache @code{CBZip2InputStream} / | |
1389 | @code{CBZip2OutputStream} classes.") | |
1390 | (license license:expat))) | |
1391 | ||
adbd7faf KK |
1392 | (define-public p7zip |
1393 | (package | |
1394 | (name "p7zip") | |
1395 | (version "16.02") | |
1396 | (source (origin | |
1397 | (method url-fetch) | |
1398 | (uri (string-append "mirror://sourceforge/" name "/" name "/" | |
1399 | version "/" name "_" version | |
1400 | "_src_all.tar.bz2")) | |
1401 | (sha256 | |
1402 | (base32 | |
1403 | "07rlwbbgszq8i7m8jh3x6j2w2hc9a72dc7fmqawnqkwlwb00mcjy")) | |
1404 | (modules '((guix build utils))) | |
1405 | (snippet | |
1406 | '(begin | |
1407 | ;; Remove non-free source files | |
1408 | (for-each delete-file | |
1409 | (append | |
1410 | (find-files "CPP/7zip/Compress" "Rar.*") | |
1411 | (find-files "CPP/7zip/Crypto" "Rar.*") | |
1412 | (find-files "DOC/unRarLicense.txt") | |
1413 | (find-files "Utils/file_Codecs_Rar_so.py"))) | |
1414 | (delete-file-recursively "CPP/7zip/Archive/Rar") | |
1415 | (delete-file-recursively "CPP/7zip/Compress/Rar") | |
1416 | #t)) | |
1ac675a5 | 1417 | (patches (search-patches "p7zip-CVE-2016-9296.patch" |
a630c647 | 1418 | "p7zip-CVE-2017-17969.patch" |
1ac675a5 | 1419 | "p7zip-remove-unused-code.patch")))) |
adbd7faf KK |
1420 | (build-system gnu-build-system) |
1421 | (arguments | |
1422 | `(#:make-flags | |
1423 | (list (string-append "DEST_HOME=" (assoc-ref %outputs "out")) "all3") | |
1424 | #:phases | |
1425 | (modify-phases %standard-phases | |
1426 | (replace 'configure | |
1427 | (lambda* (#:key system outputs #:allow-other-keys) | |
1428 | (zero? (system* "cp" | |
1429 | (let ((system ,(or (%current-target-system) | |
1430 | (%current-system)))) | |
1431 | (cond | |
1432 | ((string-prefix? "x86_64" system) | |
1433 | "makefile.linux_amd64_asm") | |
1434 | ((string-prefix? "i686" system) | |
1435 | "makefile.linux_x86_asm_gcc_4.X") | |
1436 | (else | |
1437 | "makefile.linux_any_cpu_gcc_4.X"))) | |
1438 | "makefile.machine")))) | |
1439 | (replace 'check | |
1440 | (lambda _ | |
1441 | (and (zero? (system* "make" "test")) | |
1442 | (zero? (system* "make" "test_7z")) | |
1443 | (zero? (system* "make" "test_7zr")))))))) | |
1444 | (inputs | |
1445 | (let ((system (or (%current-target-system) | |
1446 | (%current-system)))) | |
1447 | `(,@(cond ((string-prefix? "x86_64" system) | |
1448 | `(("yasm" ,yasm))) | |
1449 | ((string-prefix? "i686" system) | |
1450 | `(("nasm" ,nasm))) | |
1451 | (else '()))))) | |
1452 | (home-page "http://p7zip.sourceforge.net/") | |
1453 | (synopsis "Command-line file archiver with high compression ratio") | |
1454 | (description "p7zip is a command-line port of 7-Zip, a file archiver that | |
1455 | handles the 7z format which features very high compression ratios.") | |
1456 | (license (list license:lgpl2.1+ | |
1457 | license:gpl2+ | |
1458 | license:public-domain)))) | |
618089f9 MB |
1459 | |
1460 | (define-public gzstream | |
1461 | (package | |
1462 | (name "gzstream") | |
1463 | (version "1.5") | |
1464 | (source (origin | |
1465 | (method url-fetch) | |
1466 | (uri | |
1467 | ;; No versioned URL, but last release was in 2003. | |
1468 | "http://www.cs.unc.edu/Research/compgeom/gzstream/gzstream.tgz") | |
1469 | (file-name (string-append name "-" version ".tgz")) | |
1470 | (sha256 | |
1471 | (base32 | |
1472 | "00y19pqjsdj5zcrx4p9j56pl73vayfwnb7y2hvp423nx0cwv5b4r")) | |
1473 | (modules '((guix build utils))) | |
1474 | (snippet | |
1475 | ;; Remove pre-compiled object. | |
1476 | '(delete-file "gzstream.o")))) | |
1477 | (build-system gnu-build-system) | |
1478 | (arguments | |
1479 | `(#:test-target "test" | |
1480 | #:phases | |
1481 | (modify-phases %standard-phases | |
1482 | (delete 'configure) | |
1483 | (replace 'install | |
1484 | (lambda* (#:key outputs #:allow-other-keys) | |
1485 | (let* ((out (assoc-ref outputs "out")) | |
1486 | (lib (string-append out "/lib")) | |
1487 | (include (string-append out "/include"))) | |
1488 | (install-file "libgzstream.a" lib) | |
1489 | (install-file "gzstream.h" include) | |
1490 | #t)))))) | |
1491 | (propagated-inputs `(("zlib" ,zlib))) | |
1492 | (home-page "http://www.cs.unc.edu/Research/compgeom/gzstream/") | |
1493 | (synopsis "Compressed C++ iostream") | |
1494 | (description "gzstream is a small library for providing zlib | |
1495 | functionality in a C++ iostream.") | |
1496 | (license license:lgpl2.1+))) | |
36df995c TGR |
1497 | |
1498 | (define-public zpaq | |
1499 | (package | |
1500 | (name "zpaq") | |
1501 | (version "7.15") | |
1502 | (source | |
1503 | (origin | |
1504 | (method url-fetch/zipbomb) | |
1505 | (uri (string-append "http://mattmahoney.net/dc/zpaq" | |
1506 | (string-delete #\. version) ".zip")) | |
1507 | (sha256 | |
1508 | (base32 | |
1509 | "066l94yyladlfzri877nh2dhkvspagjn3m5bmv725fmhkr9c4pp8")) | |
1510 | (modules '((guix build utils))) | |
1511 | (snippet | |
1512 | ;; Delete irrelevant pre-compiled binaries. | |
1513 | '(for-each delete-file (find-files "." "\\.exe$"))))) | |
1514 | (build-system gnu-build-system) | |
1515 | (arguments | |
1516 | `(#:phases | |
1517 | (modify-phases %standard-phases | |
1518 | (delete 'configure)) ; no ‘configure’ script | |
1519 | #:make-flags | |
1520 | (list | |
1521 | (string-append "CPPFLAGS=-Dunix" | |
1522 | ,(match (or (%current-target-system) | |
1523 | (%current-system)) | |
1524 | ("x86_64-linux" "") | |
1525 | ("i686-linux" "") | |
1526 | (_ " -DNOJIT"))) | |
1527 | ;; These should be safe, lowest-common-denominator instruction sets, | |
1528 | ;; allowing for some optimisation while remaining reproducible. | |
effd7198 | 1529 | (string-append "CXXFLAGS=-O3 -DNDEBUG" |
36df995c TGR |
1530 | ,(match (or (%current-target-system) |
1531 | (%current-system)) | |
effd7198 EF |
1532 | ("x86_64-linux" " -march=nocona -mtune=generic") |
1533 | ("i686-linux" " -march=i686 -mtune=generic") | |
1534 | ("armhf-linux" " -mtune=generic-armv7-a") | |
36df995c TGR |
1535 | (_ ""))) |
1536 | (string-append "PREFIX=" | |
1537 | (assoc-ref %outputs "out"))))) | |
1538 | (native-inputs | |
1539 | `(("perl" ,perl))) ; for pod2man | |
1540 | (home-page "http://mattmahoney.net/dc/zpaq.html") | |
1541 | (synopsis "Incremental journaling archiver") | |
1542 | (description "ZPAQ is a command-line archiver for realistic situations with | |
1543 | many duplicate and already compressed files. It backs up only those files | |
1544 | modified since the last update. All previous versions remain untouched and can | |
1545 | be independently recovered. Identical files are only stored once (known as | |
1546 | @dfn{de-duplication}). Archives can also be encrypted. | |
1547 | ||
1548 | ZPAQ is intended to back up user data, not entire operating systems. It ignores | |
1549 | owner and group IDs, ACLs, extended attributes, or special file types like | |
1550 | devices, sockets, or named pipes. It does not follow or restore symbolic links | |
1551 | or junctions, and always follows hard links.") | |
1552 | (license (list license:public-domain | |
1553 | ;; libzpaq.cpp contains a mix of public-domain and | |
1554 | ;; expat-licenced (or ‘MIT’) code. | |
1555 | license:expat)))) | |
0da8313c | 1556 | |
9e6ada8f MR |
1557 | (define-public unshield |
1558 | (package | |
1559 | (name "unshield") | |
1560 | (version "1.4.2") | |
1561 | (source | |
1562 | (origin (method url-fetch) | |
1563 | (uri (string-append "http://github.com/twogood/unshield/archive/" | |
1564 | version ".tar.gz")) | |
277be74f | 1565 | (file-name (string-append name "-" version ".tar.gz")) |
9e6ada8f MR |
1566 | (sha256 |
1567 | (base32 | |
1568 | "0x7ps644yp5dka2zhb8w0ifqmw3d255jafpzfwv8xbcpgq6fmm2x")))) | |
1569 | (build-system cmake-build-system) | |
1570 | (inputs | |
1571 | `(("zlib" ,zlib) | |
1572 | ("openssl" ,openssl) | |
1573 | ;; test data that is otherwise downloaded with curl | |
1574 | ("unshield-avigomanager11b22.zip" | |
1575 | ,(origin | |
1576 | (method url-fetch) | |
a5fa1a1a MR |
1577 | (uri (string-append "https://www.dropbox.com/s/8r4b6752swe3nhu/" |
1578 | "unshield-avigomanager11b22.zip?dl=1")) | |
9e6ada8f MR |
1579 | (sha256 |
1580 | (base32 "0fwq7lih04if68wpwpsk5wjqyvh32db76a41sq6gbx4dn1lc3ddn")) | |
1581 | (file-name "unshield-avigomanager11b22.zip"))) | |
1582 | ("unshield-the-feeble-files-spanish.zip" | |
1583 | ,(origin | |
1584 | (method url-fetch) | |
a5fa1a1a MR |
1585 | (uri (string-append "https://www.dropbox.com/s/1ng0z9kfxc7eb1e/" |
1586 | "unshield-the-feeble-files-spanish.zip?dl=1")) | |
9e6ada8f MR |
1587 | (sha256 |
1588 | (base32 "1k5cw6vnpja8yjlnhx5124xrw9i8s1l539hfdqqrqz3l5gn0bnyd")) | |
1589 | (file-name "unshield-the-feeble-files-spanish.zip"))))) | |
1590 | (native-inputs | |
1591 | `(("unzip" ,unzip))) | |
1592 | (arguments | |
1593 | `(#:out-of-source? #f | |
1594 | #:phases | |
1595 | (modify-phases %standard-phases | |
1596 | (add-before 'check 'pre-check | |
1597 | (lambda* (#:key inputs #:allow-other-keys) | |
1598 | (for-each (lambda (i) | |
1599 | (copy-file (assoc-ref inputs i) | |
1600 | (string-append "test/v0/" i))) | |
1601 | '("unshield-avigomanager11b22.zip" | |
1602 | "unshield-the-feeble-files-spanish.zip")) | |
1603 | (substitute* (find-files "test/" "/*\\.sh") | |
1604 | ;; Tests expect the unshield binary in a specific | |
1605 | ;; location. | |
1606 | (("/var/tmp/unshield/bin/unshield") | |
1607 | (string-append (getcwd) "/src/unshield")) | |
1608 | ;; We no longer need to download the data. | |
1609 | ((".?URL=.*$") "") | |
1610 | (("curl -(|f)sSL -o test.zip .*") "")) | |
1611 | (substitute* "test/v0/avigomanager.sh" | |
1612 | (("test.zip") | |
1613 | (string-append (getcwd) | |
1614 | "/test/v0/unshield-avigomanager11b22.zip"))) | |
1615 | (substitute* "test/v0/the-feeble-files-spanish.sh" | |
1616 | (("test.zip") | |
1617 | (string-append (getcwd) | |
1618 | "/test/v0/unshield-the-feeble-files-spanish.zip"))) | |
1619 | #t)) | |
1620 | (replace 'check | |
1621 | (lambda _ | |
1622 | (zero? (system* "./run-tests.sh"))))))) | |
1623 | (home-page "https://github.com/twogood/unshield") | |
1624 | (synopsis "Extract CAB files from InstallShield installers") | |
1625 | (description | |
1626 | "@command{unshield} is a tool and library for extracting @file{.cab} | |
1627 | archives from InstallShield installers.") | |
1628 | (license license:expat))) | |
1629 | ||
f6ac3101 TGR |
1630 | (define-public zstd |
1631 | (package | |
1632 | (name "zstd") | |
75176f1b | 1633 | (version "1.3.4") |
f6ac3101 TGR |
1634 | (source (origin |
1635 | (method url-fetch) | |
1636 | (uri (string-append "https://github.com/facebook/zstd/archive/v" | |
1637 | version ".tar.gz")) | |
1638 | (file-name (string-append name "-" version ".tar.gz")) | |
1639 | (sha256 | |
1640 | (base32 | |
75176f1b | 1641 | "1a85sqk4z5b2jfp7fqkr38ibql8mdzca32lf4i3bssyjimp1pr4j")))) |
f6ac3101 TGR |
1642 | (build-system gnu-build-system) |
1643 | (arguments | |
1644 | `(#:phases | |
1645 | (modify-phases %standard-phases | |
1646 | (delete 'configure)) ; no configure script | |
1647 | #:make-flags | |
1648 | (list "CC=gcc" | |
f45e314e TGR |
1649 | (string-append "PREFIX=" (assoc-ref %outputs "out")) |
1650 | ;; Skip auto-detection of, and creating a dependency on, the build | |
1651 | ;; environment's ‘xz’ for what amounts to a dubious feature anyway. | |
1652 | "HAVE_LZMA=0" | |
1653 | ;; Not currently detected, but be explicit & avoid surprises later. | |
1654 | "HAVE_LZ4=0" | |
e8073063 | 1655 | "HAVE_ZLIB=0"))) |
f6ac3101 TGR |
1656 | (home-page "http://zstd.net/") |
1657 | (synopsis "Zstandard real-time compression algorithm") | |
1658 | (description "Zstandard (@command{zstd}) is a lossless compression algorithm | |
1659 | that combines very fast operation with a compression ratio comparable to that of | |
1660 | zlib. In most scenarios, both compression and decompression can be performed in | |
1661 | ‘real time’. The compressor can be configured to provide the most suitable | |
1662 | trade-off between compression ratio and speed, without affecting decompression | |
1663 | speed.") | |
1664 | (license (list license:bsd-3 ; the main top-level LICENSE file | |
16123d1d | 1665 | license:bsd-2 ; many files explicitly state 2-Clause |
5a719dee | 1666 | license:gpl2 ; the main top-level COPYING file |
16123d1d TGR |
1667 | license:gpl3+ ; tests/gzip/*.sh |
1668 | license:expat ; lib/dictBuilder/divsufsort.[ch] | |
f6ac3101 TGR |
1669 | license:public-domain ; zlibWrapper/examples/fitblk* |
1670 | license:zlib)))) ; zlibWrapper/{gz*.c,gzguts.h} | |
0f03c531 TGR |
1671 | |
1672 | (define-public pzstd | |
1673 | (package | |
1674 | (name "pzstd") | |
1675 | (version (package-version zstd)) | |
1676 | (source (package-source zstd)) | |
1677 | (build-system gnu-build-system) | |
1678 | (native-inputs | |
c695fb76 | 1679 | `(("googletest" ,googletest))) |
0f03c531 TGR |
1680 | (arguments |
1681 | `(#:phases | |
1682 | (modify-phases %standard-phases | |
1683 | (add-after 'unpack 'enter-subdirectory | |
1684 | (lambda _ (chdir "contrib/pzstd"))) | |
1685 | (delete 'configure) ; no configure script | |
1686 | (add-before 'check 'compile-tests | |
1687 | (lambda* (#:key make-flags #:allow-other-keys) | |
1688 | (zero? (apply system* "make" "tests" make-flags)))) | |
1689 | (add-after 'install 'install-documentation | |
1690 | (lambda* (#:key outputs #:allow-other-keys) | |
1691 | (let* ((out (assoc-ref outputs "out")) | |
1692 | (doc (string-append out "/share/doc/" ,name))) | |
1693 | (mkdir-p doc) | |
1694 | (install-file "README.md" doc) | |
1695 | #t)))) | |
1696 | #:make-flags | |
1697 | (list "CC=gcc" | |
1698 | (string-append "PREFIX=" (assoc-ref %outputs "out"))))) | |
1699 | (home-page (package-home-page zstd)) | |
1700 | (synopsis "Threaded implementation of the Zstandard compression algorithm") | |
1701 | (description "Parallel Zstandard (PZstandard or @command{pzstd}) is a | |
1702 | multi-threaded implementation of the @uref{http://zstd.net/, Zstandard | |
1703 | compression algorithm}. It is fully compatible with the original Zstandard file | |
1704 | format and command-line interface, and can be used as a drop-in replacement. | |
1705 | ||
1706 | Compression is distributed over multiple processor cores to improve performance, | |
1707 | as is the decompression of data compressed in this manner. Data compressed by | |
1708 | other implementations will only be decompressed by two threads: one performing | |
1709 | the actual decompression, the other input and output.") | |
1710 | (license (package-license zstd)))) | |
148585c2 AI |
1711 | |
1712 | (define-public zip | |
1713 | (package | |
1714 | (name "zip") | |
1715 | (version "3.0") | |
1716 | (source | |
1717 | (origin | |
1718 | (method url-fetch) | |
1719 | (uri (string-append "mirror://sourceforge/infozip" | |
1720 | "/Zip%203.x%20%28latest%29/3.0/zip30.tar.gz")) | |
1721 | (sha256 | |
1722 | (base32 | |
1723 | "0sb3h3067pzf3a7mlxn1hikpcjrsvycjcnj9hl9b1c3ykcgvps7h")))) | |
1724 | (build-system gnu-build-system) | |
1725 | (inputs `(("bzip2" ,bzip2))) | |
1726 | (arguments | |
1727 | `(#:tests? #f ; no test target | |
1728 | #:make-flags (let ((out (assoc-ref %outputs "out"))) | |
1729 | (list "-f" "unix/Makefile" | |
1730 | (string-append "prefix=" out) | |
1731 | (string-append "MANDIR=" out "/share/man/man1"))) | |
1732 | #:modules ((guix build gnu-build-system) | |
1733 | (guix build utils) | |
1734 | (srfi srfi-1)) | |
1735 | #:phases | |
1736 | (modify-phases %standard-phases | |
1737 | (replace 'build | |
1738 | (lambda* (#:key (make-flags '()) #:allow-other-keys) | |
1739 | (zero? (apply system* "make" "generic_gcc" make-flags)))) | |
1740 | (delete 'configure)))) | |
1741 | (home-page "http://www.info-zip.org/Zip.html") | |
1742 | (synopsis "Compression and file packing utility") | |
1743 | (description | |
1744 | "Zip is a compression and file packaging/archive utility. Zip is useful | |
1745 | for packaging a set of files for distribution, for archiving files, and for | |
1746 | saving disk space by temporarily compressing unused files or directories. | |
1747 | Zip puts one or more compressed files into a single ZIP archive, along with | |
1748 | information about the files (name, path, date, time of last modification, | |
1749 | protection, and check information to verify file integrity). An entire | |
1750 | directory structure can be packed into a ZIP archive with a single command. | |
1751 | ||
1752 | Zip has one compression method (deflation) and can also store files without | |
1753 | compression. Zip automatically chooses the better of the two for each file. | |
1754 | Compression ratios of 2:1 to 3:1 are common for text files.") | |
1755 | (license (license:non-copyleft "file://LICENSE" | |
1756 | "See LICENSE in the distribution.")))) | |
1757 | ||
1758 | (define-public unzip | |
1759 | (package (inherit zip) | |
1760 | (name "unzip") | |
77737e03 | 1761 | (replacement unzip/fixed) |
148585c2 AI |
1762 | (version "6.0") |
1763 | (source | |
1764 | (origin | |
1765 | (method url-fetch) | |
1766 | (uri (string-append "mirror://sourceforge/infozip" | |
1767 | "/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz")) | |
1768 | (sha256 | |
1769 | (base32 | |
1770 | "0dxx11knh3nk95p2gg2ak777dd11pr7jx5das2g49l262scrcv83")) | |
1771 | (patches (search-patches "unzip-CVE-2014-8139.patch" | |
1772 | "unzip-CVE-2014-8140.patch" | |
1773 | "unzip-CVE-2014-8141.patch" | |
1774 | "unzip-CVE-2014-9636.patch" | |
1775 | "unzip-CVE-2015-7696.patch" | |
1776 | "unzip-CVE-2015-7697.patch" | |
1777 | "unzip-allow-greater-hostver-values.patch" | |
1778 | "unzip-initialize-symlink-flag.patch" | |
1779 | "unzip-remove-build-date.patch" | |
1780 | "unzip-attribs-overflow.patch" | |
1781 | "unzip-overflow-on-invalid-input.patch" | |
1782 | "unzip-format-secure.patch" | |
1783 | "unzip-overflow-long-fsize.patch")))) | |
1784 | (build-system gnu-build-system) | |
1785 | ;; no inputs; bzip2 is not supported, since not compiled with BZ_NO_STDIO | |
1786 | (arguments | |
1787 | `(#:phases (modify-phases %standard-phases | |
1788 | (delete 'configure) | |
1789 | (replace 'build | |
1790 | (lambda* (#:key make-flags #:allow-other-keys) | |
1791 | (zero? (apply system* "make" | |
1792 | `("-j" ,(number->string | |
1793 | (parallel-job-count)) | |
1794 | ,@make-flags | |
1795 | "generic_gcc")))))) | |
1796 | #:make-flags (list "-f" "unix/Makefile" | |
1797 | (string-append "prefix=" %output) | |
1798 | (string-append "MANDIR=" %output "/share/man/man1")))) | |
1799 | (home-page "http://www.info-zip.org/UnZip.html") | |
1800 | (synopsis "Decompression and file extraction utility") | |
1801 | (description | |
1802 | "UnZip is an extraction utility for archives compressed in .zip format, | |
1803 | also called \"zipfiles\". | |
1804 | ||
1805 | UnZip lists, tests, or extracts files from a .zip archive. The default | |
1806 | behaviour (with no options) is to extract into the current directory, and | |
1807 | subdirectories below it, all files from the specified zipfile. UnZip | |
1808 | recreates the stored directory structure by default.") | |
1809 | (license (license:non-copyleft "file://LICENSE" | |
1810 | "See LICENSE in the distribution.")))) | |
1811 | ||
77737e03 LF |
1812 | (define unzip/fixed |
1813 | (package/inherit unzip | |
1814 | (arguments | |
1815 | (substitute-keyword-arguments (package-arguments unzip) | |
1816 | ((#:phases phases) | |
1817 | `(modify-phases ,phases | |
1818 | (add-after 'unpack 'fortify | |
1819 | (lambda _ | |
1820 | ;; Mitigate CVE-2018-1000035, an exploitable buffer overflow. | |
1821 | ;; This environment variable is recommended in 'unix/Makefile' | |
1822 | ;; for passing flags to the C compiler. | |
1823 | (setenv "LOCAL_UNZIP" "-D_FORTIFY_SOURCE=1") | |
1824 | #t)))))))) | |
1825 | ||
148585c2 AI |
1826 | (define-public zziplib |
1827 | (package | |
1828 | (name "zziplib") | |
3f986ff6 MB |
1829 | (version "0.13.69") |
1830 | (home-page "https://github.com/gdraheim/zziplib") | |
148585c2 AI |
1831 | (source |
1832 | (origin | |
1833 | (method url-fetch) | |
3f986ff6 | 1834 | (uri (string-append home-page "/archive/v" version ".tar.gz")) |
148585c2 AI |
1835 | (sha256 |
1836 | (base32 | |
3f986ff6 | 1837 | "0i052a7shww0fzsxrdp3rd7g4mbzx7324a8ysbc0br7frpblcql4")))) |
148585c2 AI |
1838 | (build-system gnu-build-system) |
1839 | (inputs | |
1840 | `(("zlib" ,zlib))) | |
1841 | (native-inputs `(("perl" ,perl) ; for the documentation | |
1842 | ("pkg-config" ,pkg-config) | |
1843 | ;; for the documentation; Python 3 not supported, | |
1844 | ;; http://forums.gentoo.org/viewtopic-t-863161-start-0.html | |
1845 | ("python" ,python-2) | |
1846 | ("zip" ,zip))) ; to create test files | |
148585c2 AI |
1847 | (synopsis "Library for accessing zip files") |
1848 | (description | |
1849 | "ZZipLib is a library based on zlib for accessing zip files.") | |
0d729c5b MB |
1850 | ;; zziplib is dual licensed under LGPL2.0+ and MPL1.1. Some example source |
1851 | ;; files carry the Zlib license; see "docs/copying.html" for details. | |
1852 | (license (list license:lgpl2.0+ license:mpl1.1)))) | |
148585c2 | 1853 | |
b6f024ad | 1854 | (define-public perl-archive-zip |
148585c2 | 1855 | (package |
b6f024ad | 1856 | (name "perl-archive-zip") |
d5960bf7 | 1857 | (version "1.60") |
148585c2 AI |
1858 | (source |
1859 | (origin | |
1860 | (method url-fetch) | |
1861 | (uri (string-append | |
d5960bf7 | 1862 | "mirror://cpan/authors/id/P/PH/PHRED/Archive-Zip-" |
148585c2 AI |
1863 | version ".tar.gz")) |
1864 | (sha256 | |
1865 | (base32 | |
d5960bf7 | 1866 | "02y2ylq83hy9kgj57sc0239x65br9sm98c0chsm61s08yc2mpiza")))) |
148585c2 | 1867 | (build-system perl-build-system) |
d5960bf7 TGR |
1868 | (native-inputs |
1869 | ;; For tests. | |
1870 | `(("perl-test-mockmodule" ,perl-test-mockmodule))) | |
49ab09e6 TGR |
1871 | (synopsis "Provides an interface to Zip archive files") |
1872 | (description "The @code{Archive::Zip} module allows a Perl program to | |
1873 | create, manipulate, read, and write Zip archive files.") | |
d5960bf7 | 1874 | (home-page "http://search.cpan.org/dist/Archive-Zip/") |
148585c2 | 1875 | (license license:perl-license))) |
06de4aaf TF |
1876 | |
1877 | (define-public libzip | |
1878 | (package | |
1879 | (name "libzip") | |
77e62ee0 | 1880 | (version "1.3.2") |
06de4aaf TF |
1881 | (source (origin |
1882 | (method url-fetch) | |
1883 | (uri (string-append | |
8d6c7456 | 1884 | "https://libzip.org/download/" name "-" version ".tar.xz")) |
06de4aaf TF |
1885 | (sha256 |
1886 | (base32 | |
77e62ee0 | 1887 | "11g1hvm2bxa2v5plakfzcwyk5hb5fz4kgrkp38l0xhnv21888xv2")))) |
06de4aaf TF |
1888 | (native-inputs |
1889 | `(("perl" ,perl))) | |
1890 | (inputs | |
1891 | `(("zlib" ,zlib))) | |
1892 | (build-system gnu-build-system) | |
8d6c7456 | 1893 | (home-page "https://libzip.org") |
06de4aaf TF |
1894 | (synopsis "C library for reading, creating, and modifying zip archives") |
1895 | (description "Libzip is a C library for reading, creating, and modifying | |
1896 | zip archives. Files can be added from data buffers, files, or compressed data | |
1897 | copied directly from other zip archives. Changes made without closing the | |
1898 | archive can be reverted.") | |
1899 | (license license:bsd-3))) | |
ef5c40aa SR |
1900 | |
1901 | (define-public atool | |
1902 | (package | |
1903 | (name "atool") | |
1904 | (version "0.39.0") | |
1905 | (source | |
1906 | (origin | |
1907 | (method url-fetch) | |
1908 | (uri (string-append "http://savannah.nongnu.org/download/atool/atool-" | |
1909 | version ".tar.gz")) | |
1910 | (sha256 | |
1911 | (base32 | |
1912 | "0fvhzip2v08jgnlfpyj6rapan39xlsl1ksgq4lp8gfsai2ah1xma")))) | |
1913 | (build-system gnu-build-system) | |
1914 | (arguments | |
1915 | `(#:phases | |
1916 | (modify-phases %standard-phases | |
1917 | (add-after 'unpack 'embed-absolute-file-name | |
1918 | (lambda* (#:key inputs #:allow-other-keys) | |
1919 | (substitute* "atool" | |
1920 | (("(^\\$::cfg_path_file.*= )'file'" _ pre) | |
1921 | (string-append pre "'" (assoc-ref inputs "file") | |
1922 | "/bin/file'"))) | |
1923 | #t))))) | |
1924 | (inputs | |
1925 | `(("perl" ,perl) | |
1926 | ("file" ,file))) | |
340978d7 | 1927 | (home-page "https://www.nongnu.org/atool/") |
ef5c40aa SR |
1928 | (synopsis "Universal tool to manage file archives of various types") |
1929 | (description "The main command is @command{aunpack} which extracts files | |
1930 | from an archive. The other commands provided are @command{apack} (to create | |
1931 | archives), @command{als} (to list files in archives), and @command{acat} (to | |
1932 | extract files to standard out). As @command{atool} invokes external programs | |
1933 | to handle the archives, not all commands may be supported for a certain type | |
1934 | of archives.") | |
1935 | (license license:gpl2+))) | |
b44ecca6 P |
1936 | |
1937 | (define-public perl-archive-extract | |
1938 | (package | |
1939 | (name "perl-archive-extract") | |
1940 | (version "0.80") | |
1941 | (source | |
1942 | (origin | |
1943 | (method url-fetch) | |
1944 | (uri (string-append "mirror://cpan/authors/id/B/BI/BINGOS/Archive-Extract-" | |
1945 | version ".tar.gz")) | |
1946 | (sha256 | |
1947 | (base32 | |
1948 | "1x15j1q6w6z8hqyqgap0lz4qbq2174wfhksy1fdd653ccbaw5jr5")))) | |
1949 | (build-system perl-build-system) | |
1950 | (home-page "http://search.cpan.org/dist/Archive-Extract/") | |
1951 | (synopsis "Generic archive extracting mechanism") | |
1952 | (description "It allows you to extract any archive file of the type .tar, | |
1953 | .tar.gz, .gz, .Z, tar.bz2, .tbz, .bz2, .zip, .xz,, .txz, .tar.xz or .lzma | |
1954 | without having to worry how it does so, or use different interfaces for each | |
1955 | type by using either Perl modules, or command-line tools on your system.") | |
1956 | (license license:perl-license))) | |
b80027e5 JL |
1957 | |
1958 | (define-public java-tukaani-xz | |
1959 | (package | |
1960 | (name "java-tukaani-xz") | |
1961 | (version "1.6") | |
1962 | (source (origin | |
1963 | (method url-fetch) | |
1964 | (uri (string-append "https://tukaani.org/xz/xz-java-" version ".zip")) | |
1965 | (sha256 | |
1966 | (base32 | |
1967 | "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x")))) | |
1968 | (build-system ant-build-system) | |
1969 | (arguments | |
1970 | `(#:tests? #f; no tests | |
1971 | #:phases | |
1972 | (modify-phases %standard-phases | |
1973 | (add-after 'unpack 'chdir | |
1974 | (lambda _ | |
1975 | ;; Our build system enters the first directory in the archive, but | |
1976 | ;; the package is not contained in a subdirectory | |
1977 | (chdir ".."))) | |
1978 | (replace 'install | |
1979 | (lambda* (#:key outputs #:allow-other-keys) | |
1980 | ;; Do we want to install *Demo.jar? | |
1981 | (install-file "build/jar/xz.jar" | |
1982 | (string-append | |
1983 | (assoc-ref outputs "out") | |
1984 | "/share/java/xz.jar"))))))) | |
1985 | (native-inputs | |
1986 | `(("unzip" ,unzip))) | |
1987 | (home-page "https://tukaani.org") | |
1988 | (synopsis "XZ in Java") | |
1989 | (description "Tukaani-xz is an implementation of xz compression/decompression | |
1990 | algorithms in Java.") | |
1991 | (license license:public-domain))) | |
34e8cf22 TGR |
1992 | |
1993 | (define-public lunzip | |
1994 | (package | |
1995 | (name "lunzip") | |
83e8a302 | 1996 | (version "1.10") |
34e8cf22 TGR |
1997 | (source |
1998 | (origin | |
1999 | (method url-fetch) | |
b7fd77ef | 2000 | (uri (string-append "mirror://savannah/lzip/" |
34e8cf22 TGR |
2001 | name "/" name "-" version ".tar.gz")) |
2002 | (sha256 | |
83e8a302 | 2003 | (base32 "1iw59br6nsxs7l1p875h8w3vxwr04xfhg5zyal64crvamhxkj5kl")))) |
34e8cf22 TGR |
2004 | (build-system gnu-build-system) |
2005 | (arguments | |
2006 | `(#:configure-flags | |
2007 | (list "CC=gcc"))) | |
340978d7 | 2008 | (home-page "https://www.nongnu.org/lzip/lunzip.html") |
34e8cf22 TGR |
2009 | (synopsis "Small, stand-alone lzip decompressor") |
2010 | (description | |
2011 | "Lunzip is a decompressor for files in the lzip compression format (.lz), | |
2012 | written as a single small C tool with no dependencies. This makes it | |
2013 | well-suited to embedded and other systems without a C++ compiler, or for use in | |
2014 | applications such as software installers that need only to decompress files, | |
2015 | not compress them. | |
2016 | Lunzip is intended to be fully compatible with the regular lzip package.") | |
2017 | (license (list license:bsd-2 ; carg_parser.[ch] | |
2018 | license:gpl2+)))) ; everything else | |
5dca4c76 TGR |
2019 | |
2020 | (define-public clzip | |
2021 | (package | |
2022 | (name "clzip") | |
d6d1643b | 2023 | (version "1.10") |
5dca4c76 TGR |
2024 | (source |
2025 | (origin | |
2026 | (method url-fetch) | |
b7fd77ef | 2027 | (uri (string-append "mirror://savannah/lzip/" |
5dca4c76 TGR |
2028 | name "/" name "-" version ".tar.gz")) |
2029 | (sha256 | |
d6d1643b | 2030 | (base32 "03xcmhl3dya4jrwmsqh09ikimpb36fr3vkh2bwfzz1sbcns0cdg3")))) |
5dca4c76 TGR |
2031 | (build-system gnu-build-system) |
2032 | (arguments | |
2033 | `(#:configure-flags | |
2034 | (list "CC=gcc"))) | |
340978d7 | 2035 | (home-page "https://www.nongnu.org/lzip/clzip.html") |
5dca4c76 TGR |
2036 | (synopsis "Small, stand-alone lzip compressor and decompressor") |
2037 | (description | |
2038 | "Clzip is a compressor and decompressor for files in the lzip compression | |
2039 | format (.lz), written as a single small C tool with no dependencies. This makes | |
2040 | it well-suited to embedded and other systems without a C++ compiler, or for use | |
2041 | in other applications like package managers. | |
2042 | Clzip is intended to be fully compatible with the regular lzip package.") | |
2043 | (license (list license:bsd-2 ; carg_parser.[ch], lzd in clzip.texi | |
2044 | license:gpl2+)))) | |
2e3b1a92 TGR |
2045 | |
2046 | (define-public lzlib | |
2047 | (package | |
2048 | (name "lzlib") | |
d1c1d835 | 2049 | (version "1.10") |
2e3b1a92 TGR |
2050 | (source |
2051 | (origin | |
2052 | (method url-fetch) | |
b7fd77ef | 2053 | (uri (string-append "mirror://savannah/lzip/" |
2e3b1a92 TGR |
2054 | name "/" name "-" version ".tar.gz")) |
2055 | (sha256 | |
d1c1d835 | 2056 | (base32 "0hqhnj2lzqacdbmmnpy91lsm1rd9zlngs1q6s9pyahsv1a0bfshx")))) |
2e3b1a92 TGR |
2057 | (build-system gnu-build-system) |
2058 | ;; The included minilzip binary is only ~16 smaller than the ‘real’ lzip. | |
2059 | ;; It's used during the test suite, but don't be tempted to install it. | |
2060 | (arguments | |
2061 | `(#:configure-flags | |
2062 | (list "CC=gcc" | |
2063 | "--enable-shared"))) ; only static (.a) is built by default | |
340978d7 | 2064 | (home-page "https://www.nongnu.org/lzip/lzlib.html") |
2e3b1a92 TGR |
2065 | (synopsis "Lzip data compression C library") |
2066 | (description | |
2067 | "Lzlib is a C library for in-memory LZMA compression and decompression in | |
2068 | the lzip format. It supports integrity checking of the decompressed data, and | |
2069 | all functions are thread-safe. The library should never crash, even in case of | |
2070 | corrupted input.") | |
2071 | (license (list license:bsd-2 ; the library itself | |
2072 | license:gpl2+)))) ; main.c (i.e. minilzip used by tests) | |
8c4ca853 TGR |
2073 | |
2074 | (define-public plzip | |
2075 | (package | |
2076 | (name "plzip") | |
10cac630 | 2077 | (version "1.7") |
8c4ca853 TGR |
2078 | (source |
2079 | (origin | |
2080 | (method url-fetch) | |
b7fd77ef | 2081 | (uri (string-append "mirror://savannah/lzip/" |
8c4ca853 TGR |
2082 | name "/" name "-" version ".tar.gz")) |
2083 | (sha256 | |
10cac630 | 2084 | (base32 "1dzjp9r7krwpsn224bhcqbzd5aj5b4556sdi9yzl2bzbk3fjrqlm")))) |
8c4ca853 TGR |
2085 | (build-system gnu-build-system) |
2086 | (inputs | |
2087 | `(("lzlib" ,lzlib))) | |
340978d7 | 2088 | (home-page "https://www.nongnu.org/lzip/plzip.html") |
8c4ca853 TGR |
2089 | (synopsis "Parallel lossless data compressor for the lzip format") |
2090 | (description | |
2091 | "Plzip is a massively parallel (multi-threaded) lossless data compressor | |
2092 | and decompressor that uses the lzip file format (.lz). Files produced by plzip | |
2093 | are fully compatible with lzip and can be rescued with lziprecover. | |
2094 | On multiprocessor machines, plzip can compress and decompress large files much | |
2095 | faster than lzip, at the cost of a slightly reduced compression ratio (0.4% to | |
2096 | 2%). The number of usable threads is limited by file size: on files of only a | |
2097 | few MiB, plzip is no faster than lzip. | |
2098 | Files that were compressed with regular lzip will also not be decompressed | |
2099 | faster by plzip, unless the @code{-b} option was used: lzip usually produces | |
2100 | single-member files which can't be decompressed in parallel.") | |
2101 | (license (list license:bsd-2 ; arg_parser.{cc,h} | |
2102 | license:gpl2+)))) ; everything else | |
e294c05e RH |
2103 | |
2104 | (define-public innoextract | |
2105 | (package | |
2106 | (name "innoextract") | |
2107 | (version "1.6") | |
2108 | (source | |
2109 | (origin | |
2110 | (method url-fetch) | |
2111 | (uri (string-append "https://github.com/dscharrer/innoextract/archive/" | |
2112 | version ".tar.gz")) | |
2113 | (sha256 | |
2114 | (base32 | |
2115 | "08sp5vbfjvq1irhhraqkn5m2x1z209r4axhx7laf1adcw30ccapi")) | |
2116 | (file-name (string-append name "-" version ".tar.gz")))) | |
2117 | (build-system cmake-build-system) | |
2118 | (arguments | |
2119 | `(#:tests? #f)) ;; No tests available. | |
2120 | (inputs `(("boost" ,boost) | |
2121 | ("libiconv" ,libiconv) | |
2122 | ("xz" ,xz))) | |
2123 | (native-inputs `(("pkg-config" ,pkg-config))) | |
2124 | (home-page "https://constexpr.org/innoextract/") | |
2125 | (synopsis "Tool for extracting Inno Setup installers") | |
2126 | (description "innoextract allows extracting Inno Setup installers under | |
2127 | non-Windows systems without running the actual installer using wine.") | |
2128 | (license license:zlib))) | |
2ed0ef2f LF |
2129 | |
2130 | (define-public google-brotli | |
2131 | (package | |
2132 | (name "google-brotli") | |
605ade44 | 2133 | (version "1.0.4") |
2ed0ef2f LF |
2134 | (source (origin |
2135 | (method url-fetch) | |
2136 | (uri (string-append "https://github.com/google/brotli/archive/v" | |
2137 | version ".tar.gz")) | |
2138 | (sha256 | |
2139 | (base32 | |
605ade44 | 2140 | "1hrpmz162k4x3xm6vmbpm443jlfr1kp536p8962y2dncy7gs6s12")))) |
2ed0ef2f LF |
2141 | (build-system cmake-build-system) |
2142 | (arguments | |
2143 | `(#:phases | |
2144 | (modify-phases %standard-phases | |
2145 | (add-after 'install 'rename-static-libraries | |
2146 | ;; The build tools put a 'static' suffix on the static libraries, but | |
2147 | ;; other applications don't know how to find these. | |
2148 | (lambda* (#:key outputs #:allow-other-keys) | |
2149 | (let ((lib (string-append (assoc-ref %outputs "out") "/lib/"))) | |
2150 | (rename-file (string-append lib "libbrotlicommon-static.a") | |
2151 | (string-append lib "libbrotlicommon.a")) | |
2152 | (rename-file (string-append lib "libbrotlidec-static.a") | |
2153 | (string-append lib "libbrotlidec.a")) | |
2154 | (rename-file (string-append lib "libbrotlienc-static.a") | |
2155 | (string-append lib "libbrotlienc.a")) | |
2156 | #t)))) | |
2157 | #:configure-flags | |
2158 | (list ;; Defaults to "lib64" on 64-bit archs. | |
2159 | (string-append "-DCMAKE_INSTALL_LIBDIR=" | |
2160 | (assoc-ref %outputs "out") "/lib")))) | |
2161 | (home-page "https://github.com/google/brotli") | |
2162 | (synopsis "General-purpose lossless compression") | |
2163 | (description "This package provides the reference implementation of Brotli, | |
2164 | a generic-purpose lossless compression algorithm that compresses data using a | |
2165 | combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd | |
2166 | order context modeling, with a compression ratio comparable to the best | |
2167 | currently available general-purpose compression methods. It is similar in speed | |
2168 | with @code{deflate} but offers more dense compression. | |
2169 | ||
2170 | The specification of the Brotli Compressed Data Format is defined in RFC 7932.") | |
2171 | (license license:expat))) | |
71987177 PN |
2172 | |
2173 | (define-public ucl | |
2174 | (package | |
2175 | (name "ucl") | |
2176 | (version "1.03") | |
2177 | (source (origin | |
2178 | (method url-fetch) | |
2179 | (uri (string-append "http://www.oberhumer.com/opensource/" | |
2180 | name "/download/" name "-" version ".tar.gz")) | |
2181 | (sha256 | |
2182 | (base32 | |
2183 | "0j036lkwsxvm15gr29n8wn07cqq79dswjs9k54939ms5zngjjrdq")))) | |
2184 | (build-system gnu-build-system) | |
2185 | (home-page "http://www.oberhumer.com/opensource/ucl/") | |
2186 | (synopsis "Portable lossless data compression library") | |
2187 | (description "UCL implements a number of compression algorithms that | |
2188 | achieve an excellent compression ratio while allowing fast decompression. | |
2189 | Decompression requires no additional memory. | |
2190 | ||
2191 | Compared to LZO, the UCL algorithms achieve a better compression ratio but | |
2192 | decompression is a little bit slower.") | |
2193 | (license license:gpl2+))) | |
5735256d PN |
2194 | |
2195 | (define-public upx | |
2196 | (package | |
2197 | (name "upx") | |
2198 | (version "3.94") | |
2199 | (source (origin | |
2200 | (method url-fetch) | |
2201 | (uri (string-append "https://github.com/upx/upx/releases/download/v" | |
2202 | version "/" name "-" version "-src.tar.xz")) | |
2203 | (sha256 | |
2204 | (base32 | |
2205 | "08anybdliqsbsl6x835iwzljahnm9i7v26icdjkcv33xmk6p5vw1")))) | |
2206 | (build-system gnu-build-system) | |
2207 | (native-inputs `(("perl" ,perl) | |
2208 | ("ucl" ,ucl))) | |
2209 | (inputs `(("zlib" ,zlib))) | |
2210 | (arguments | |
2211 | `(#:make-flags | |
2212 | (list "all" | |
2213 | ;; CHECK_WHITESPACE does not seem to work. | |
2214 | ;; See https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/upx. | |
2215 | "CHECK_WHITESPACE=true") | |
2216 | #:phases | |
2217 | (modify-phases %standard-phases | |
2218 | (delete 'configure) | |
2219 | (delete 'check) | |
2220 | (delete 'install) | |
2221 | (add-before 'build 'patch-exec-bin-sh | |
2222 | (lambda _ | |
2223 | (substitute* (find-files "Makefile") | |
2224 | (("/bin/sh") (which "sh"))) | |
2225 | (substitute* "src/Makefile" | |
2226 | (("/bin/sh") (which "sh"))) | |
2227 | #t)) | |
2228 | (add-after 'build 'install-upx | |
2229 | (lambda* (#:key outputs #:allow-other-keys) | |
2230 | (let* ((out (assoc-ref outputs "out")) | |
2231 | (bin (string-append out "/bin"))) | |
2232 | (mkdir-p bin) | |
2233 | (copy-file "src/upx.out" (string-append bin "/upx"))) | |
2234 | #t)) | |
2235 | ))) | |
2236 | (home-page "https://upx.github.io/") | |
2237 | (synopsis "Compression tool for executables") | |
2238 | (description | |
2239 | "The Ultimate Packer for eXecutables (UPX) is an executable file | |
2240 | compressor. UPX typically reduces the file size of programs and shared | |
2241 | libraries by around 50%--70%, thus reducing disk space, network load times, | |
2242 | download times, and other distribution and storage costs.") | |
2243 | (license license:gpl2+))) |