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> |
669b7b83 | 7 | ;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net> |
82aa2a28 | 8 | ;;; Copyright © 2015 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> |
36df995c | 13 | ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr> |
e4c2136d | 14 | ;;; Copyright © 2016 David Craven <david@craven.ch> |
adbd7faf | 15 | ;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org> |
618089f9 | 16 | ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com> |
1ae60db8 | 17 | ;;; Copyright © 2017 ng0 <contact.ng0@cryptolab.net> |
a268f085 | 18 | ;;; |
233e7676 | 19 | ;;; This file is part of GNU Guix. |
a268f085 | 20 | ;;; |
233e7676 | 21 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
a268f085 LC |
22 | ;;; under the terms of the GNU General Public License as published by |
23 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
24 | ;;; your option) any later version. | |
25 | ;;; | |
233e7676 | 26 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
a268f085 LC |
27 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
28 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
29 | ;;; GNU General Public License for more details. | |
30 | ;;; | |
31 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 32 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
a268f085 | 33 | |
1ffa7090 | 34 | (define-module (gnu packages compression) |
b5b73a82 | 35 | #:use-module ((guix licenses) #:prefix license:) |
21b2ec4d | 36 | #:use-module (guix utils) |
a268f085 | 37 | #:use-module (guix packages) |
87f5d366 | 38 | #:use-module (guix download) |
646898b3 | 39 | #:use-module (guix git-download) |
b357faac | 40 | #:use-module (guix build-system gnu) |
73f542c3 | 41 | #:use-module (guix build-system perl) |
1ae60db8 | 42 | #:use-module (guix build-system python) |
e99dd67a | 43 | #:use-module (gnu packages) |
389eb3fa | 44 | #:use-module (gnu packages assembly) |
69d9792a | 45 | #:use-module (gnu packages autotools) |
23f3cbb8 | 46 | #:use-module (gnu packages backup) |
73f542c3 | 47 | #:use-module (gnu packages base) |
0f03c531 | 48 | #:use-module (gnu packages check) |
646898b3 | 49 | #:use-module (gnu packages perl) |
23f3cbb8 | 50 | #:use-module (gnu packages pkg-config) |
1ae60db8 | 51 | #:use-module (gnu packages python) |
82aa2a28 | 52 | #:use-module (gnu packages valgrind) |
36df995c | 53 | #:use-module (ice-9 match) |
646898b3 | 54 | #:use-module ((srfi srfi-1) #:select (last))) |
a268f085 | 55 | |
6a92093d LC |
56 | (define-public zlib |
57 | (package | |
58 | (name "zlib") | |
2b8bea03 | 59 | (version "1.2.11") |
6a92093d LC |
60 | (source |
61 | (origin | |
87f5d366 | 62 | (method url-fetch) |
a67f97fe CR |
63 | (uri (list (string-append "http://zlib.net/zlib-" |
64 | version ".tar.gz") | |
b2859a4f LC |
65 | (string-append "mirror://sourceforge/libpng/zlib/" |
66 | version "/zlib-" version ".tar.gz"))) | |
6a92093d LC |
67 | (sha256 |
68 | (base32 | |
2b8bea03 | 69 | "18dighcs333gsvajvvgqp8l4cx7h1x7yx9gd5xacnk80spyykrf3")))) |
6a92093d LC |
70 | (build-system gnu-build-system) |
71 | (arguments | |
6cd00453 EF |
72 | `(#:phases |
73 | (modify-phases %standard-phases | |
74 | (replace 'configure | |
75 | (lambda* (#:key outputs #:allow-other-keys) | |
76 | ;; Zlib's home-made `configure' fails when passed | |
77 | ;; extra flags like `--enable-fast-install', so we need to | |
78 | ;; invoke it with just what it understand. | |
79 | (let ((out (assoc-ref outputs "out"))) | |
80 | ;; 'configure' doesn't understand '--host'. | |
81 | ,@(if (%current-target-system) | |
82 | `((setenv "CHOST" ,(%current-target-system))) | |
83 | '()) | |
84 | (zero? | |
85 | (system* "./configure" | |
86 | (string-append "--prefix=" out))))))))) | |
6a92093d | 87 | (home-page "http://zlib.net/") |
35b9e423 | 88 | (synopsis "Compression library") |
6a92093d LC |
89 | (description |
90 | "zlib is designed to be a free, general-purpose, legally unencumbered -- | |
91 | that is, not covered by any patents -- lossless data-compression library for | |
92 | use on virtually any computer hardware and operating system. The zlib data | |
35b9e423 | 93 | format is itself portable across platforms. Unlike the LZW compression method |
6a92093d LC |
94 | used in Unix compress(1) and in the GIF image format, the compression method |
95 | currently used in zlib essentially never expands the data. (LZW can double or | |
96 | triple the file size in extreme cases.) zlib's memory footprint is also | |
97 | independent of the input data and can be reduced, if necessary, at some cost | |
98 | in compression.") | |
4a44e743 | 99 | (license license:zlib))) |
6a92093d | 100 | |
8298df96 MB |
101 | (define-public minizip |
102 | (package | |
103 | (name "minizip") | |
104 | (version (package-version zlib)) | |
105 | (source (package-source zlib)) | |
106 | (build-system gnu-build-system) | |
107 | (arguments | |
108 | `(#:phases | |
109 | (modify-phases %standard-phases | |
110 | (add-after 'unpack 'enter-source | |
111 | (lambda _ (chdir "contrib/minizip") #t)) | |
112 | (add-before 'configure 'autoreconf | |
113 | (lambda _ | |
114 | (zero? (system* "autoreconf" "-vif"))))))) | |
115 | (native-inputs | |
116 | `(("autoconf" ,autoconf) | |
117 | ("automake" ,automake) | |
118 | ("libtool" ,libtool))) | |
119 | (propagated-inputs `(("zlib" ,zlib))) | |
120 | (home-page (package-home-page zlib)) | |
121 | (synopsis "Zip Compression library") | |
122 | (description | |
123 | "Minizip is a minimalistic library that supports compressing, | |
124 | extracting and viewing ZIP archives. This version is extracted from | |
125 | the @code{zlib} source.") | |
126 | (license (package-license zlib)))) | |
127 | ||
ee97be9f RW |
128 | (define-public fastjar |
129 | (package | |
130 | (name "fastjar") | |
131 | (version "0.98") | |
132 | (source (origin | |
133 | (method url-fetch) | |
134 | (uri (string-append "mirror://savannah/fastjar/fastjar-" | |
135 | version ".tar.gz")) | |
136 | (sha256 | |
137 | (base32 | |
138 | "0iginbz2m15hcsa3x4y7v3mhk54gr1r7m3ghx0pg4n46vv2snmpi")))) | |
139 | (build-system gnu-build-system) | |
140 | (inputs `(("zlib" ,zlib))) | |
141 | (home-page "http://savannah.nongnu.org/projects/fastjar") | |
142 | (synopsis "Replacement for Sun's 'jar' utility") | |
143 | (description | |
144 | "FastJar is an attempt to create a much faster replacement for Sun's 'jar' | |
145 | utility. Instead of being written in Java, FastJar is written in C.") | |
146 | (license license:gpl2+))) | |
147 | ||
58593975 RW |
148 | (define-public libtar |
149 | (package | |
150 | (name "libtar") | |
89d80159 | 151 | (version "1.2.20") |
58593975 RW |
152 | (source (origin |
153 | (method url-fetch) | |
89d80159 EF |
154 | (uri (list |
155 | (string-append | |
156 | "ftp://ftp.feep.net/pub/software/libtar/libtar-" | |
157 | version ".tar.gz") | |
158 | (string-append | |
159 | "mirror://debian/pool/main/libt/libtar/libtar_" | |
160 | version ".orig.tar.gz"))) | |
58593975 RW |
161 | (sha256 |
162 | (base32 | |
e99dd67a EF |
163 | "02cihzl77ia0dcz7z2cga2412vyhhs5pa2355q4wpwbyga2lrwjh")) |
164 | (patches (search-patches "libtar-CVE-2013-4420.patch")))) | |
58593975 | 165 | (build-system gnu-build-system) |
89d80159 EF |
166 | (arguments |
167 | `(#:tests? #f ;no "check" target | |
168 | #:phases | |
169 | (modify-phases %standard-phases | |
170 | (add-after 'unpack 'autoconf | |
171 | (lambda _ (zero? (system* "sh" "autoreconf" "-vfi"))))))) | |
172 | (native-inputs | |
173 | `(("autoconf" ,autoconf) | |
174 | ("automake" ,automake) | |
175 | ("libtool" ,libtool))) | |
176 | (inputs | |
177 | `(("zlib" ,zlib))) | |
58593975 RW |
178 | (synopsis "C library for manipulating POSIX tar files") |
179 | (description | |
180 | "libtar is a C library for manipulating POSIX tar files. It handles | |
181 | adding and extracting files to/from a tar archive.") | |
89d80159 | 182 | (home-page "https://repo.or.cz/libtar.git") |
58593975 RW |
183 | (license license:bsd-3))) |
184 | ||
a268f085 LC |
185 | (define-public gzip |
186 | (package | |
187 | (name "gzip") | |
0bfb9b43 | 188 | (version "1.8") |
a268f085 | 189 | (source (origin |
87f5d366 | 190 | (method url-fetch) |
0db342a5 | 191 | (uri (string-append "mirror://gnu/gzip/gzip-" |
28181faf | 192 | version ".tar.xz")) |
a268f085 LC |
193 | (sha256 |
194 | (base32 | |
0bfb9b43 | 195 | "1lxv3p4iyx7833mlihkn5wfwmz4cys5nybwpz3dfawag8kn6f5zz")))) |
a268f085 | 196 | (build-system gnu-build-system) |
f50d2669 | 197 | (synopsis "General file (de)compression (using lzw)") |
a268f085 LC |
198 | (arguments |
199 | ;; FIXME: The test suite wants `less', and optionally Perl. | |
200 | '(#:tests? #f)) | |
201 | (description | |
79c311b8 LC |
202 | "GNU Gzip provides data compression and decompression utilities; the |
203 | typical extension is \".gz\". Unlike the \"zip\" format, it compresses a single | |
204 | file; as a result, it is often used in conjunction with \"tar\", resulting in | |
205 | \".tar.gz\" or \".tgz\", etc.") | |
4a44e743 | 206 | (license license:gpl3+) |
6fd52309 | 207 | (home-page "https://www.gnu.org/software/gzip/"))) |
a268f085 LC |
208 | |
209 | (define-public bzip2 | |
03bc86b8 CB |
210 | (package |
211 | (name "bzip2") | |
212 | (version "1.0.6") | |
213 | (source (origin | |
214 | (method url-fetch) | |
215 | (uri (string-append "http://www.bzip.org/" version "/bzip2-" | |
216 | version ".tar.gz")) | |
217 | (sha256 | |
218 | (base32 | |
219 | "1kfrc7f0ja9fdn6j1y6yir6li818npy6217hvr3wzmnmzhs8z152")))) | |
220 | (build-system gnu-build-system) | |
221 | (arguments | |
222 | `(#:modules ((guix build gnu-build-system) | |
223 | (guix build utils) | |
224 | (srfi srfi-1)) | |
225 | #:phases | |
226 | (modify-phases %standard-phases | |
227 | (replace 'configure | |
228 | (lambda* (#:key target #:allow-other-keys) | |
229 | (if ,(%current-target-system) | |
230 | ;; Cross-compilation: use the cross tools. | |
231 | (substitute* (find-files "." "Makefile") | |
232 | (("CC=.*$") | |
233 | (string-append "CC = " target "-gcc\n")) | |
234 | (("AR=.*$") | |
235 | (string-append "AR = " target "-ar\n")) | |
236 | (("RANLIB=.*$") | |
237 | (string-append "RANLIB = " target "-ranlib\n")) | |
238 | (("^all:(.*)test" _ prerequisites) | |
239 | ;; Remove 'all' -> 'test' dependency. | |
240 | (string-append "all:" prerequisites "\n"))) | |
241 | #t))) | |
242 | (add-before 'build 'build-shared-lib | |
243 | (lambda* (#:key inputs #:allow-other-keys) | |
244 | (patch-makefile-SHELL "Makefile-libbz2_so") | |
245 | (zero? (system* "make" "-f" "Makefile-libbz2_so")))) | |
246 | (add-after 'install 'install-shared-lib | |
247 | (lambda* (#:key outputs #:allow-other-keys) | |
248 | (let* ((out (assoc-ref outputs "out")) | |
249 | (libdir (string-append out "/lib"))) | |
250 | (for-each (lambda (file) | |
251 | (let ((base (basename file))) | |
252 | (format #t "installing `~a' to `~a'~%" | |
253 | base libdir) | |
254 | (copy-file file | |
255 | (string-append libdir "/" base)))) | |
256 | (find-files "." "^libbz2\\.so"))) | |
257 | #t))) | |
ab4fab19 | 258 | |
03bc86b8 CB |
259 | #:make-flags (list (string-append "PREFIX=" |
260 | (assoc-ref %outputs "out"))) | |
ab4fab19 | 261 | |
03bc86b8 CB |
262 | ;; Don't attempt to run the tests when cross-compiling. |
263 | ,@(if (%current-target-system) | |
264 | '(#:tests? #f) | |
265 | '()))) | |
266 | (synopsis "High-quality data compression program") | |
267 | (description | |
268 | "bzip2 is a freely available, patent free (see below), high-quality data | |
a268f085 LC |
269 | compressor. It typically compresses files to within 10% to 15% of the best |
270 | available techniques (the PPM family of statistical compressors), whilst | |
271 | being around twice as fast at compression and six times faster at | |
272 | decompression.") | |
03bc86b8 CB |
273 | (license (license:non-copyleft "file://LICENSE" |
274 | "See LICENSE in the distribution.")) | |
275 | (home-page "http://www.bzip.org/"))) | |
a268f085 | 276 | |
669b7b83 RW |
277 | (define-public lbzip2 |
278 | (package | |
279 | (name "lbzip2") | |
280 | (version "2.5") | |
281 | (source (origin | |
282 | (method url-fetch) | |
283 | (uri (string-append "http://archive.lbzip2.org/lbzip2-" | |
284 | version ".tar.gz")) | |
285 | (sha256 | |
286 | (base32 | |
287 | "1sahaqc5bw4i0iyri05syfza4ncf5cml89an033fspn97klmxis6")))) | |
288 | (build-system gnu-build-system) | |
289 | (synopsis "Parallel bzip2 compression utility") | |
290 | (description | |
291 | "lbzip2 is a multi-threaded compression utility with support for the | |
292 | bzip2 compressed file format. lbzip2 can process standard bz2 files in | |
293 | parallel. It uses POSIX threading model (pthreads), which allows it to take | |
294 | full advantage of symmetric multiprocessing (SMP) systems. It has been proven | |
295 | to scale linearly, even to over one hundred processor cores. lbzip2 is fully | |
296 | compatible with bzip2 – both at file format and command line level.") | |
297 | (home-page "http://www.lbzip2.org/") | |
298 | (license license:gpl3+))) | |
299 | ||
5d47eab0 EF |
300 | (define-public pbzip2 |
301 | (package | |
302 | (name "pbzip2") | |
303 | (version "1.1.12") | |
304 | (source (origin | |
305 | (method url-fetch) | |
21b2ec4d EF |
306 | (uri (string-append "https://launchpad.net/pbzip2/" |
307 | (version-major+minor version) "/" version | |
308 | "/+download/" name "-" version ".tar.gz")) | |
5d47eab0 EF |
309 | (sha256 |
310 | (base32 | |
311 | "1vk6065dv3a47p86vmp8hv3n1ygd9hraz0gq89gvzlx7lmcb6fsp")))) | |
312 | (build-system gnu-build-system) | |
313 | (inputs | |
b3546174 | 314 | `(("bzip2" ,bzip2))) |
5d47eab0 EF |
315 | (arguments |
316 | `(#:tests? #f ; no tests | |
317 | #:phases (modify-phases %standard-phases | |
21b2ec4d EF |
318 | (delete 'configure)) |
319 | #:make-flags (list (string-append "PREFIX=" %output)))) | |
5d47eab0 EF |
320 | (home-page "http://compression.ca/pbzip2/") |
321 | (synopsis "Parallel bzip2 implementation") | |
322 | (description | |
323 | "Pbzip2 is a parallel implementation of the bzip2 block-sorting file | |
324 | compressor that uses pthreads and achieves near-linear speedup on SMP machines. | |
21b2ec4d | 325 | The output of this version is fully compatible with bzip2 v1.0.2 (i.e. anything |
5d47eab0 EF |
326 | compressed with pbzip2 can be decompressed with bzip2).") |
327 | (license (license:non-copyleft "file://COPYING" | |
21b2ec4d | 328 | "See COPYING in the distribution.")))) |
5d47eab0 | 329 | |
a268f085 LC |
330 | (define-public xz |
331 | (package | |
332 | (name "xz") | |
4655f515 | 333 | (version "5.2.2") |
a268f085 | 334 | (source (origin |
87f5d366 | 335 | (method url-fetch) |
52d76b64 LC |
336 | (uri (list (string-append "http://tukaani.org/xz/xz-" version |
337 | ".tar.gz") | |
338 | (string-append "http://multiprecision.org/guix/xz-" | |
339 | version ".tar.gz"))) | |
a268f085 LC |
340 | (sha256 |
341 | (base32 | |
4655f515 | 342 | "18h2k4jndhzjs8ln3a54qdnfv59y6spxiwh9gpaqniph6iflvpvk")))) |
a268f085 | 343 | (build-system gnu-build-system) |
35b9e423 | 344 | (synopsis "General-purpose data compression") |
a268f085 LC |
345 | (description |
346 | "XZ Utils is free general-purpose data compression software with high | |
347 | compression ratio. XZ Utils were written for POSIX-like systems, but also | |
348 | work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils. | |
349 | ||
350 | The core of the XZ Utils compression code is based on LZMA SDK, but it has | |
351 | been modified quite a lot to be suitable for XZ Utils. The primary | |
352 | compression algorithm is currently LZMA2, which is used inside the .xz | |
353 | container format. With typical files, XZ Utils create 30 % smaller output | |
354 | than gzip and 15 % smaller output than bzip2.") | |
38bbd61d | 355 | (license (list license:gpl2+ license:lgpl2.1+)) ; bits of both |
a268f085 | 356 | (home-page "http://tukaani.org/xz/"))) |
c6eac761 LC |
357 | |
358 | (define-public lzo | |
359 | (package | |
360 | (name "lzo") | |
c0ec516d | 361 | (version "2.09") |
c6eac761 LC |
362 | (source |
363 | (origin | |
364 | (method url-fetch) | |
365 | (uri (string-append "http://www.oberhumer.com/opensource/lzo/download/lzo-" | |
366 | version ".tar.gz")) | |
367 | (sha256 | |
368 | (base32 | |
c0ec516d | 369 | "0k5kpj3jnsjfxqqkblpfpx0mqcy86zs5fhjhgh2kq1hksg7ag57j")))) |
c6eac761 | 370 | (build-system gnu-build-system) |
165fd9d5 | 371 | (arguments '(#:configure-flags '("--enable-shared"))) |
c6eac761 LC |
372 | (home-page "http://www.oberhumer.com/opensource/lzo") |
373 | (synopsis | |
e881752c | 374 | "Data compression library suitable for real-time data de-/compression") |
c6eac761 LC |
375 | (description |
376 | "LZO is a data compression library which is suitable for data | |
377 | de-/compression in real-time. This means it favours speed over | |
378 | compression ratio. | |
379 | ||
380 | LZO is written in ANSI C. Both the source code and the compressed data | |
381 | format are designed to be portable across platforms.") | |
4a44e743 | 382 | (license license:gpl2+))) |
0f323dad | 383 | |
1a0a5509 | 384 | (define-public python-lzo |
385 | (package | |
386 | (name "python-lzo") | |
387 | (version "1.11") | |
388 | (source | |
389 | (origin | |
390 | (method url-fetch) | |
391 | (uri (pypi-uri "python-lzo" version)) | |
392 | (sha256 | |
393 | (base32 | |
394 | "11p3ifg14p086byhhin6azx5svlkg8dzw2b5abixik97xd6fm81q")))) | |
395 | (build-system python-build-system) | |
396 | (arguments | |
397 | `(#:test-target "check" | |
398 | #:phases | |
399 | (modify-phases %standard-phases | |
400 | (add-after 'unpack 'patch-setuppy | |
401 | (lambda _ | |
402 | (substitute* "setup.py" | |
403 | (("include_dirs.append\\(.*\\)") | |
404 | (string-append "include_dirs.append('" | |
405 | (assoc-ref %build-inputs "lzo") | |
406 | "/include/lzo" | |
407 | "')"))) | |
408 | #t))))) | |
409 | (inputs | |
410 | `(("lzo" ,lzo))) | |
411 | (home-page "https://github.com/jd-boyd/python-lzo") | |
412 | (synopsis "Python bindings for the LZO data compression library") | |
413 | (description | |
414 | "Python-LZO provides Python bindings for LZO, i.e. you can access | |
415 | the LZO library from your Python scripts thereby compressing ordinary | |
416 | Python strings.") | |
417 | (license license:gpl2+))) | |
418 | ||
419 | (define-public python2-lzo | |
420 | (package-with-python2 python-lzo)) | |
421 | ||
a9f48ff0 EB |
422 | (define-public lzop |
423 | (package | |
424 | (name "lzop") | |
425 | (version "1.03") | |
426 | (source | |
427 | (origin | |
428 | (method url-fetch) | |
429 | (uri (string-append "http://www.lzop.org/download/lzop-" | |
430 | version ".tar.gz")) | |
431 | (sha256 | |
432 | (base32 | |
433 | "1jdjvc4yjndf7ihmlcsyln2rbnbaxa86q4jskmkmm7ylfy65nhn1")))) | |
434 | (build-system gnu-build-system) | |
435 | (inputs `(("lzo" ,lzo))) | |
436 | (home-page "http://www.lzop.org/") | |
437 | (synopsis "Compress or expand files") | |
438 | (description | |
439 | "Lzop is a file compressor which is very similar to gzip. Lzop uses the | |
440 | LZO data compression library for compression services, and its main advantages | |
441 | over gzip are much higher compression and decompression speed (at the cost of | |
442 | some compression ratio).") | |
443 | (license license:gpl2+))) | |
444 | ||
0f323dad LC |
445 | (define-public lzip |
446 | (package | |
447 | (name "lzip") | |
dede6449 | 448 | (version "1.18") |
0f323dad LC |
449 | (source (origin |
450 | (method url-fetch) | |
451 | (uri (string-append "mirror://savannah/lzip/lzip-" | |
452 | version ".tar.gz")) | |
453 | (sha256 | |
454 | (base32 | |
28938feb | 455 | "1p8lvc22sv3damld9ng8y6i8z2dvvpsbi9v7yhr5bc2a20m8iya7")))) |
0f323dad LC |
456 | (build-system gnu-build-system) |
457 | (home-page "http://www.nongnu.org/lzip/lzip.html") | |
458 | (synopsis "Lossless data compressor based on the LZMA algorithm") | |
459 | (description | |
460 | "Lzip is a lossless data compressor with a user interface similar to the | |
461 | one of gzip or bzip2. Lzip decompresses almost as fast as gzip and compresses | |
462 | more than bzip2, which makes it well suited for software distribution and data | |
463 | archiving. Lzip is a clean implementation of the LZMA algorithm.") | |
464 | (license license:gpl3+))) | |
b357faac AE |
465 | |
466 | (define-public sharutils | |
467 | (package | |
468 | (name "sharutils") | |
9a59ce24 | 469 | (version "4.15.2") |
b357faac AE |
470 | (source |
471 | (origin | |
472 | (method url-fetch) | |
473 | (uri (string-append "mirror://gnu/sharutils/sharutils-" | |
474 | version ".tar.xz")) | |
475 | (sha256 | |
476 | (base32 | |
9a59ce24 | 477 | "16isapn8f39lnffc3dp4dan05b7x6mnc76v6q5nn8ysxvvvwy19b")))) |
b357faac AE |
478 | (build-system gnu-build-system) |
479 | (inputs | |
480 | `(("which" ,which))) | |
481 | (arguments | |
482 | `(#:phases | |
483 | (alist-cons-after | |
484 | 'patch-source-shebangs 'unpatch-source-shebang | |
485 | ;; revert the patch-shebang phase on a script which is | |
486 | ;; in fact test data | |
d4bf49b1 | 487 | (lambda _ |
b357faac AE |
488 | (substitute* "tests/shar-1.ok" |
489 | (((which "sh")) "/bin/sh"))) | |
490 | %standard-phases))) | |
6fd52309 | 491 | (home-page "https://www.gnu.org/software/sharutils/") |
b357faac AE |
492 | (synopsis "Archives in shell scripts, uuencode/uudecode") |
493 | (description | |
79c311b8 LC |
494 | "GNU sharutils is a package for creating and manipulating shell |
495 | archives that can be readily emailed. A shell archive is a file that can be | |
e881752c | 496 | processed by a Bourne-type shell to unpack the original collection of files. |
79c311b8 | 497 | This package is mostly for compatibility and historical interest.") |
b357faac | 498 | (license license:gpl3+))) |
28469ab0 | 499 | |
646898b3 RW |
500 | (define-public sfarklib |
501 | (package | |
502 | (name "sfarklib") | |
979f9e8a | 503 | (version "2.24") |
646898b3 | 504 | (source (origin |
979f9e8a RW |
505 | (method url-fetch) |
506 | (uri (string-append "https://github.com/raboof/sfArkLib/archive/" | |
507 | version ".tar.gz")) | |
508 | (file-name (string-append name "-" version ".tar.gz")) | |
646898b3 RW |
509 | (sha256 |
510 | (base32 | |
979f9e8a | 511 | "0bzs2d98rk1xw9qwpnc7gmlbxwmwc3dg1rpn310afy9pq1k9clzi")))) |
646898b3 RW |
512 | (build-system gnu-build-system) |
513 | (arguments | |
514 | `(#:tests? #f ;no "check" target | |
515 | #:phases | |
516 | (modify-phases %standard-phases | |
517 | (replace 'configure | |
518 | (lambda* (#:key outputs #:allow-other-keys) | |
519 | (substitute* "Makefile" | |
520 | (("/usr/local") (assoc-ref outputs "out"))) | |
521 | #t))))) | |
522 | (inputs | |
523 | `(("zlib" ,zlib))) | |
524 | (home-page "https://github.com/raboof/sfArkLib") | |
525 | (synopsis "Library for SoundFont decompression") | |
526 | (description | |
527 | "SfArkLib is a C++ library for decompressing SoundFont files compressed | |
528 | with the sfArk algorithm.") | |
529 | (license license:gpl3+))) | |
530 | ||
b5ad1659 | 531 | (define-public sfarkxtc |
698bd297 | 532 | (let ((commit "b5e0a2ba3921f019d74d4b92bd31c36dd19d2cf1")) |
b5ad1659 RW |
533 | (package |
534 | (name "sfarkxtc") | |
698bd297 | 535 | (version (string-take commit 10)) |
b5ad1659 RW |
536 | (source (origin |
537 | ;; There are no release tarballs, so we just fetch the latest | |
538 | ;; commit at this time. | |
539 | (method git-fetch) | |
540 | (uri (git-reference | |
541 | (url "https://github.com/raboof/sfarkxtc.git") | |
698bd297 | 542 | (commit commit))) |
b5ad1659 RW |
543 | (sha256 |
544 | (base32 | |
545 | "0f5x6i46qfl6ry21s7g2p4sd4b2r1g4fb03yqi2vv4kq3saryhvj")))) | |
546 | (build-system gnu-build-system) | |
547 | (arguments | |
548 | `(#:tests? #f ;no "check" target | |
549 | #:phases | |
550 | (modify-phases %standard-phases | |
551 | (replace 'configure | |
552 | (lambda* (#:key outputs #:allow-other-keys) | |
553 | (substitute* "Makefile" | |
554 | (("/usr/local") (assoc-ref outputs "out"))) | |
555 | #t))))) | |
556 | (inputs | |
557 | `(("zlib" ,zlib) | |
558 | ("sfarklib" ,sfarklib))) | |
559 | (home-page "https://github.com/raboof/sfarkxtc") | |
560 | (synopsis "Basic sfArk decompressor") | |
561 | (description "SfArk extractor converts SoundFonts in the compressed legacy | |
562 | sfArk file format to the uncompressed sf2 format.") | |
698bd297 | 563 | (license license:gpl3+)))) |
b5ad1659 | 564 | |
27f76fe6 TUBK |
565 | (define-public libmspack |
566 | (package | |
567 | (name "libmspack") | |
568 | (version "0.5") | |
569 | (source | |
570 | (origin | |
571 | (method url-fetch) | |
572 | (uri (string-append "http://www.cabextract.org.uk/libmspack/libmspack-" | |
573 | version "alpha.tar.gz")) | |
574 | (sha256 | |
575 | (base32 "04413hynb7zizxnkgy9riik3612dwirkpr6fcjrnfl2za9sz4rw9")))) | |
576 | (build-system gnu-build-system) | |
577 | (home-page "http://www.cabextract.org.uk/libmspack/") | |
578 | (synopsis "Compression tools for some formats used by Microsoft") | |
579 | (description | |
580 | "The purpose of libmspack is to provide both compression and | |
581 | decompression of some loosely related file formats used by Microsoft.") | |
582 | (license license:lgpl2.1+))) | |
73f542c3 EB |
583 | |
584 | (define-public perl-compress-raw-bzip2 | |
585 | (package | |
586 | (name "perl-compress-raw-bzip2") | |
c0b7b797 | 587 | (version "2.074") |
73f542c3 EB |
588 | (source |
589 | (origin | |
590 | (method url-fetch) | |
591 | (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/" | |
592 | "Compress-Raw-Bzip2-" version ".tar.gz")) | |
593 | (sha256 | |
594 | (base32 | |
c0b7b797 | 595 | "0b5jwqf15zr787acnx8sfyy2zavdd7gfkd98n1dgy8fs6r8yb8a4")))) |
73f542c3 EB |
596 | (build-system perl-build-system) |
597 | ;; TODO: Use our bzip2 package. | |
598 | (home-page "http://search.cpan.org/dist/Compress-Raw-Bzip2") | |
599 | (synopsis "Low-level interface to bzip2 compression library") | |
600 | (description "This module provides a Perl interface to the bzip2 | |
601 | compression library.") | |
602 | (license (package-license perl)))) | |
8e18514a EB |
603 | |
604 | (define-public perl-compress-raw-zlib | |
605 | (package | |
606 | (name "perl-compress-raw-zlib") | |
02b067d7 | 607 | (version "2.074") |
8e18514a EB |
608 | (source |
609 | (origin | |
610 | (method url-fetch) | |
611 | (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/" | |
612 | "Compress-Raw-Zlib-" version ".tar.gz")) | |
613 | (sha256 | |
614 | (base32 | |
02b067d7 | 615 | "08bpx9v6i40n54rdcj6invlj294z20amrl8wvwf9b83aldwdwsd3")))) |
8e18514a EB |
616 | (build-system perl-build-system) |
617 | (inputs | |
618 | `(("zlib" ,zlib))) | |
619 | (arguments | |
620 | `(#:phases (modify-phases %standard-phases | |
621 | (add-before | |
40b084a3 | 622 | 'configure 'configure-zlib |
8e18514a EB |
623 | (lambda* (#:key inputs #:allow-other-keys) |
624 | (call-with-output-file "config.in" | |
625 | (lambda (port) | |
626 | (format port " | |
627 | BUILD_ZLIB = False | |
628 | INCLUDE = ~a/include | |
629 | LIB = ~:*~a/lib | |
630 | OLD_ZLIB = False | |
631 | GZIP_OS_CODE = AUTO_DETECT" | |
632 | (assoc-ref inputs "zlib"))))))))) | |
633 | (home-page "http://search.cpan.org/dist/Compress-Raw-Zlib") | |
634 | (synopsis "Low-level interface to zlib compression library") | |
635 | (description "This module provides a Perl interface to the zlib | |
636 | compression library.") | |
637 | (license (package-license perl)))) | |
8aaafd34 EB |
638 | |
639 | (define-public perl-io-compress | |
640 | (package | |
641 | (name "perl-io-compress") | |
c70b50ef | 642 | (version "2.074") |
8aaafd34 EB |
643 | (source |
644 | (origin | |
645 | (method url-fetch) | |
646 | (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/" | |
647 | "IO-Compress-" version ".tar.gz")) | |
648 | (sha256 | |
649 | (base32 | |
c70b50ef | 650 | "1wlpy2026djfmq0bjync531yq6s695jf7bcnpvjphrasi776igdl")))) |
8aaafd34 EB |
651 | (build-system perl-build-system) |
652 | (propagated-inputs | |
c70b50ef EF |
653 | `(("perl-compress-raw-zlib" ,perl-compress-raw-zlib) ; >=2.074 |
654 | ("perl-compress-raw-bzip2" ,perl-compress-raw-bzip2))) ; >=2.074 | |
8aaafd34 EB |
655 | (home-page "http://search.cpan.org/dist/IO-Compress") |
656 | (synopsis "IO Interface to compressed files/buffers") | |
657 | (description "IO-Compress provides a Perl interface to allow reading and | |
658 | writing of compressed data created with the zlib and bzip2 libraries.") | |
659 | (license (package-license perl)))) | |
82aa2a28 LF |
660 | |
661 | (define-public lz4 | |
662 | (package | |
663 | (name "lz4") | |
fc89cb69 | 664 | (version "1.7.4.2") |
82aa2a28 LF |
665 | (source |
666 | (origin | |
667 | (method url-fetch) | |
668 | (uri (string-append "https://github.com/Cyan4973/lz4/archive/" | |
fc89cb69 | 669 | "v" version ".tar.gz")) |
82aa2a28 | 670 | (sha256 |
fc89cb69 | 671 | (base32 "0l39bymif15rmmfz7h6wvrr853rix4wj8wbqq8z8fm49xa7gx9fb")) |
82aa2a28 LF |
672 | (file-name (string-append name "-" version ".tar.gz")))) |
673 | (build-system gnu-build-system) | |
fc89cb69 | 674 | (native-inputs `(("valgrind" ,valgrind))) ; for tests |
82aa2a28 LF |
675 | (arguments |
676 | `(#:test-target "test" | |
677 | #:parallel-tests? #f ; tests fail if run in parallel | |
678 | #:make-flags (list "CC=gcc" | |
679 | (string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
680 | #:phases (modify-phases %standard-phases | |
fc89cb69 | 681 | (delete 'configure)))) ; no configure script |
82aa2a28 LF |
682 | (home-page "https://github.com/Cyan4973/lz4") |
683 | (synopsis "Compression algorithm focused on speed") | |
684 | (description "LZ4 is a lossless compression algorithm, providing | |
685 | compression speed at 400 MB/s per core (0.16 Bytes/cycle). It also features an | |
686 | extremely fast decoder, with speed in multiple GB/s per core (0.71 Bytes/cycle). | |
687 | A high compression derivative, called LZ4_HC, is also provided. It trades CPU | |
688 | time for compression ratio.") | |
689 | ;; The libraries (lz4, lz4hc, and xxhash are BSD licenced. The command | |
690 | ;; line interface programs (lz4, fullbench, fuzzer, datagen) are GPL2+. | |
691 | (license (list license:bsd-2 license:gpl2+)))) | |
dd8d6d65 | 692 | |
1ae60db8 | 693 | (define-public python-lz4 |
694 | (package | |
695 | (name "python-lz4") | |
696 | (version "0.8.2") | |
697 | (source | |
698 | (origin | |
699 | (method url-fetch) | |
700 | (uri (pypi-uri "lz4" version)) | |
701 | (sha256 | |
702 | (base32 | |
703 | "1irad4sq4hdr30fr53smvv3zzk4rddcf9b4jx19w8s9xsxhr1x3b")))) | |
704 | (build-system python-build-system) | |
705 | (native-inputs | |
706 | `(("python-nose" ,python-nose))) | |
707 | (home-page "https://github.com/python-lz4/python-lz4") | |
708 | (synopsis "LZ4 Bindings for Python") | |
709 | (description | |
710 | "This package provides python bindings for the lz4 compression library | |
711 | by Yann Collet. The project contains bindings for the LZ4 block format and | |
712 | the LZ4 frame format.") | |
713 | (license license:bsd-3))) | |
714 | ||
715 | (define-public python2-lz4 | |
716 | (package-with-python2 python-lz4)) | |
717 | ||
dd8d6d65 SB |
718 | (define-public squashfs-tools |
719 | (package | |
720 | (name "squashfs-tools") | |
721 | (version "4.3") | |
722 | (source (origin | |
723 | (method url-fetch) | |
de67e922 LF |
724 | (uri (string-append "mirror://sourceforge/squashfs/squashfs/" |
725 | "squashfs" version "/" | |
dd8d6d65 SB |
726 | "squashfs" version ".tar.gz")) |
727 | (sha256 | |
728 | (base32 | |
729 | "1xpklm0y43nd9i6jw43y2xh5zvlmj9ar2rvknh0bh7kv8c95aq0d")))) | |
730 | (build-system gnu-build-system) | |
731 | (arguments | |
732 | '(#:tests? #f ; no check target | |
733 | #:make-flags | |
734 | (list "CC=gcc" | |
735 | "XZ_SUPPORT=1" | |
736 | "LZO_SUPPORT=1" | |
737 | "LZ4_SUPPORT=1" | |
738 | (string-append "INSTALL_DIR=" %output "/bin")) | |
739 | #:phases | |
740 | (modify-phases %standard-phases | |
741 | (replace 'configure | |
742 | (lambda _ | |
743 | (chdir "squashfs-tools")))))) | |
744 | (inputs | |
745 | `(("lz4" ,lz4) | |
746 | ("lzo" ,lzo) | |
747 | ("xz" ,xz) | |
748 | ("zlib" ,zlib))) | |
749 | (home-page "http://squashfs.sourceforge.net/") | |
8f65585b | 750 | (synopsis "Tools to create and extract squashfs file systems") |
dd8d6d65 | 751 | (description |
8f65585b | 752 | "Squashfs is a highly compressed read-only file system for Linux. It uses |
dd8d6d65 SB |
753 | zlib to compress files, inodes, and directories. All blocks are packed to |
754 | minimize the data overhead, and block sizes of between 4K and 1M are supported. | |
755 | It is intended to be used for archival use, for live CDs, and for embedded | |
756 | systems where low overhead is needed. This package allows you to create and | |
8f65585b | 757 | extract such file systems.") |
dd8d6d65 | 758 | (license license:gpl2+))) |
820dc3f5 JM |
759 | |
760 | (define-public pigz | |
761 | (package | |
762 | (name "pigz") | |
763 | (version "2.3.3") | |
764 | (source (origin | |
765 | (method url-fetch) | |
766 | (uri (string-append "http://zlib.net/pigz/" | |
767 | name "-" version ".tar.gz")) | |
768 | (sha256 | |
769 | (base32 | |
770 | "172hdf26k4zmm7z8md7nl0dph2a7mhf3x7slb9bhfyff6as6g2sf")))) | |
771 | (build-system gnu-build-system) | |
772 | (arguments | |
773 | `(#:phases | |
774 | (modify-phases %standard-phases | |
775 | (delete 'configure) | |
776 | (replace 'install | |
777 | (lambda* (#:key outputs #:allow-other-keys) | |
778 | (let* ((out (assoc-ref outputs "out")) | |
779 | (bin (string-append out "/bin")) | |
780 | (man (string-append out "/share/man/man1"))) | |
781 | (install-file "pigz" bin) | |
782 | (symlink "pigz" (string-append bin "/unpigz")) | |
783 | (install-file "pigz.1" man) | |
784 | #t)))) | |
785 | #:make-flags (list "CC=gcc") | |
786 | #:test-target "tests")) | |
787 | (inputs `(("zlib" ,zlib))) | |
788 | (home-page "http://zlib.net/pigz/") | |
789 | (synopsis "Parallel implementation of gzip") | |
790 | (description | |
791 | "This package provides a parallel implementation of gzip that exploits | |
792 | multiple processors and multiple cores when compressing data.") | |
793 | ||
794 | ;; Things under zopfli/ are under ASL2.0, but 4 files at the top-level, | |
795 | ;; written by Mark Adler, are under another non-copyleft license. | |
796 | (license license:asl2.0))) | |
23f3cbb8 BW |
797 | |
798 | (define-public pixz | |
799 | (package | |
800 | (name "pixz") | |
801 | (version "1.0.6") | |
802 | (source (origin | |
803 | (method url-fetch) | |
804 | (uri (string-append | |
805 | "https://github.com/vasi/pixz/releases/download/v" version | |
806 | "/pixz-" version ".tar.xz")) | |
807 | (sha256 | |
808 | (base32 | |
809 | "1s3j7zw6j5zi3fhdxg287ndr3wf6swac7z21mqd1pyiln530gi82")))) | |
810 | (build-system gnu-build-system) | |
811 | (native-inputs | |
812 | `(("pkg-config" ,pkg-config) | |
813 | ("libarchive" ,libarchive))) | |
814 | (home-page "https://github.com/vasi/pixz") | |
815 | (synopsis "Parallel indexing implementation of LZMA") | |
816 | (description | |
817 | "The existing XZ Utils provide great compression in the .xz file format, | |
818 | but they produce just one big block of compressed data. Pixz instead produces | |
819 | a collection of smaller blocks which makes random access to the original data | |
820 | possible and can compress in parallel. This is especially useful for large | |
821 | tarballs.") | |
822 | (license license:bsd-2))) | |
69d9792a EB |
823 | |
824 | (define-public brotli | |
825 | (let ((commit "e992cce7a174d6e2b3486616499d26bb0bad6448") | |
826 | (revision "1")) | |
827 | (package | |
828 | (name "brotli") | |
829 | (version (string-append "0.1-" revision "." | |
830 | (string-take commit 7))) | |
831 | (source (origin | |
832 | (method git-fetch) | |
833 | (uri (git-reference | |
834 | (url "https://github.com/bagder/libbrotli.git") | |
835 | (commit commit) | |
836 | (recursive? #t))) | |
837 | (file-name (string-append name "-" version ".tar.xz")) | |
838 | (sha256 | |
839 | (base32 | |
840 | "1qxxsasvwbbbh6dl3138y9h3fg0q2v7xdk5jjc690bdg7g1wrj6n")) | |
841 | (modules '((guix build utils))) | |
842 | (snippet | |
843 | ;; This is a recursive submodule that is unnecessary for this | |
844 | ;; package, so delete it. | |
845 | '(delete-file-recursively "brotli/terryfy")))) | |
846 | (build-system gnu-build-system) | |
847 | (native-inputs | |
848 | `(("autoconf" ,autoconf) | |
849 | ("automake" ,automake) | |
850 | ("libtool" ,libtool))) | |
851 | (arguments | |
852 | `(#:phases (modify-phases %standard-phases | |
853 | (add-after 'unpack 'autogen | |
854 | (lambda _ | |
855 | (mkdir "m4") | |
856 | (zero? (system* "autoreconf" "-vfi"))))))) | |
857 | (home-page "https://github.com/bagder/libbrotli/") | |
858 | (synopsis "Implementation of the Brotli compression algorithm") | |
859 | (description | |
860 | "Brotli is a general-purpose lossless compression algorithm. It is | |
861 | similar in speed to deflate but offers denser compression. This package | |
862 | provides encoder and a decoder libraries: libbrotlienc and libbrotlidec, | |
863 | respectively, based on the reference implementation from Google.") | |
864 | (license license:expat)))) | |
3fd4b90d DM |
865 | |
866 | (define-public cabextract | |
867 | (package | |
868 | (name "cabextract") | |
869 | (version "1.6") | |
870 | (source (origin | |
871 | (method url-fetch) | |
872 | (uri (string-append | |
873 | "http://cabextract.org.uk/cabextract-" version ".tar.gz")) | |
874 | (sha256 | |
875 | (base32 | |
876 | "1ysmmz25fjghq7mxb2anyyvr1ljxqxzi4piwjhk0sdamcnsn3rnf")))) | |
877 | (build-system gnu-build-system) | |
878 | (arguments '(#:configure-flags '("--with-external-libmspack"))) | |
879 | (native-inputs | |
880 | `(("pkg-config" ,pkg-config))) | |
881 | (inputs | |
882 | `(("libmspack" ,libmspack))) | |
883 | (home-page "http://www.cabextract.org.uk/") | |
884 | (synopsis "Tool to unpack Cabinet archives") | |
885 | (description "Extracts files out of Microsoft Cabinet (.cab) archives") | |
886 | ;; Some source files specify gpl2+, lgpl2+, however COPYING is gpl3. | |
887 | (license license:gpl3+))) | |
0b073506 TGR |
888 | |
889 | (define-public xdelta | |
890 | (package | |
891 | (name "xdelta") | |
892 | (version "3.1.0") | |
893 | (source | |
894 | (origin | |
895 | (method url-fetch) | |
896 | (uri (string-append "https://github.com/jmacd/xdelta/archive/v" | |
897 | version ".tar.gz")) | |
898 | (sha256 | |
899 | (base32 | |
900 | "17g2pbbqy6h20qgdjq7ykib7kg5ajh8fwbsfgyjqg8pwg19wy5bm")) | |
901 | (file-name (string-append name "-" version ".tar.gz")) | |
902 | (snippet | |
903 | ;; This file isn't freely distributable and has no effect on building. | |
904 | '(delete-file "xdelta3/draft-korn-vcdiff.txt")))) | |
905 | (build-system gnu-build-system) | |
906 | (native-inputs | |
907 | `(("autoconf" ,autoconf) | |
908 | ("automake" ,automake))) | |
909 | (arguments | |
910 | `(#:phases | |
911 | (modify-phases %standard-phases | |
912 | (add-after 'unpack 'enter-build-directory | |
913 | (lambda _ (chdir "xdelta3"))) | |
914 | (add-before 'configure 'autoconf | |
915 | (lambda _ (zero? (system* "autoreconf" "-vfi"))))))) | |
916 | (home-page "http://xdelta.com") | |
917 | (synopsis "Delta encoder for binary files") | |
918 | (description "xdelta encodes only the differences between two binary files | |
919 | using the VCDIFF algorithm and patch file format described in RFC 3284. It can | |
920 | also be used to apply such patches. xdelta is similar to @command{diff} and | |
921 | @command{patch}, but is not limited to plain text and does not generate | |
922 | human-readable output.") | |
923 | (license license:asl2.0))) | |
389eb3fa TGR |
924 | |
925 | (define-public lrzip | |
926 | (package | |
927 | (name "lrzip") | |
666619d0 | 928 | (version "0.631") |
389eb3fa TGR |
929 | (source |
930 | (origin | |
931 | (method url-fetch) | |
932 | (uri (string-append | |
933 | "http://ck.kolivas.org/apps/lrzip/lrzip-" version ".tar.bz2")) | |
934 | (sha256 | |
935 | (base32 | |
666619d0 | 936 | "0mb449vmmwpkalq732jdyginvql57nxyd31sszb108yps1lf448d")))) |
389eb3fa TGR |
937 | (build-system gnu-build-system) |
938 | (native-inputs | |
939 | `(;; nasm is only required when building for 32-bit x86 platforms | |
940 | ,@(if (string-prefix? "i686" (or (%current-target-system) | |
941 | (%current-system))) | |
942 | `(("nasm" ,nasm)) | |
943 | '()) | |
944 | ("perl" ,perl))) | |
945 | (inputs | |
946 | `(("bzip2" ,bzip2) | |
947 | ("lzo" ,lzo) | |
948 | ("zlib" ,zlib))) | |
949 | (home-page "http://ck.kolivas.org/apps/lrzip/") | |
950 | (synopsis "Large file compressor with a very high compression ratio") | |
951 | (description "lrzip is a compression utility that uses long-range | |
952 | redundancy reduction to improve the subsequent compression ratio of | |
953 | larger files. It can then further compress the result with the ZPAQ or | |
954 | LZMA algorithms for maximum compression, or LZO for maximum speed. This | |
955 | choice between size or speed allows for either better compression than | |
956 | even LZMA can provide, or a higher speed than gzip while compressing as | |
957 | well as bzip2.") | |
958 | (license (list license:gpl3+ | |
959 | license:public-domain)))) ; most files in lzma/ | |
e4c2136d DC |
960 | |
961 | (define-public snappy | |
962 | (package | |
963 | (name "snappy") | |
ad31b4fe | 964 | (version "1.1.3") |
e4c2136d DC |
965 | (source (origin |
966 | (method url-fetch) | |
967 | (uri (string-append | |
968 | "https://github.com/google/snappy/releases/download/" | |
969 | version "/" name "-" version ".tar.gz")) | |
970 | (sha256 | |
971 | (base32 | |
ad31b4fe | 972 | "1wzf8yif5ym2gj52db6v5m1pxnmn258i38x7llk9x346y2nq47ig")))) |
e4c2136d DC |
973 | (build-system gnu-build-system) |
974 | (home-page "https://github.com/google/snappy") | |
975 | (synopsis "Fast compressor/decompressor") | |
976 | (description "Snappy is a compression/decompression library. It does not | |
977 | aim for maximum compression, or compatibility with any other compression library; | |
978 | instead, it aims for very high speeds and reasonable compression. For instance, | |
979 | compared to the fastest mode of zlib, Snappy is an order of magnitude faster | |
980 | for most inputs, but the resulting compressed files are anywhere from 20% to | |
981 | 100% bigger.") | |
982 | (license license:asl2.0))) | |
adbd7faf KK |
983 | |
984 | (define-public p7zip | |
985 | (package | |
986 | (name "p7zip") | |
987 | (version "16.02") | |
988 | (source (origin | |
989 | (method url-fetch) | |
990 | (uri (string-append "mirror://sourceforge/" name "/" name "/" | |
991 | version "/" name "_" version | |
992 | "_src_all.tar.bz2")) | |
993 | (sha256 | |
994 | (base32 | |
995 | "07rlwbbgszq8i7m8jh3x6j2w2hc9a72dc7fmqawnqkwlwb00mcjy")) | |
996 | (modules '((guix build utils))) | |
997 | (snippet | |
998 | '(begin | |
999 | ;; Remove non-free source files | |
1000 | (for-each delete-file | |
1001 | (append | |
1002 | (find-files "CPP/7zip/Compress" "Rar.*") | |
1003 | (find-files "CPP/7zip/Crypto" "Rar.*") | |
1004 | (find-files "DOC/unRarLicense.txt") | |
1005 | (find-files "Utils/file_Codecs_Rar_so.py"))) | |
1006 | (delete-file-recursively "CPP/7zip/Archive/Rar") | |
1007 | (delete-file-recursively "CPP/7zip/Compress/Rar") | |
1008 | #t)) | |
1ac675a5 EF |
1009 | (patches (search-patches "p7zip-CVE-2016-9296.patch" |
1010 | "p7zip-remove-unused-code.patch")))) | |
adbd7faf KK |
1011 | (build-system gnu-build-system) |
1012 | (arguments | |
1013 | `(#:make-flags | |
1014 | (list (string-append "DEST_HOME=" (assoc-ref %outputs "out")) "all3") | |
1015 | #:phases | |
1016 | (modify-phases %standard-phases | |
1017 | (replace 'configure | |
1018 | (lambda* (#:key system outputs #:allow-other-keys) | |
1019 | (zero? (system* "cp" | |
1020 | (let ((system ,(or (%current-target-system) | |
1021 | (%current-system)))) | |
1022 | (cond | |
1023 | ((string-prefix? "x86_64" system) | |
1024 | "makefile.linux_amd64_asm") | |
1025 | ((string-prefix? "i686" system) | |
1026 | "makefile.linux_x86_asm_gcc_4.X") | |
1027 | (else | |
1028 | "makefile.linux_any_cpu_gcc_4.X"))) | |
1029 | "makefile.machine")))) | |
1030 | (replace 'check | |
1031 | (lambda _ | |
1032 | (and (zero? (system* "make" "test")) | |
1033 | (zero? (system* "make" "test_7z")) | |
1034 | (zero? (system* "make" "test_7zr")))))))) | |
1035 | (inputs | |
1036 | (let ((system (or (%current-target-system) | |
1037 | (%current-system)))) | |
1038 | `(,@(cond ((string-prefix? "x86_64" system) | |
1039 | `(("yasm" ,yasm))) | |
1040 | ((string-prefix? "i686" system) | |
1041 | `(("nasm" ,nasm))) | |
1042 | (else '()))))) | |
1043 | (home-page "http://p7zip.sourceforge.net/") | |
1044 | (synopsis "Command-line file archiver with high compression ratio") | |
1045 | (description "p7zip is a command-line port of 7-Zip, a file archiver that | |
1046 | handles the 7z format which features very high compression ratios.") | |
1047 | (license (list license:lgpl2.1+ | |
1048 | license:gpl2+ | |
1049 | license:public-domain)))) | |
618089f9 MB |
1050 | |
1051 | (define-public gzstream | |
1052 | (package | |
1053 | (name "gzstream") | |
1054 | (version "1.5") | |
1055 | (source (origin | |
1056 | (method url-fetch) | |
1057 | (uri | |
1058 | ;; No versioned URL, but last release was in 2003. | |
1059 | "http://www.cs.unc.edu/Research/compgeom/gzstream/gzstream.tgz") | |
1060 | (file-name (string-append name "-" version ".tgz")) | |
1061 | (sha256 | |
1062 | (base32 | |
1063 | "00y19pqjsdj5zcrx4p9j56pl73vayfwnb7y2hvp423nx0cwv5b4r")) | |
1064 | (modules '((guix build utils))) | |
1065 | (snippet | |
1066 | ;; Remove pre-compiled object. | |
1067 | '(delete-file "gzstream.o")))) | |
1068 | (build-system gnu-build-system) | |
1069 | (arguments | |
1070 | `(#:test-target "test" | |
1071 | #:phases | |
1072 | (modify-phases %standard-phases | |
1073 | (delete 'configure) | |
1074 | (replace 'install | |
1075 | (lambda* (#:key outputs #:allow-other-keys) | |
1076 | (let* ((out (assoc-ref outputs "out")) | |
1077 | (lib (string-append out "/lib")) | |
1078 | (include (string-append out "/include"))) | |
1079 | (install-file "libgzstream.a" lib) | |
1080 | (install-file "gzstream.h" include) | |
1081 | #t)))))) | |
1082 | (propagated-inputs `(("zlib" ,zlib))) | |
1083 | (home-page "http://www.cs.unc.edu/Research/compgeom/gzstream/") | |
1084 | (synopsis "Compressed C++ iostream") | |
1085 | (description "gzstream is a small library for providing zlib | |
1086 | functionality in a C++ iostream.") | |
1087 | (license license:lgpl2.1+))) | |
36df995c TGR |
1088 | |
1089 | (define-public zpaq | |
1090 | (package | |
1091 | (name "zpaq") | |
1092 | (version "7.15") | |
1093 | (source | |
1094 | (origin | |
1095 | (method url-fetch/zipbomb) | |
1096 | (uri (string-append "http://mattmahoney.net/dc/zpaq" | |
1097 | (string-delete #\. version) ".zip")) | |
1098 | (sha256 | |
1099 | (base32 | |
1100 | "066l94yyladlfzri877nh2dhkvspagjn3m5bmv725fmhkr9c4pp8")) | |
1101 | (modules '((guix build utils))) | |
1102 | (snippet | |
1103 | ;; Delete irrelevant pre-compiled binaries. | |
1104 | '(for-each delete-file (find-files "." "\\.exe$"))))) | |
1105 | (build-system gnu-build-system) | |
1106 | (arguments | |
1107 | `(#:phases | |
1108 | (modify-phases %standard-phases | |
1109 | (delete 'configure)) ; no ‘configure’ script | |
1110 | #:make-flags | |
1111 | (list | |
1112 | (string-append "CPPFLAGS=-Dunix" | |
1113 | ,(match (or (%current-target-system) | |
1114 | (%current-system)) | |
1115 | ("x86_64-linux" "") | |
1116 | ("i686-linux" "") | |
1117 | (_ " -DNOJIT"))) | |
1118 | ;; These should be safe, lowest-common-denominator instruction sets, | |
1119 | ;; allowing for some optimisation while remaining reproducible. | |
effd7198 | 1120 | (string-append "CXXFLAGS=-O3 -DNDEBUG" |
36df995c TGR |
1121 | ,(match (or (%current-target-system) |
1122 | (%current-system)) | |
effd7198 EF |
1123 | ("x86_64-linux" " -march=nocona -mtune=generic") |
1124 | ("i686-linux" " -march=i686 -mtune=generic") | |
1125 | ("armhf-linux" " -mtune=generic-armv7-a") | |
36df995c TGR |
1126 | (_ ""))) |
1127 | (string-append "PREFIX=" | |
1128 | (assoc-ref %outputs "out"))))) | |
1129 | (native-inputs | |
1130 | `(("perl" ,perl))) ; for pod2man | |
1131 | (home-page "http://mattmahoney.net/dc/zpaq.html") | |
1132 | (synopsis "Incremental journaling archiver") | |
1133 | (description "ZPAQ is a command-line archiver for realistic situations with | |
1134 | many duplicate and already compressed files. It backs up only those files | |
1135 | modified since the last update. All previous versions remain untouched and can | |
1136 | be independently recovered. Identical files are only stored once (known as | |
1137 | @dfn{de-duplication}). Archives can also be encrypted. | |
1138 | ||
1139 | ZPAQ is intended to back up user data, not entire operating systems. It ignores | |
1140 | owner and group IDs, ACLs, extended attributes, or special file types like | |
1141 | devices, sockets, or named pipes. It does not follow or restore symbolic links | |
1142 | or junctions, and always follows hard links.") | |
1143 | (license (list license:public-domain | |
1144 | ;; libzpaq.cpp contains a mix of public-domain and | |
1145 | ;; expat-licenced (or ‘MIT’) code. | |
1146 | license:expat)))) | |
0da8313c JD |
1147 | |
1148 | (define-public unrar | |
1149 | (package | |
1150 | (name "unrar") | |
1151 | (version "0.0.1") | |
1152 | (source (origin | |
1153 | (method url-fetch) | |
1154 | (uri (string-append | |
1155 | "http://download.gna.org/unrar/unrar-" version ".tar.gz")) | |
1156 | (sha256 | |
1157 | (base32 | |
1158 | "1fgmjaxffj3shyxgy765jhxwz1cq88hk0fih1bsdzyvymyyz6mz7")))) | |
1159 | (build-system gnu-build-system) | |
1160 | (home-page "http://download.gna.org/unrar") | |
1161 | (synopsis "RAR archive extraction tool") | |
1162 | (description "Unrar is a simple command-line program to list and extract | |
1163 | RAR archives.") | |
1164 | (license license:gpl2+))) | |
f6ac3101 TGR |
1165 | |
1166 | (define-public zstd | |
1167 | (package | |
1168 | (name "zstd") | |
dbaca6b5 | 1169 | (version "1.1.4") |
f6ac3101 TGR |
1170 | (source (origin |
1171 | (method url-fetch) | |
1172 | (uri (string-append "https://github.com/facebook/zstd/archive/v" | |
1173 | version ".tar.gz")) | |
1174 | (file-name (string-append name "-" version ".tar.gz")) | |
1175 | (sha256 | |
1176 | (base32 | |
dbaca6b5 | 1177 | "1yxr1y83gphljxaqhwvxbldy1ivx81x93rngiv5l94rmdrc2pbka")) |
f6ac3101 TGR |
1178 | (modules '((guix build utils))) |
1179 | (snippet | |
1180 | ;; Remove non-free source files. | |
1181 | '(begin | |
1182 | (for-each delete-file-recursively | |
1183 | (list | |
1184 | ;; Commercial use of the following is not allowed. | |
1185 | "examples" | |
1186 | "LICENSE-examples")) | |
1187 | #t)))) | |
1188 | (build-system gnu-build-system) | |
1189 | (arguments | |
1190 | `(#:phases | |
1191 | (modify-phases %standard-phases | |
1192 | (delete 'configure)) ; no configure script | |
1193 | #:make-flags | |
1194 | (list "CC=gcc" | |
1195 | (string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
1196 | #:test-target "test")) | |
1197 | (home-page "http://zstd.net/") | |
1198 | (synopsis "Zstandard real-time compression algorithm") | |
1199 | (description "Zstandard (@command{zstd}) is a lossless compression algorithm | |
1200 | that combines very fast operation with a compression ratio comparable to that of | |
1201 | zlib. In most scenarios, both compression and decompression can be performed in | |
1202 | ‘real time’. The compressor can be configured to provide the most suitable | |
1203 | trade-off between compression ratio and speed, without affecting decompression | |
1204 | speed.") | |
1205 | (license (list license:bsd-3 ; the main top-level LICENSE file | |
1206 | license:bsd-2 ; quite a few files have but 2 clauses | |
1207 | license:public-domain ; zlibWrapper/examples/fitblk* | |
1208 | license:zlib)))) ; zlibWrapper/{gz*.c,gzguts.h} | |
0f03c531 TGR |
1209 | |
1210 | (define-public pzstd | |
1211 | (package | |
1212 | (name "pzstd") | |
1213 | (version (package-version zstd)) | |
1214 | (source (package-source zstd)) | |
1215 | (build-system gnu-build-system) | |
1216 | (native-inputs | |
1217 | `(("googletest", googletest))) | |
1218 | (arguments | |
1219 | `(#:phases | |
1220 | (modify-phases %standard-phases | |
1221 | (add-after 'unpack 'enter-subdirectory | |
1222 | (lambda _ (chdir "contrib/pzstd"))) | |
1223 | (delete 'configure) ; no configure script | |
1224 | (add-before 'check 'compile-tests | |
1225 | (lambda* (#:key make-flags #:allow-other-keys) | |
1226 | (zero? (apply system* "make" "tests" make-flags)))) | |
1227 | (add-after 'install 'install-documentation | |
1228 | (lambda* (#:key outputs #:allow-other-keys) | |
1229 | (let* ((out (assoc-ref outputs "out")) | |
1230 | (doc (string-append out "/share/doc/" ,name))) | |
1231 | (mkdir-p doc) | |
1232 | (install-file "README.md" doc) | |
1233 | #t)))) | |
1234 | #:make-flags | |
1235 | (list "CC=gcc" | |
1236 | (string-append "PREFIX=" (assoc-ref %outputs "out"))))) | |
1237 | (home-page (package-home-page zstd)) | |
1238 | (synopsis "Threaded implementation of the Zstandard compression algorithm") | |
1239 | (description "Parallel Zstandard (PZstandard or @command{pzstd}) is a | |
1240 | multi-threaded implementation of the @uref{http://zstd.net/, Zstandard | |
1241 | compression algorithm}. It is fully compatible with the original Zstandard file | |
1242 | format and command-line interface, and can be used as a drop-in replacement. | |
1243 | ||
1244 | Compression is distributed over multiple processor cores to improve performance, | |
1245 | as is the decompression of data compressed in this manner. Data compressed by | |
1246 | other implementations will only be decompressed by two threads: one performing | |
1247 | the actual decompression, the other input and output.") | |
1248 | (license (package-license zstd)))) |