aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/compression.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/compression.scm')
-rw-r--r--gnu/packages/compression.scm49
1 files changed, 47 insertions, 2 deletions
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index d44ae2d259..f92239d505 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -21,6 +21,7 @@
;;; Copyright © 2017 Petter <petter@mykolab.ch>
;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
+;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1017,7 +1018,8 @@ human-readable output.")
"http://ck.kolivas.org/apps/lrzip/lrzip-" version ".tar.bz2"))
(sha256
(base32
- "0mb449vmmwpkalq732jdyginvql57nxyd31sszb108yps1lf448d"))))
+ "0mb449vmmwpkalq732jdyginvql57nxyd31sszb108yps1lf448d"))
+ (patches (search-patches "lrzip-CVE-2017-8842.patch"))))
(build-system gnu-build-system)
(native-inputs
`(;; nasm is only required when building for 32-bit x86 platforms
@@ -1655,7 +1657,7 @@ speed.")
(source (package-source zstd))
(build-system gnu-build-system)
(native-inputs
- `(("googletest", googletest)))
+ `(("googletest" ,googletest)))
(arguments
`(#:phases
(modify-phases %standard-phases
@@ -2110,3 +2112,46 @@ single-member files which can't be decompressed in parallel.")
(description "innoextract allows extracting Inno Setup installers under
non-Windows systems without running the actual installer using wine.")
(license license:zlib)))
+
+(define-public google-brotli
+ (package
+ (name "google-brotli")
+ (version "1.0.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/google/brotli/archive/v"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "08kl9gww2058p1p7j9xqmcmrabcfihhj3fq984d7fi3bchb2mky2"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'rename-static-libraries
+ ;; The build tools put a 'static' suffix on the static libraries, but
+ ;; other applications don't know how to find these.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((lib (string-append (assoc-ref %outputs "out") "/lib/")))
+ (rename-file (string-append lib "libbrotlicommon-static.a")
+ (string-append lib "libbrotlicommon.a"))
+ (rename-file (string-append lib "libbrotlidec-static.a")
+ (string-append lib "libbrotlidec.a"))
+ (rename-file (string-append lib "libbrotlienc-static.a")
+ (string-append lib "libbrotlienc.a"))
+ #t))))
+ #:configure-flags
+ (list ;; Defaults to "lib64" on 64-bit archs.
+ (string-append "-DCMAKE_INSTALL_LIBDIR="
+ (assoc-ref %outputs "out") "/lib"))))
+ (home-page "https://github.com/google/brotli")
+ (synopsis "General-purpose lossless compression")
+ (description "This package provides the reference implementation of Brotli,
+a generic-purpose lossless compression algorithm that compresses data using a
+combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd
+order context modeling, with a compression ratio comparable to the best
+currently available general-purpose compression methods. It is similar in speed
+with @code{deflate} but offers more dense compression.
+
+The specification of the Brotli Compressed Data Format is defined in RFC 7932.")
+ (license license:expat)))