Commit | Line | Data |
---|---|---|
233e7676 | 1 | ;;; GNU Guix --- Functional package management for GNU |
9b1bf330 | 2 | ;;; Copyright © 2012, 2013, 2014, 2015 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> |
73f542c3 | 6 | ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org> |
646898b3 | 7 | ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net> |
82aa2a28 | 8 | ;;; Copyright © 2015 Leo Famulari <leo@famulari.name> |
820dc3f5 | 9 | ;;; Copyright © 2015 Jeff Mickey <j@codemac.net> |
a268f085 | 10 | ;;; |
233e7676 | 11 | ;;; This file is part of GNU Guix. |
a268f085 | 12 | ;;; |
233e7676 | 13 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
a268f085 LC |
14 | ;;; under the terms of the GNU General Public License as published by |
15 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
16 | ;;; your option) any later version. | |
17 | ;;; | |
233e7676 | 18 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
a268f085 LC |
19 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
20 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 | ;;; GNU General Public License for more details. | |
22 | ;;; | |
23 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 24 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
a268f085 | 25 | |
1ffa7090 | 26 | (define-module (gnu packages compression) |
b5b73a82 | 27 | #:use-module ((guix licenses) #:prefix license:) |
a268f085 | 28 | #:use-module (guix packages) |
87f5d366 | 29 | #:use-module (guix download) |
646898b3 | 30 | #:use-module (guix git-download) |
b357faac | 31 | #:use-module (guix build-system gnu) |
73f542c3 EB |
32 | #:use-module (guix build-system perl) |
33 | #:use-module (gnu packages base) | |
646898b3 | 34 | #:use-module (gnu packages perl) |
82aa2a28 | 35 | #:use-module (gnu packages valgrind) |
646898b3 | 36 | #:use-module ((srfi srfi-1) #:select (last))) |
a268f085 | 37 | |
6a92093d LC |
38 | (define-public zlib |
39 | (package | |
40 | (name "zlib") | |
41 | (version "1.2.7") | |
42 | (source | |
43 | (origin | |
87f5d366 | 44 | (method url-fetch) |
a67f97fe CR |
45 | (uri (list (string-append "http://zlib.net/zlib-" |
46 | version ".tar.gz") | |
47 | (string-append "mirror://sourceforge/libpng/zlib-" | |
48 | version ".tar.gz"))) | |
6a92093d LC |
49 | (sha256 |
50 | (base32 | |
51 | "1i96gsdvxqb6skp9a58bacf1wxamwi9m9pg4yn7cpf7g7239r77s")))) | |
52 | (build-system gnu-build-system) | |
53 | (arguments | |
54 | `(#:phases (alist-replace | |
55 | 'configure | |
56 | (lambda* (#:key outputs #:allow-other-keys) | |
e67253db | 57 | ;; Zlib's home-made `configure' fails when passed |
6a92093d LC |
58 | ;; extra flags like `--enable-fast-install', so we need to |
59 | ;; invoke it with just what it understand. | |
60 | (let ((out (assoc-ref outputs "out"))) | |
e67253db JD |
61 | ;; 'configure' doesn't understand '--host'. |
62 | ,@(if (%current-target-system) | |
63 | `((setenv "CHOST" ,(%current-target-system))) | |
64 | '()) | |
65 | (zero? | |
66 | (system* "./configure" | |
67 | (string-append "--prefix=" out))))) | |
6a92093d LC |
68 | %standard-phases))) |
69 | (home-page "http://zlib.net/") | |
35b9e423 | 70 | (synopsis "Compression library") |
6a92093d LC |
71 | (description |
72 | "zlib is designed to be a free, general-purpose, legally unencumbered -- | |
73 | that is, not covered by any patents -- lossless data-compression library for | |
74 | use on virtually any computer hardware and operating system. The zlib data | |
35b9e423 | 75 | format is itself portable across platforms. Unlike the LZW compression method |
6a92093d LC |
76 | used in Unix compress(1) and in the GIF image format, the compression method |
77 | currently used in zlib essentially never expands the data. (LZW can double or | |
78 | triple the file size in extreme cases.) zlib's memory footprint is also | |
79 | independent of the input data and can be reduced, if necessary, at some cost | |
80 | in compression.") | |
4a44e743 | 81 | (license license:zlib))) |
6a92093d | 82 | |
ee97be9f RW |
83 | (define-public fastjar |
84 | (package | |
85 | (name "fastjar") | |
86 | (version "0.98") | |
87 | (source (origin | |
88 | (method url-fetch) | |
89 | (uri (string-append "mirror://savannah/fastjar/fastjar-" | |
90 | version ".tar.gz")) | |
91 | (sha256 | |
92 | (base32 | |
93 | "0iginbz2m15hcsa3x4y7v3mhk54gr1r7m3ghx0pg4n46vv2snmpi")))) | |
94 | (build-system gnu-build-system) | |
95 | (inputs `(("zlib" ,zlib))) | |
96 | (home-page "http://savannah.nongnu.org/projects/fastjar") | |
97 | (synopsis "Replacement for Sun's 'jar' utility") | |
98 | (description | |
99 | "FastJar is an attempt to create a much faster replacement for Sun's 'jar' | |
100 | utility. Instead of being written in Java, FastJar is written in C.") | |
101 | (license license:gpl2+))) | |
102 | ||
58593975 RW |
103 | (define-public libtar |
104 | (package | |
105 | (name "libtar") | |
106 | (version "1.2.11") | |
107 | (source (origin | |
108 | (method url-fetch) | |
109 | (uri (string-append | |
110 | "ftp://ftp.feep.net/pub/software/libtar/libtar-" | |
111 | version ".tar.gz")) | |
112 | (sha256 | |
113 | (base32 | |
114 | "1f3vx1wa69a6c5y0z0aakd81gygirdcm0vimazg433q8nyvfybja")))) | |
115 | (build-system gnu-build-system) | |
116 | (arguments `(#:tests? #f)) ;no "check" target | |
117 | (synopsis "C library for manipulating POSIX tar files") | |
118 | (description | |
119 | "libtar is a C library for manipulating POSIX tar files. It handles | |
120 | adding and extracting files to/from a tar archive.") | |
121 | (home-page "http://www.feep.net/libtar/") | |
122 | (license license:bsd-3))) | |
123 | ||
a268f085 LC |
124 | (define-public gzip |
125 | (package | |
126 | (name "gzip") | |
2a511f7a | 127 | (version "1.6") |
a268f085 | 128 | (source (origin |
87f5d366 | 129 | (method url-fetch) |
0db342a5 | 130 | (uri (string-append "mirror://gnu/gzip/gzip-" |
a268f085 LC |
131 | version ".tar.gz")) |
132 | (sha256 | |
133 | (base32 | |
2a511f7a | 134 | "0zlgdm4v3dndrbiz7b67mbbj25dpwqbmbzjiycssvrfrcfvq7swp")))) |
a268f085 | 135 | (build-system gnu-build-system) |
f50d2669 | 136 | (synopsis "General file (de)compression (using lzw)") |
a268f085 LC |
137 | (arguments |
138 | ;; FIXME: The test suite wants `less', and optionally Perl. | |
139 | '(#:tests? #f)) | |
140 | (description | |
79c311b8 LC |
141 | "GNU Gzip provides data compression and decompression utilities; the |
142 | typical extension is \".gz\". Unlike the \"zip\" format, it compresses a single | |
143 | file; as a result, it is often used in conjunction with \"tar\", resulting in | |
144 | \".tar.gz\" or \".tgz\", etc.") | |
4a44e743 | 145 | (license license:gpl3+) |
a268f085 LC |
146 | (home-page "http://www.gnu.org/software/gzip/"))) |
147 | ||
148 | (define-public bzip2 | |
9b1bf330 | 149 | (let ((build-shared-lib |
a268f085 LC |
150 | ;; Build a shared library. |
151 | '(lambda* (#:key inputs #:allow-other-keys) | |
f678f6d9 | 152 | (patch-makefile-SHELL "Makefile-libbz2_so") |
a268f085 LC |
153 | (zero? (system* "make" "-f" "Makefile-libbz2_so")))) |
154 | (install-shared-lib | |
155 | '(lambda* (#:key outputs #:allow-other-keys) | |
156 | (let* ((out (assoc-ref outputs "out")) | |
157 | (libdir (string-append out "/lib"))) | |
158 | (for-each (lambda (file) | |
159 | (let ((base (basename file))) | |
160 | (format #t "installing `~a' to `~a'~%" | |
161 | base libdir) | |
162 | (copy-file file | |
163 | (string-append libdir "/" base)))) | |
ab4fab19 LC |
164 | (find-files "." "^libbz2\\.so"))))) |
165 | (set-cross-environment | |
166 | '(lambda* (#:key target #:allow-other-keys) | |
167 | (substitute* (find-files "." "Makefile") | |
168 | (("CC=.*$") | |
169 | (string-append "CC = " target "-gcc\n")) | |
170 | (("AR=.*$") | |
171 | (string-append "AR = " target "-ar\n")) | |
172 | (("RANLIB=.*$") | |
173 | (string-append "RANLIB = " target "-ranlib\n")) | |
174 | (("^all:(.*)test" _ prerequisites) | |
175 | ;; Remove 'all' -> 'test' dependency. | |
176 | (string-append "all:" prerequisites "\n")))))) | |
a268f085 LC |
177 | (package |
178 | (name "bzip2") | |
179 | (version "1.0.6") | |
180 | (source (origin | |
87f5d366 | 181 | (method url-fetch) |
a268f085 LC |
182 | (uri (string-append "http://www.bzip.org/" version "/bzip2-" |
183 | version ".tar.gz")) | |
184 | (sha256 | |
185 | (base32 | |
186 | "1kfrc7f0ja9fdn6j1y6yir6li818npy6217hvr3wzmnmzhs8z152")))) | |
187 | (build-system gnu-build-system) | |
188 | (arguments | |
189 | `(#:modules ((guix build gnu-build-system) | |
190 | (guix build utils) | |
191 | (srfi srfi-1)) | |
192 | #:phases | |
ab4fab19 LC |
193 | ,(if (%current-target-system) |
194 | ||
195 | ;; Cross-compilation: use the cross tools. | |
196 | `(alist-cons-before | |
197 | 'build 'build-shared-lib ,build-shared-lib | |
198 | (alist-cons-after | |
9b1bf330 LC |
199 | 'install 'install-shared-lib ,install-shared-lib |
200 | (alist-replace 'configure ,set-cross-environment | |
201 | %standard-phases))) | |
ab4fab19 LC |
202 | |
203 | ;; Native compilation: build the shared library. | |
204 | `(alist-cons-before | |
205 | 'build 'build-shared-lib ,build-shared-lib | |
206 | (alist-cons-after | |
9b1bf330 LC |
207 | 'install 'install-shared-lib ,install-shared-lib |
208 | (alist-delete 'configure %standard-phases)))) | |
ab4fab19 | 209 | |
a268f085 | 210 | #:make-flags (list (string-append "PREFIX=" |
ab4fab19 LC |
211 | (assoc-ref %outputs "out"))) |
212 | ||
213 | ;; Don't attempt to run the tests when cross-compiling. | |
214 | ,@(if (%current-target-system) | |
215 | '(#:tests? #f) | |
216 | '()))) | |
35b9e423 | 217 | (synopsis "High-quality data compression program") |
a268f085 LC |
218 | (description |
219 | "bzip2 is a freely available, patent free (see below), high-quality data | |
220 | compressor. It typically compresses files to within 10% to 15% of the best | |
221 | available techniques (the PPM family of statistical compressors), whilst | |
222 | being around twice as fast at compression and six times faster at | |
223 | decompression.") | |
166191b3 | 224 | (license (license:non-copyleft "file://LICENSE" |
4a44e743 | 225 | "See LICENSE in the distribution.")) |
a268f085 LC |
226 | (home-page "http://www.bzip.org/")))) |
227 | ||
228 | (define-public xz | |
229 | (package | |
230 | (name "xz") | |
231 | (version "5.0.4") | |
232 | (source (origin | |
87f5d366 | 233 | (method url-fetch) |
a268f085 LC |
234 | (uri (string-append "http://tukaani.org/xz/xz-" version |
235 | ".tar.gz")) | |
236 | (sha256 | |
237 | (base32 | |
238 | "1dl35ca8fdss9z2d6y234gxh24ixq904xksizrjmjr5dimwhax6n")))) | |
239 | (build-system gnu-build-system) | |
35b9e423 | 240 | (synopsis "General-purpose data compression") |
a268f085 LC |
241 | (description |
242 | "XZ Utils is free general-purpose data compression software with high | |
243 | compression ratio. XZ Utils were written for POSIX-like systems, but also | |
244 | work on some not-so-POSIX systems. XZ Utils are the successor to LZMA Utils. | |
245 | ||
246 | The core of the XZ Utils compression code is based on LZMA SDK, but it has | |
247 | been modified quite a lot to be suitable for XZ Utils. The primary | |
248 | compression algorithm is currently LZMA2, which is used inside the .xz | |
249 | container format. With typical files, XZ Utils create 30 % smaller output | |
250 | than gzip and 15 % smaller output than bzip2.") | |
38bbd61d | 251 | (license (list license:gpl2+ license:lgpl2.1+)) ; bits of both |
a268f085 | 252 | (home-page "http://tukaani.org/xz/"))) |
c6eac761 LC |
253 | |
254 | (define-public lzo | |
255 | (package | |
256 | (name "lzo") | |
c0ec516d | 257 | (version "2.09") |
c6eac761 LC |
258 | (source |
259 | (origin | |
260 | (method url-fetch) | |
261 | (uri (string-append "http://www.oberhumer.com/opensource/lzo/download/lzo-" | |
262 | version ".tar.gz")) | |
263 | (sha256 | |
264 | (base32 | |
c0ec516d | 265 | "0k5kpj3jnsjfxqqkblpfpx0mqcy86zs5fhjhgh2kq1hksg7ag57j")))) |
c6eac761 | 266 | (build-system gnu-build-system) |
165fd9d5 | 267 | (arguments '(#:configure-flags '("--enable-shared"))) |
c6eac761 LC |
268 | (home-page "http://www.oberhumer.com/opensource/lzo") |
269 | (synopsis | |
e881752c | 270 | "Data compression library suitable for real-time data de-/compression") |
c6eac761 LC |
271 | (description |
272 | "LZO is a data compression library which is suitable for data | |
273 | de-/compression in real-time. This means it favours speed over | |
274 | compression ratio. | |
275 | ||
276 | LZO is written in ANSI C. Both the source code and the compressed data | |
277 | format are designed to be portable across platforms.") | |
4a44e743 | 278 | (license license:gpl2+))) |
0f323dad | 279 | |
a9f48ff0 EB |
280 | (define-public lzop |
281 | (package | |
282 | (name "lzop") | |
283 | (version "1.03") | |
284 | (source | |
285 | (origin | |
286 | (method url-fetch) | |
287 | (uri (string-append "http://www.lzop.org/download/lzop-" | |
288 | version ".tar.gz")) | |
289 | (sha256 | |
290 | (base32 | |
291 | "1jdjvc4yjndf7ihmlcsyln2rbnbaxa86q4jskmkmm7ylfy65nhn1")))) | |
292 | (build-system gnu-build-system) | |
293 | (inputs `(("lzo" ,lzo))) | |
294 | (home-page "http://www.lzop.org/") | |
295 | (synopsis "Compress or expand files") | |
296 | (description | |
297 | "Lzop is a file compressor which is very similar to gzip. Lzop uses the | |
298 | LZO data compression library for compression services, and its main advantages | |
299 | over gzip are much higher compression and decompression speed (at the cost of | |
300 | some compression ratio).") | |
301 | (license license:gpl2+))) | |
302 | ||
0f323dad LC |
303 | (define-public lzip |
304 | (package | |
305 | (name "lzip") | |
275a7711 | 306 | (version "1.16") |
0f323dad LC |
307 | (source (origin |
308 | (method url-fetch) | |
309 | (uri (string-append "mirror://savannah/lzip/lzip-" | |
310 | version ".tar.gz")) | |
311 | (sha256 | |
312 | (base32 | |
275a7711 | 313 | "0l9724rw1l3hg2ldr3n7ihqich4m9nc6y7l302bvdj4jmxdw530j")))) |
0f323dad LC |
314 | (build-system gnu-build-system) |
315 | (home-page "http://www.nongnu.org/lzip/lzip.html") | |
316 | (synopsis "Lossless data compressor based on the LZMA algorithm") | |
317 | (description | |
318 | "Lzip is a lossless data compressor with a user interface similar to the | |
319 | one of gzip or bzip2. Lzip decompresses almost as fast as gzip and compresses | |
320 | more than bzip2, which makes it well suited for software distribution and data | |
321 | archiving. Lzip is a clean implementation of the LZMA algorithm.") | |
322 | (license license:gpl3+))) | |
b357faac AE |
323 | |
324 | (define-public sharutils | |
325 | (package | |
326 | (name "sharutils") | |
9a59ce24 | 327 | (version "4.15.2") |
b357faac AE |
328 | (source |
329 | (origin | |
330 | (method url-fetch) | |
331 | (uri (string-append "mirror://gnu/sharutils/sharutils-" | |
332 | version ".tar.xz")) | |
333 | (sha256 | |
334 | (base32 | |
9a59ce24 | 335 | "16isapn8f39lnffc3dp4dan05b7x6mnc76v6q5nn8ysxvvvwy19b")))) |
b357faac AE |
336 | (build-system gnu-build-system) |
337 | (inputs | |
338 | `(("which" ,which))) | |
339 | (arguments | |
340 | `(#:phases | |
341 | (alist-cons-after | |
342 | 'patch-source-shebangs 'unpatch-source-shebang | |
343 | ;; revert the patch-shebang phase on a script which is | |
344 | ;; in fact test data | |
d4bf49b1 | 345 | (lambda _ |
b357faac AE |
346 | (substitute* "tests/shar-1.ok" |
347 | (((which "sh")) "/bin/sh"))) | |
348 | %standard-phases))) | |
349 | (home-page "http://www.gnu.org/software/sharutils/") | |
350 | (synopsis "Archives in shell scripts, uuencode/uudecode") | |
351 | (description | |
79c311b8 LC |
352 | "GNU sharutils is a package for creating and manipulating shell |
353 | archives that can be readily emailed. A shell archive is a file that can be | |
e881752c | 354 | processed by a Bourne-type shell to unpack the original collection of files. |
79c311b8 | 355 | This package is mostly for compatibility and historical interest.") |
b357faac | 356 | (license license:gpl3+))) |
28469ab0 | 357 | |
646898b3 RW |
358 | (define-public sfarklib |
359 | (package | |
360 | (name "sfarklib") | |
979f9e8a | 361 | (version "2.24") |
646898b3 | 362 | (source (origin |
979f9e8a RW |
363 | (method url-fetch) |
364 | (uri (string-append "https://github.com/raboof/sfArkLib/archive/" | |
365 | version ".tar.gz")) | |
366 | (file-name (string-append name "-" version ".tar.gz")) | |
646898b3 RW |
367 | (sha256 |
368 | (base32 | |
979f9e8a | 369 | "0bzs2d98rk1xw9qwpnc7gmlbxwmwc3dg1rpn310afy9pq1k9clzi")))) |
646898b3 RW |
370 | (build-system gnu-build-system) |
371 | (arguments | |
372 | `(#:tests? #f ;no "check" target | |
373 | #:phases | |
374 | (modify-phases %standard-phases | |
375 | (replace 'configure | |
376 | (lambda* (#:key outputs #:allow-other-keys) | |
377 | (substitute* "Makefile" | |
378 | (("/usr/local") (assoc-ref outputs "out"))) | |
379 | #t))))) | |
380 | (inputs | |
381 | `(("zlib" ,zlib))) | |
382 | (home-page "https://github.com/raboof/sfArkLib") | |
383 | (synopsis "Library for SoundFont decompression") | |
384 | (description | |
385 | "SfArkLib is a C++ library for decompressing SoundFont files compressed | |
386 | with the sfArk algorithm.") | |
387 | (license license:gpl3+))) | |
388 | ||
b5ad1659 RW |
389 | (define-public sfarkxtc |
390 | (package | |
391 | (name "sfarkxtc") | |
392 | (version "b5e0a2ba39") | |
393 | (source (origin | |
394 | ;; There are no release tarballs, so we just fetch the latest | |
395 | ;; commit at this time. | |
396 | (method git-fetch) | |
397 | (uri (git-reference | |
398 | (url "https://github.com/raboof/sfarkxtc.git") | |
399 | (commit version))) | |
400 | (sha256 | |
401 | (base32 | |
402 | "0f5x6i46qfl6ry21s7g2p4sd4b2r1g4fb03yqi2vv4kq3saryhvj")))) | |
403 | (build-system gnu-build-system) | |
404 | (arguments | |
405 | `(#:tests? #f ;no "check" target | |
406 | #:phases | |
407 | (modify-phases %standard-phases | |
408 | (replace 'configure | |
409 | (lambda* (#:key outputs #:allow-other-keys) | |
410 | (substitute* "Makefile" | |
411 | (("/usr/local") (assoc-ref outputs "out"))) | |
412 | #t))))) | |
413 | (inputs | |
414 | `(("zlib" ,zlib) | |
415 | ("sfarklib" ,sfarklib))) | |
416 | (home-page "https://github.com/raboof/sfarkxtc") | |
417 | (synopsis "Basic sfArk decompressor") | |
418 | (description "SfArk extractor converts SoundFonts in the compressed legacy | |
419 | sfArk file format to the uncompressed sf2 format.") | |
420 | (license license:gpl3+))) | |
421 | ||
27f76fe6 TUBK |
422 | (define-public libmspack |
423 | (package | |
424 | (name "libmspack") | |
425 | (version "0.5") | |
426 | (source | |
427 | (origin | |
428 | (method url-fetch) | |
429 | (uri (string-append "http://www.cabextract.org.uk/libmspack/libmspack-" | |
430 | version "alpha.tar.gz")) | |
431 | (sha256 | |
432 | (base32 "04413hynb7zizxnkgy9riik3612dwirkpr6fcjrnfl2za9sz4rw9")))) | |
433 | (build-system gnu-build-system) | |
434 | (home-page "http://www.cabextract.org.uk/libmspack/") | |
435 | (synopsis "Compression tools for some formats used by Microsoft") | |
436 | (description | |
437 | "The purpose of libmspack is to provide both compression and | |
438 | decompression of some loosely related file formats used by Microsoft.") | |
439 | (license license:lgpl2.1+))) | |
73f542c3 EB |
440 | |
441 | (define-public perl-compress-raw-bzip2 | |
442 | (package | |
443 | (name "perl-compress-raw-bzip2") | |
444 | (version "2.068") | |
445 | (source | |
446 | (origin | |
447 | (method url-fetch) | |
448 | (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/" | |
449 | "Compress-Raw-Bzip2-" version ".tar.gz")) | |
450 | (sha256 | |
451 | (base32 | |
452 | "16hl58xppckldz05zdyid1l5gpaykzwvkq682h3rc3nilbhgjqqg")))) | |
453 | (build-system perl-build-system) | |
454 | ;; TODO: Use our bzip2 package. | |
455 | (home-page "http://search.cpan.org/dist/Compress-Raw-Bzip2") | |
456 | (synopsis "Low-level interface to bzip2 compression library") | |
457 | (description "This module provides a Perl interface to the bzip2 | |
458 | compression library.") | |
459 | (license (package-license perl)))) | |
8e18514a EB |
460 | |
461 | (define-public perl-compress-raw-zlib | |
462 | (package | |
463 | (name "perl-compress-raw-zlib") | |
464 | (version "2.068") | |
465 | (source | |
466 | (origin | |
467 | (method url-fetch) | |
468 | (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/" | |
469 | "Compress-Raw-Zlib-" version ".tar.gz")) | |
470 | (sha256 | |
471 | (base32 | |
472 | "06q7n87g26nn5gv4z2p31ca32f6zk124hqxc25rfgkjd3qi5798i")))) | |
473 | (build-system perl-build-system) | |
474 | (inputs | |
475 | `(("zlib" ,zlib))) | |
476 | (arguments | |
477 | `(#:phases (modify-phases %standard-phases | |
478 | (add-before | |
40b084a3 | 479 | 'configure 'configure-zlib |
8e18514a EB |
480 | (lambda* (#:key inputs #:allow-other-keys) |
481 | (call-with-output-file "config.in" | |
482 | (lambda (port) | |
483 | (format port " | |
484 | BUILD_ZLIB = False | |
485 | INCLUDE = ~a/include | |
486 | LIB = ~:*~a/lib | |
487 | OLD_ZLIB = False | |
488 | GZIP_OS_CODE = AUTO_DETECT" | |
489 | (assoc-ref inputs "zlib"))))))))) | |
490 | (home-page "http://search.cpan.org/dist/Compress-Raw-Zlib") | |
491 | (synopsis "Low-level interface to zlib compression library") | |
492 | (description "This module provides a Perl interface to the zlib | |
493 | compression library.") | |
494 | (license (package-license perl)))) | |
8aaafd34 EB |
495 | |
496 | (define-public perl-io-compress | |
497 | (package | |
498 | (name "perl-io-compress") | |
499 | (version "2.068") | |
500 | (source | |
501 | (origin | |
502 | (method url-fetch) | |
503 | (uri (string-append "mirror://cpan/authors/id/P/PM/PMQS/" | |
504 | "IO-Compress-" version ".tar.gz")) | |
505 | (sha256 | |
506 | (base32 | |
507 | "0dy0apjp7j9dfkzfjspjd3z9gh26srx5vac72g59bkkz1jf8s1gs")))) | |
508 | (build-system perl-build-system) | |
509 | (propagated-inputs | |
510 | `(("perl-compress-raw-zlib" ,perl-compress-raw-zlib) ; >=2.068 | |
511 | ("perl-compress-raw-bzip2" ,perl-compress-raw-bzip2))) ; >=2.068 | |
512 | (home-page "http://search.cpan.org/dist/IO-Compress") | |
513 | (synopsis "IO Interface to compressed files/buffers") | |
514 | (description "IO-Compress provides a Perl interface to allow reading and | |
515 | writing of compressed data created with the zlib and bzip2 libraries.") | |
516 | (license (package-license perl)))) | |
82aa2a28 LF |
517 | |
518 | (define-public lz4 | |
519 | (package | |
520 | (name "lz4") | |
521 | (version "131") | |
522 | (source | |
523 | (origin | |
524 | (method url-fetch) | |
525 | (uri (string-append "https://github.com/Cyan4973/lz4/archive/" | |
526 | "r" version ".tar.gz")) | |
527 | (sha256 | |
528 | (base32 "1vfg305zvj50hwscad24wan9jar6nqj14gdk2hqyr7bb9mhh0kcx")) | |
529 | (file-name (string-append name "-" version ".tar.gz")))) | |
530 | (build-system gnu-build-system) | |
531 | (native-inputs `(("valgrind" ,valgrind))) | |
532 | (arguments | |
533 | `(#:test-target "test" | |
534 | #:parallel-tests? #f ; tests fail if run in parallel | |
535 | #:make-flags (list "CC=gcc" | |
536 | (string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
537 | #:phases (modify-phases %standard-phases | |
538 | (delete 'configure)))) | |
539 | (home-page "https://github.com/Cyan4973/lz4") | |
540 | (synopsis "Compression algorithm focused on speed") | |
541 | (description "LZ4 is a lossless compression algorithm, providing | |
542 | compression speed at 400 MB/s per core (0.16 Bytes/cycle). It also features an | |
543 | extremely fast decoder, with speed in multiple GB/s per core (0.71 Bytes/cycle). | |
544 | A high compression derivative, called LZ4_HC, is also provided. It trades CPU | |
545 | time for compression ratio.") | |
546 | ;; The libraries (lz4, lz4hc, and xxhash are BSD licenced. The command | |
547 | ;; line interface programs (lz4, fullbench, fuzzer, datagen) are GPL2+. | |
548 | (license (list license:bsd-2 license:gpl2+)))) | |
dd8d6d65 SB |
549 | |
550 | (define-public squashfs-tools | |
551 | (package | |
552 | (name "squashfs-tools") | |
553 | (version "4.3") | |
554 | (source (origin | |
555 | (method url-fetch) | |
556 | (uri (string-append "mirror://sourceforge/squashfs/" | |
557 | "squashfs" version ".tar.gz")) | |
558 | (sha256 | |
559 | (base32 | |
560 | "1xpklm0y43nd9i6jw43y2xh5zvlmj9ar2rvknh0bh7kv8c95aq0d")))) | |
561 | (build-system gnu-build-system) | |
562 | (arguments | |
563 | '(#:tests? #f ; no check target | |
564 | #:make-flags | |
565 | (list "CC=gcc" | |
566 | "XZ_SUPPORT=1" | |
567 | "LZO_SUPPORT=1" | |
568 | "LZ4_SUPPORT=1" | |
569 | (string-append "INSTALL_DIR=" %output "/bin")) | |
570 | #:phases | |
571 | (modify-phases %standard-phases | |
572 | (replace 'configure | |
573 | (lambda _ | |
574 | (chdir "squashfs-tools")))))) | |
575 | (inputs | |
576 | `(("lz4" ,lz4) | |
577 | ("lzo" ,lzo) | |
578 | ("xz" ,xz) | |
579 | ("zlib" ,zlib))) | |
580 | (home-page "http://squashfs.sourceforge.net/") | |
581 | (synopsis "Tools to create and extract squashfs filesystems") | |
582 | (description | |
583 | "Squashfs is a highly compressed read-only filesystem for Linux. It uses | |
584 | zlib to compress files, inodes, and directories. All blocks are packed to | |
585 | minimize the data overhead, and block sizes of between 4K and 1M are supported. | |
586 | It is intended to be used for archival use, for live CDs, and for embedded | |
587 | systems where low overhead is needed. This package allows you to create and | |
588 | extract such filesystems.") | |
589 | (license license:gpl2+))) | |
820dc3f5 JM |
590 | |
591 | (define-public pigz | |
592 | (package | |
593 | (name "pigz") | |
594 | (version "2.3.3") | |
595 | (source (origin | |
596 | (method url-fetch) | |
597 | (uri (string-append "http://zlib.net/pigz/" | |
598 | name "-" version ".tar.gz")) | |
599 | (sha256 | |
600 | (base32 | |
601 | "172hdf26k4zmm7z8md7nl0dph2a7mhf3x7slb9bhfyff6as6g2sf")))) | |
602 | (build-system gnu-build-system) | |
603 | (arguments | |
604 | `(#:phases | |
605 | (modify-phases %standard-phases | |
606 | (delete 'configure) | |
607 | (replace 'install | |
608 | (lambda* (#:key outputs #:allow-other-keys) | |
609 | (let* ((out (assoc-ref outputs "out")) | |
610 | (bin (string-append out "/bin")) | |
611 | (man (string-append out "/share/man/man1"))) | |
612 | (install-file "pigz" bin) | |
613 | (symlink "pigz" (string-append bin "/unpigz")) | |
614 | (install-file "pigz.1" man) | |
615 | #t)))) | |
616 | #:make-flags (list "CC=gcc") | |
617 | #:test-target "tests")) | |
618 | (inputs `(("zlib" ,zlib))) | |
619 | (home-page "http://zlib.net/pigz/") | |
620 | (synopsis "Parallel implementation of gzip") | |
621 | (description | |
622 | "This package provides a parallel implementation of gzip that exploits | |
623 | multiple processors and multiple cores when compressing data.") | |
624 | ||
625 | ;; Things under zopfli/ are under ASL2.0, but 4 files at the top-level, | |
626 | ;; written by Mark Adler, are under another non-copyleft license. | |
627 | (license license:asl2.0))) |