summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorian Pelz <pelzflorian@pelzflorian.de>2020-03-20 07:28:07 +0100
committerFlorian Pelz <pelzflorian@pelzflorian.de>2020-03-20 08:13:56 +0000
commite84490346d8dac3720a57a331f533ce67ff0da1c (patch)
tree56d66aa8140879df11a6adf8bb3330bae779f24a
parente2303e8e375ed2e07c1fd760c86a204eb51fbc6e (diff)
downloadguix-e84490346d8dac3720a57a331f533ce67ff0da1c.tar.gz
gnu: nginx-accept-language-module: Simplify decompression phase.
See <https://lists.gnu.org/archive/html/guix-patches/2020-03/msg00652.html>
where a similar change was found to be sufficient.

* gnu/packages/web.scm (nginx-accept-language-module)[arguments]:
In 'unpack-nginx-sources' phase, extract the compressed tarball using
tar's auto-decompression instead of decompressing manually.
-rw-r--r--gnu/packages/web.scm20
1 files changed, 5 insertions, 15 deletions
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 0f5f4d2d69..10cbf6165b 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -35,7 +35,7 @@
 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@sdf.org>
-;;; Copyright © 2019 Florian Pelz <pelzflorian@pelzflorian.de>
+;;; Copyright © 2019, 2020 Florian Pelz <pelzflorian@pelzflorian.de>
 ;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
 ;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
@@ -441,20 +441,10 @@ documentation.")
                (begin
                  ;; The nginx source code is part of the module’s source.
                  (format #t "decompressing nginx source code~%")
-                 (call-with-output-file "nginx.tar"
-                   (lambda (out)
-                     (let* ((gzip (assoc-ref inputs "gzip"))
-                            (nginx-srcs (assoc-ref inputs "nginx-sources"))
-                            (pipe (open-pipe* OPEN_READ
-                                              (string-append gzip "/bin/gzip")
-                                              "-cd"
-                                              nginx-srcs)))
-                       (dump-port pipe out)
-                       (unless (= (status:exit-val (close-pipe pipe)) 0)
-                         (error "gzip decompress failed")))))
-                 (invoke (string-append (assoc-ref inputs "tar") "/bin/tar")
-                         "xvf" "nginx.tar" "--strip-components=1")
-                 (delete-file "nginx.tar")
+                 (let ((tar (assoc-ref inputs "tar"))
+                       (nginx-srcs (assoc-ref inputs "nginx-sources")))
+                   (invoke (string-append tar "/bin/tar")
+                           "xvf" nginx-srcs "--strip-components=1"))
                  #t)))
            (add-after 'unpack 'convert-to-dynamic-module
              (lambda _