gnu: Add external-program.
[jackhill/guix/guix.git] / gnu / packages / compression.scm
index 2a403c9..cf23e88 100644 (file)
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
@@ -13,8 +13,8 @@
 ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
 ;;; Copyright © 2016, 2019 Kei Kebreau <kkebreau@posteo.net>
-;;; Copyright © 2016, 2018 Marius Bakke <mbakke@fastmail.com>
-;;; Copyright © 2017 Nils Gillmann <ng0@n0.is>
+;;; Copyright © 2016, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2017 ng0 <ng0@n0.is>
 ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
 ;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
 ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
@@ -22,7 +22,9 @@
 ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com>
 ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
-;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
+;;; Copyright © 2018, 2019 Pierre Neidhardt <mail@ambrevar.xyz>
+;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -47,6 +49,7 @@
   #:use-module (guix git-download)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
   #:use-module (gnu packages assembly)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages file)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages qt)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages valgrind)
   #:use-module (ice-9 match)
@@ -128,7 +133,16 @@ in compression.")
      `(#:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'enter-source
-           (lambda _ (chdir "contrib/minizip") #t)))))
+           (lambda _ (chdir "contrib/minizip") #t))
+         (add-after 'install 'remove-crypt-h
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Remove <minizip/crypt.h> because it interferes with libc's
+             ;; <crypt.h> given that 'minizip.pc' says "-I…/include/minizip".
+             ;; Fedora does the same:
+             ;; <https://src.fedoraproject.org/rpms/zlib/c/4d2785ec3116947872f6f32dc4104e6d36d8a7a4?branch=master>.
+             (let ((out (assoc-ref outputs "out")))
+               (delete-file (string-append out "/include/minizip/crypt.h"))
+               #t))))))
     (native-inputs
      `(("autoconf" ,autoconf)
        ("automake" ,automake)
@@ -158,8 +172,8 @@ the @code{zlib} source.")
    (home-page "https://savannah.nongnu.org/projects/fastjar")
    (synopsis "Replacement for Sun's 'jar' utility")
    (description
-    "FastJar is an attempt to create a much faster replacement for Sun's 'jar'
-utility.  Instead of being written in Java, FastJar is written in C.")
+    "FastJar is an attempt to create a much faster replacement for Sun's
+@code{jar} utility.  Instead of being written in Java, FastJar is written in C.")
    (license license:gpl2+)))
 
 (define-public libtar
@@ -197,14 +211,14 @@ adding and extracting files to/from a tar archive.")
 (define-public gzip
   (package
    (name "gzip")
-   (version "1.9")
+   (version "1.10")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnu/gzip/gzip-"
                                 version ".tar.xz"))
             (sha256
              (base32
-              "16h8g4acy7fgfxcjacr3wijjsnixwsfd2jhz3zwdi2qrzi262l5f"))))
+              "1h6p374d3j8d4cdfydzls021xa2yby8myc0h8d6m8bc7k6ncq9c4"))))
    (build-system gnu-build-system)
    (synopsis "General file (de)compression (using lzw)")
    (arguments
@@ -420,6 +434,23 @@ compressed with pbzip2 can be decompressed with bzip2).")
              (base32
               "0ibi2zsfaz6l756spjwc5rayf4ckgc9hwmy8qinppcyk4svz64mm"))))
    (build-system gnu-build-system)
+   (arguments
+    `(#:phases
+      (modify-phases %standard-phases
+        (add-after 'install 'move-static-lib
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let ((out    (assoc-ref outputs "out"))
+                  (static (assoc-ref outputs "static")))
+              (mkdir-p (string-append static "/lib"))
+              (rename-file (string-append out "/lib/liblzma.a")
+                           (string-append static "/lib/liblzma.a"))
+              ;; Remove reference to the static library from the .la file
+              ;; so Libtool does the right thing when both the shared and
+              ;; static library is available.
+              (substitute* (string-append out "/lib/liblzma.la")
+                (("^old_library='liblzma.a'") "old_library=''"))
+              #t))))))
+   (outputs '("out" "static"))
    (synopsis "General-purpose data compression")
    (description
     "XZ Utils is free general-purpose data compression software with high
@@ -519,14 +550,14 @@ some compression ratio).")
 (define-public lzip
   (package
     (name "lzip")
-    (version "1.20")
+    (version "1.21")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://savannah/lzip/lzip-"
                                  version ".tar.gz"))
              (sha256
               (base32
-               "0319q59kb8g324wnj7xzbr7vvlx5bcs13lr34j0zb3kqlyjq2fy9"))))
+               "12qdcw5k1cx77brv9yxi1h4dzwibhfmdpigrj43nfk8nscwm12z4"))))
     (build-system gnu-build-system)
     (home-page "https://www.nongnu.org/lzip/lzip.html")
     (synopsis "Lossless data compressor based on the LZMA algorithm")
@@ -620,13 +651,14 @@ This package is mostly for compatibility and historical interest.")
     (name "sfarklib")
     (version "2.24")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/raboof/sfArkLib/archive/"
-                                  version ".tar.gz"))
-              (file-name (string-append name "-" version ".tar.gz"))
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://github.com/raboof/sfArkLib.git")
+                     (commit version)))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "0bzs2d98rk1xw9qwpnc7gmlbxwmwc3dg1rpn310afy9pq1k9clzi"))))
+                "0jrxy24gak7q5ml06p5jjgzk9i5r2mkfjk4ycirkp4kg7k5a237w"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f ;no "check" target
@@ -686,13 +718,13 @@ sfArk file format to the uncompressed sf2 format.")
   (package
     (name "libmspack")
     (home-page "https://cabextract.org.uk/libmspack/")
-    (version "0.9.1")
+    (version "0.10.1")
     (source
      (origin
       (method url-fetch)
       (uri (string-append home-page name "-" version "alpha.tar.gz"))
       (sha256
-       (base32 "0h1f5w8rjnq7dcqpqm1mpx5m8q80691kid6f7npqlqwqqzckd8v2"))))
+       (base32 "13janaqsvm7aqc4agjgd4819pbgqv50j88bh5kci1z70wvg65j5s"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags '("--disable-static")))
@@ -705,7 +737,7 @@ decompression of some loosely related file formats used by Microsoft.")
 (define-public lz4
   (package
     (name "lz4")
-    (version "1.8.1.2")
+    (version "1.9.2")
     (source
      (origin
        (method git-fetch)
@@ -713,16 +745,26 @@ decompression of some loosely related file formats used by Microsoft.")
                            (commit (string-append "v" version))))
        (sha256
         (base32
-         "1jggv4lvfav53advnj0pwqgxzn868lrj8dc9zp73iwvqlj82mhmx"))
+         "0lpaypmk70ag2ks3kf2dl4ac3ba40n5kc1ainkp9wfjawz76mh61"))
        (file-name (git-file-name name version))))
     (build-system gnu-build-system)
-    (native-inputs `(("valgrind" ,valgrind)))   ; for tests
+    (native-inputs
+     `(;; For tests.
+       ("python" ,python)
+       ("valgrind" ,valgrind)))
     (arguments
      `(#:test-target "test"
        #:make-flags (list "CC=gcc"
                           (string-append "prefix=" (assoc-ref %outputs "out")))
        #:phases (modify-phases %standard-phases
-                  (delete 'configure))))        ; no configure script
+                  (delete 'configure)            ;no configure script
+                  (add-before 'check 'disable-broken-test
+                    (lambda _
+                      ;; XXX: test_install.sh fails when prefix is a subdirectory.
+                      (substitute* "tests/Makefile"
+                        (("^test: (.*) test-install" _ targets)
+                         (string-append "test: " targets)))
+                      #t)))))
     (home-page "https://www.lz4.org")
     (synopsis "Compression algorithm focused on speed")
     (description "LZ4 is a lossless compression algorithm, providing
@@ -737,7 +779,7 @@ time for compression ratio.")
 (define-public squashfs-tools
   (package
     (name "squashfs-tools")
-    (version "4.3")
+    (version "4.4")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/squashfs/squashfs/"
@@ -745,10 +787,10 @@ time for compression ratio.")
                                   "squashfs" version ".tar.gz"))
               (sha256
                (base32
-                "1xpklm0y43nd9i6jw43y2xh5zvlmj9ar2rvknh0bh7kv8c95aq0d"))))
+                "0zmhvczscqz0mzh4b9m8m42asq14db0a6lc8clp5ljq5ybrv70d9"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:tests? #f ; no check target
+     '(#:tests? #f                      ; no check target
        #:make-flags
        (list "CC=gcc"
              "XZ_SUPPORT=1"
@@ -760,13 +802,6 @@ time for compression ratio.")
          (replace 'configure
            (lambda _
              (chdir "squashfs-tools")
-             #t))
-         (add-after 'unpack 'fix-glibc-compatability
-           (lambda _
-             (substitute* '("squashfs-tools/mksquashfs.c"
-                            "squashfs-tools/unsquashfs.c")
-               (("<sys/sysinfo.h>")
-                "<sys/sysinfo.h>\n#include <sys/sysmacros.h>"))
              #t)))))
     (inputs
      `(("lz4" ,lz4)
@@ -784,23 +819,6 @@ systems where low overhead is needed.  This package allows you to create and
 extract such file systems.")
     (license license:gpl2+)))
 
-;; We need this for building squashfs images with symlinks.
-(define-public squashfs-tools-next
-  (let ((commit "fb33dfc32b131a1162dcf0e35bd88254ae10e265")
-        (revision "1"))
-    (package (inherit squashfs-tools)
-      (name "squashfs-tools-next")
-      (version (string-append "4.3-" revision (string-take commit 7)))
-      (source (origin
-                (method git-fetch)
-                (uri (git-reference
-                      (url "https://github.com/plougher/squashfs-tools.git")
-                      (commit commit)))
-                (file-name (git-file-name name version))
-                (sha256
-                 (base32
-                  "1x2skf8hxzfch978nzx5mh46d4hhi6gl22270hiarjszsjk3bnsx")))))))
-
 (define-public pigz
   (package
     (name "pigz")
@@ -949,13 +967,13 @@ smaller than those produced by @code{Xdelta}.")
  (package
    (name "cabextract")
    (home-page "https://cabextract.org.uk/")
-   (version "1.9")
+   (version "1.9.1")
    (source (origin
               (method url-fetch)
-              (uri (string-append home-page name "-" version ".tar.gz"))
+              (uri (string-append home-page "cabextract-" version ".tar.gz"))
               (sha256
                (base32
-                "1hf4zhjxfdgq9x172r5zfdnafma9q0zf7372syn8hcn7hcypkg0v"))
+                "19qwhl2r8ip95q4vxzxg2kp4p125hjmc9762sns1dwwf7ikm7hmg"))
               (modules '((guix build utils)))
               (snippet
                '(begin
@@ -1069,12 +1087,13 @@ well as bzip2.")
     (version "1.1.7")
     (source
      (origin
-       (method url-fetch)
-       (uri (string-append "https://github.com/google/snappy/archive/"
-                           version ".tar.gz"))
-       (file-name (string-append "snappy-" version ".tar.gz"))
+       (method git-fetch)
+       (uri (git-reference
+              (url "https://github.com/google/snappy.git")
+              (commit version)))
+       (file-name (git-file-name name version))
        (sha256
-        (base32 "1m7rcdqzkys5lspj8jcsaah8w33zh28s771bw0ga2lgzfgl05yix"))
+        (base32 "1x7r8sjmdqlqjz0xfiwdyrqpgaj5yrvrgb28ivgpvnxgar5qv6m2"))
        (patches (search-patches "snappy-add-O2-flag-in-CmakeLists.txt.patch"))))
     (build-system cmake-build-system)
     (arguments
@@ -1141,7 +1160,7 @@ for most inputs, but the resulting compressed files are anywhere from 20% to
              (invoke "make" "test")
              (invoke "make" "test_7z")
              (invoke "make" "test_7zr"))))))
-    (inputs
+    (native-inputs
      (let ((system (or (%current-target-system)
                        (%current-system))))
        `(,@(cond ((string-prefix? "x86_64" system)
@@ -1261,33 +1280,45 @@ or junctions, and always follows hard links.")
 (define-public unshield
   (package
     (name "unshield")
-    (version "1.4.2")
+    (version "1.4.3")
     (source
-     (origin (method url-fetch)
-             (uri (string-append "http://github.com/twogood/unshield/archive/"
-                                 version ".tar.gz"))
-             (file-name (string-append name "-" version ".tar.gz"))
+     (origin (method git-fetch)
+             (uri (git-reference
+                    (url "http://github.com/twogood/unshield.git")
+                    (commit version)))
+             (file-name (git-file-name name version))
              (sha256
               (base32
-               "0x7ps644yp5dka2zhb8w0ifqmw3d255jafpzfwv8xbcpgq6fmm2x"))))
+               "19wn22vszhci8dfcixx5rliz7phx3lv5ablvhjlclvj75k2vsdqd"))))
     (build-system cmake-build-system)
     (inputs
      `(("zlib" ,zlib)
        ("openssl" ,openssl)
-       ;; test data that is otherwise downloaded with curl
+       ;; Test data that is otherwise downloaded with curl.
        ("unshield-avigomanager11b22.zip"
         ,(origin
            (method url-fetch)
-           (uri (string-append "https://www.dropbox.com/s/8r4b6752swe3nhu/"
-                               "unshield-avigomanager11b22.zip?dl=1"))
+           (uri (string-append
+                 "https://www.dropbox.com/s/8r4b6752swe3nhu/"
+                 "unshield-avigomanager11b22.zip?dl=1"))
            (sha256
             (base32 "0fwq7lih04if68wpwpsk5wjqyvh32db76a41sq6gbx4dn1lc3ddn"))
            (file-name "unshield-avigomanager11b22.zip")))
+       ("unshield-baldurs_gate_patch_v1_1_4315_international.zip"
+        ,(origin
+           (method url-fetch)
+           (uri (string-append
+                 "https://www.dropbox.com/s/9ruil8oi6amjbbk/"
+                 "unshield-baldurs_gate_patch_v1_1_4315_international.zip?dl=1"))
+           (sha256
+            (base32 "0spaxf6dardlhqxz3ys09fzamj007q3nfyw4xng6gh3qp9780maj"))
+           (file-name "unshield-baldurs_gate_patch_v1_1_4315_international.zip")))
        ("unshield-the-feeble-files-spanish.zip"
         ,(origin
            (method url-fetch)
-           (uri (string-append "https://www.dropbox.com/s/1ng0z9kfxc7eb1e/"
-                               "unshield-the-feeble-files-spanish.zip?dl=1"))
+           (uri (string-append
+                 "https://www.dropbox.com/s/1ng0z9kfxc7eb1e/"
+                 "unshield-the-feeble-files-spanish.zip?dl=1"))
            (sha256
             (base32 "1k5cw6vnpja8yjlnhx5124xrw9i8s1l539hfdqqrqz3l5gn0bnyd"))
            (file-name "unshield-the-feeble-files-spanish.zip")))))
@@ -1303,6 +1334,7 @@ or junctions, and always follows hard links.")
                          (copy-file (assoc-ref inputs i)
                                     (string-append "test/v0/" i)))
                        '("unshield-avigomanager11b22.zip"
+                         "unshield-baldurs_gate_patch_v1_1_4315_international.zip"
                          "unshield-the-feeble-files-spanish.zip"))
              (substitute* (find-files "test/" "/*\\.sh")
                ;; Tests expect the unshield binary in a specific
@@ -1315,7 +1347,12 @@ or junctions, and always follows hard links.")
              (substitute* "test/v0/avigomanager.sh"
                (("test.zip")
                 (string-append (getcwd)
-                  "/test/v0/unshield-avigomanager11b22.zip")))
+                               "/test/v0/unshield-avigomanager11b22.zip")))
+             (substitute* "test/v0/baldurs_gate_patch_v1_1_4315_international.sh"
+               (("test.zip")
+                (string-append
+                 (getcwd)
+                 "/test/v0/unshield-baldurs_gate_patch_v1_1_4315_international.zip")))
              (substitute* "test/v0/the-feeble-files-spanish.sh"
                (("test.zip")
                 (string-append (getcwd)
@@ -1334,22 +1371,50 @@ or junctions, and always follows hard links.")
 (define-public zstd
   (package
     (name "zstd")
-    (version "1.3.8")
+    (version "1.4.2")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/facebook/zstd/releases/download/"
                            "v" version "/zstd-" version ".tar.gz"))
        (sha256
-        (base32 "13nlsqhkn276frxrzjdn7wz0j9zz414lf336885ykyxcvw2a0gr9"))))
+        (base32 "1ja3nrjynmiwwdjrf6crraizkbagp7y414bqqq2ady91nn1hjwqj"))))
     (build-system gnu-build-system)
+    (outputs '("out"                    ;1.1MiB executables and documentation
+               "lib"                    ;1MiB shared library and headers
+               "static"))               ;1MiB static library
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         (delete 'configure))           ; no configure script
+         (delete 'configure)            ;no configure script
+         (add-after 'install 'adjust-library-locations
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (lib (assoc-ref outputs "lib"))
+                    (static (assoc-ref outputs "static"))
+                    (shared-libs (string-append lib "/lib"))
+                    (static-libs (string-append static "/lib")))
+               ;; Move the static library to its own output to save ~1MiB.
+               (mkdir-p static-libs)
+               (for-each (lambda (ar)
+                           (link ar (string-append static-libs "/"
+                                                   (basename ar)))
+                           (delete-file ar))
+                         (find-files shared-libs "\\.a$"))
+
+               ;; While here, remove prefix= from the pkg-config file because it
+               ;; is unused, and because it contains a needless reference to $out.
+               ;; XXX: It would be great if #:disallow-references worked between
+               ;; outputs.
+               (substitute* (string-append shared-libs "/pkgconfig/libzstd.pc")
+                 (("^prefix=.*") ""))
+
+               #t))))
        #:make-flags
        (list "CC=gcc"
              (string-append "PREFIX=" (assoc-ref %outputs "out"))
+             (string-append "LIBDIR=" (assoc-ref %outputs "lib") "/lib")
+             (string-append "INCLUDEDIR=" (assoc-ref %outputs "lib") "/include")
              ;; Skip auto-detection of, and creating a dependency on, the build
              ;; environment's ‘xz’ for what amounts to a dubious feature anyway.
              "HAVE_LZMA=0"
@@ -1520,14 +1585,27 @@ recreates the stored directory structure by default.")
     (name "zziplib")
     (version "0.13.69")
     (home-page "https://github.com/gdraheim/zziplib")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append home-page "/archive/v" version ".tar.gz"))
-       (sha256
-        (base32
-         "0i052a7shww0fzsxrdp3rd7g4mbzx7324a8ysbc0br7frpblcql4"))))
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference (url home-page)
+                                  (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0fbk9k7ryas2wh2ykwkvm1pbi40i88rfvc3dydh9xyd7w2jcki92"))))
     (build-system gnu-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (add-before 'check 'make-files-writable
+                    (lambda _
+                      (for-each make-file-writable
+                                (find-files "test" #:directories? #t))
+                      #t)))
+
+       ;; XXX: The default test target attempts to download external resources and
+       ;; fails without error: <https://github.com/gdraheim/zziplib/issues/53>.
+       ;; To prevent confusing log messages, just run a simple zip test that works.
+       #:test-target "check-readme"))
     (inputs
      `(("zlib" ,zlib)))
     (native-inputs `(("perl" ,perl)     ; for the documentation
@@ -1546,18 +1624,20 @@ recreates the stored directory structure by default.")
 (define-public libzip
   (package
     (name "libzip")
-    (version "1.5.1")
+    (version "1.5.2")
     (source (origin
               (method url-fetch)
               (uri (string-append
-                    "https://libzip.org/download/" name "-" version ".tar.xz"))
+                    "https://libzip.org/download/libzip-" version ".tar.xz"))
               (sha256
                (base32
-                "0wnkkvkq90wyawj9221i77sf3nix1vj3ygzdy59k8yvcjnv3bsh4"))))
+                "1d53shcy7nvls5db573bbdlm25lfz1iw2zshng5f00cssi5lvpmk"))))
     (native-inputs
      `(("perl" ,perl)))
     (inputs
-     `(("zlib" ,zlib)))
+     `(("gnutls" ,gnutls)
+       ("openssl" ,openssl)
+       ("zlib" ,zlib)))
     (build-system cmake-build-system)
     (home-page "https://libzip.org")
     (synopsis "C library for reading, creating, and modifying zip archives")
@@ -1659,17 +1739,15 @@ Clzip is intended to be fully compatible with the regular lzip package.")
 (define-public lzlib
   (package
     (name "lzlib")
-    (version "1.10")
+    (version "1.11")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "mirror://savannah/lzip/"
-                           name "/" name "-" version ".tar.gz"))
+       (uri (string-append "mirror://savannah/lzip/lzlib/"
+                           "lzlib-" version ".tar.gz"))
        (sha256
-        (base32 "0hqhnj2lzqacdbmmnpy91lsm1rd9zlngs1q6s9pyahsv1a0bfshx"))))
+        (base32 "0djdj4sg33rzi4k84cygvnp09bfsv6i8wy2k7i67rayib63myp3c"))))
     (build-system gnu-build-system)
-    ;; The included minilzip binary is only ~16 smaller than the ‘real’ lzip.
-    ;; It's used during the test suite, but don't be tempted to install it.
     (arguments
      `(#:configure-flags
        (list "CC=gcc"
@@ -1717,19 +1795,30 @@ single-member files which can't be decompressed in parallel.")
 (define-public innoextract
   (package
    (name "innoextract")
-   (version "1.7")
+   (version "1.8")
    (source
     (origin
      (method url-fetch)
-     (uri (string-append "https://github.com/dscharrer/innoextract/archive/"
-                         version ".tar.gz"))
+     (uri (string-append "https://github.com/dscharrer/innoextract/releases"
+                         "/download/" version
+                         "/innoextract-" version ".tar.gz"))
      (sha256
       (base32
-       "0khwi9f0q0h6xfbixrrc1rfpgj0b7ajwilq7yhmxnn5lpc807f6x"))
-     (file-name (string-append name "-" version ".tar.gz"))))
+       "0saj50n8ds85shygy4mq1h6s99510r9wgjjdll4dmvhra4lzcy2y"))))
    (build-system cmake-build-system)
    (arguments
-    `(#:tests? #f)) ;; No tests available.
+    `(#:tests? #f
+      #:phases (modify-phases %standard-phases
+                 (add-before 'configure 'glibc-is-already-a-system-library
+                   (lambda _
+                     ;; Prevent the build system from passing the glibc
+                     ;; header files to GCC as "system headers", because
+                     ;; it conflicts with the system headers already known
+                     ;; to GCC, causing #include_next failures.
+                     (substitute* "CMakeLists.txt"
+                       (("include_directories\\(SYSTEM \\$\\{iconv")
+                        "include_directories(${iconv"))
+                     #t)))))
    (inputs `(("boost" ,boost)
              ("libiconv" ,libiconv)
              ("xz" ,xz)))
@@ -1743,14 +1832,16 @@ non-Windows systems without running the actual installer using wine.")
 (define-public google-brotli
   (package
     (name "google-brotli")
-    (version "1.0.4")
-    (source (origin
-             (method url-fetch)
-             (uri (string-append "https://github.com/google/brotli/archive/v"
-                                 version ".tar.gz"))
-             (sha256
-              (base32
-               "1hrpmz162k4x3xm6vmbpm443jlfr1kp536p8962y2dncy7gs6s12"))))
+    (version "1.0.7")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/google/brotli.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1811b55wdfg4kbsjcgh1kc938g118jpvif97ilgrmbls25dfpvvw"))))
     (build-system cmake-build-system)
     (arguments
      `(#:phases
@@ -1789,13 +1880,17 @@ The specification of the Brotli Compressed Data Format is defined in RFC 7932.")
     (version "1.03")
     (source (origin
              (method url-fetch)
-             (uri (string-append "http://www.oberhumer.com/opensource/"
+             (uri (string-append "https://www.oberhumer.com/opensource/"
                                  name "/download/" name "-" version ".tar.gz"))
              (sha256
               (base32
                "0j036lkwsxvm15gr29n8wn07cqq79dswjs9k54939ms5zngjjrdq"))))
     (build-system gnu-build-system)
-    (home-page "http://www.oberhumer.com/opensource/ucl/")
+    (arguments
+     `(;; UCL 1.03 fails to build with newer C standards.
+       #:configure-flags '("CFLAGS=-std=gnu90"
+                           "--enable-shared" "--disable-static")))
+    (home-page "https://www.oberhumer.com/opensource/ucl/")
     (synopsis "Portable lossless data compression library")
     (description "UCL implements a number of compression algorithms that
 achieve an excellent compression ratio while allowing fast decompression.
@@ -1818,9 +1913,11 @@ decompression is a little bit slower.")
                "08anybdliqsbsl6x835iwzljahnm9i7v26icdjkcv33xmk6p5vw1"))
              (patches (search-patches "upx-fix-CVE-2017-15056.patch"))))
     (build-system gnu-build-system)
-    (native-inputs `(("perl" ,perl)
-                     ("ucl" ,ucl)))
-    (inputs `(("zlib" ,zlib)))
+    (native-inputs
+     `(("perl" ,perl)))
+    (inputs
+     `(("ucl" ,ucl)
+       ("zlib" ,zlib)))
     (arguments
      `(#:make-flags
        (list "all"
@@ -1860,3 +1957,162 @@ compressor.  UPX typically reduces the file size of programs and shared
 libraries by around 50%--70%, thus reducing disk space, network load times,
 download times, and other distribution and storage costs.")
     (license license:gpl2+)))
+
+(define-public quazip
+  (package
+    (name "quazip")
+    (version "0.8.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/stachenov/quazip.git")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1g473gnsbkvxpsv8lbsmhspn7jnq86b05zzgqh11r581v8ndvz5s"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f))                    ;no test
+    (native-inputs
+     `(("doxygen" ,doxygen)))
+    (inputs
+     `(("qtbase" ,qtbase)
+       ("zlib" ,zlib)))
+    (home-page "https://stachenov.github.io/quazip/index.html")
+    (synopsis "Qt/C++ wrapper for Minizip")
+    (description "QuaZIP is a simple C++ wrapper over Gilles Vollant's
+ZIP/UNZIP package that can be used to access ZIP archives.  It uses
+Trolltech's Qt toolkit.
+
+QuaZIP allows you to access files inside ZIP archives using QIODevice
+API, and that means that you can also use QTextStream, QDataStream or
+whatever you would like to use on your zipped files.
+
+QuaZIP provides complete abstraction of the ZIP/UNZIP API, for both
+reading from and writing to ZIP archives. ")
+    ;; Project is distributed under LGPL, but "quazip/z*" "quazip/unzip.*" are
+    ;; distributed under zlib terms.
+    (license (list license:lgpl2.1+ license:zlib))))
+
+(define-public zutils
+  (package
+    (name "zutils")
+    ;; Check and remove the lint-hidden-cve property when updating.
+    (version "1.8")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://savannah/zutils/zutils-" version ".tar.lz"))
+       (sha256
+        (base32 "0dx35mv78fgqgz6sszs05ng8ipz2xy09ry9vpmka2rmy08b7x907"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       (list "--sysconfdir=/etc")
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'install
+          (lambda* (#:key make-flags outputs #:allow-other-keys)
+            (apply invoke "make" "install"
+                   (string-append "sysconfdir=" (assoc-ref outputs "out")
+                                  "/etc")
+                   make-flags))))))
+    (native-inputs
+     ;; Needed to extract the source tarball and run the test suite.
+     `(("lzip" ,lzip)))
+    (properties `((lint-hidden-cve . ("CVE-2018-1000637"))))
+    (home-page "https://www.nongnu.org/zutils/zutils.html")
+    (synopsis "Utilities that transparently operate on compressed files")
+    (description
+     "Zutils is a collection of utilities able to process any combination of
+compressed and uncompressed files transparently.  If any given file, including
+standard input, is compressed, its decompressed content is used instead.
+
+@command{zcat}, @command{zcmp}, @command{zdiff}, and @command{zgrep} are
+improved replacements for the shell scripts provided by GNU gzip.
+@command{ztest} tests the integrity of supported compressed files.
+@command{zupdate} recompresses files with lzip, similar to gzip's
+@command{znew}.
+
+Supported compression formats are bzip2, gzip, lzip, and xz.  Zutils uses
+external compressors: the compressor to be used for each format is configurable
+at run time, and must be installed separately.")
+    (license (list license:bsd-2        ; arg_parser.{cc,h}
+                   license:gpl2+))))    ; the rest
+
+(define-public makeself-safeextract
+  (let ((commit "1a95e121fa8e3c02d307ae37b9b7834e616c3683"))
+    (package
+      (name "makeself-safeextract")
+      (version (git-version "0.0.0" "1" commit))
+      (home-page "https://github.com/ssokolow/makeself_safeextract")
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url home-page)
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "1anlinaj9lvfi8bn00wp11vzqq0f9sig4fm9yrspisx31v0z4a2c"))))
+      (build-system trivial-build-system)
+      (inputs
+       `(("python" ,python-2)
+         ("p7zip" ,p7zip)
+         ("unzip" ,unzip)))
+      (arguments
+       `(#:modules ((guix build utils))
+         #:builder
+         (begin
+           (use-modules (guix build utils))
+           (let* ((name "makeself_safeextract")
+                  (source (string-append (assoc-ref %build-inputs "source")
+                                         "/" name ".py"))
+                  (bin (string-append (assoc-ref %outputs "out") "/bin"))
+                  (target (string-append bin "/" name))
+                  (python (string-append (assoc-ref %build-inputs "python") "/bin"))
+                  (7z (string-append (assoc-ref %build-inputs "p7zip") "/bin/7z"))
+                  (unzip (string-append (assoc-ref %build-inputs "unzip") "/bin/unzip")))
+             (setenv "PATH" (string-append (getenv "PATH") ":" python))
+             (mkdir-p bin)
+             (copy-file source target)
+             (substitute* target
+               (("'7z'") (format #f "'~a'" 7z))
+               (("'unzip'") (format #f "'~a'" unzip)))
+             (patch-shebang target)))))
+      (synopsis "Extract makeself and mojo archives without running untrusted code")
+      (description "This package provides a script to unpack self-extracting
+archives generated by @command{makeself} or @command{mojo} without running the
+possibly untrusted extraction shell script.")
+      (license license:gpl3+))))
+
+(define-public ncompress
+  (package
+    (name "ncompress")
+    (version "4.2.4.5")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/vapier/ncompress")
+                    (commit (string-append "v" version))))
+              (patches (search-patches "ncompress-fix-softlinks.patch"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0s3ik7k5a5vzcfiayhsxrc87drg3l425aqapspmw5py91b9jhc8r"))))
+    (arguments
+     '(#:make-flags (list "CC=gcc"
+                          (string-append "BINDIR=" %output "/bin")
+                          (string-append "MANDIR=" %output "/share/man/man1"))
+       #:phases (modify-phases %standard-phases
+                  (delete 'configure))))
+    (build-system gnu-build-system)
+    (home-page "https://github.com/vapier/ncompress/")
+    (synopsis "Original Lempel-Ziv compress/uncompress programs")
+    (description "(N)compress provides the original compress and uncompress
+programs that used to be the de facto UNIX standard for compressing and
+uncompressing files.  These programs implement a fast, simple Lempel-Ziv (LZW)
+file compression algorithm.")
+    (license license:gpl2+)))