mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-26 14:28:15 -05:00
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.
This commit is contained in:
parent
e2303e8e37
commit
e84490346d
1 changed files with 5 additions and 15 deletions
|
@ -35,7 +35,7 @@
|
||||||
;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
|
;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
|
||||||
;;; Copyright © 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
|
;;; Copyright © 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
|
||||||
;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@sdf.org>
|
;;; 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 Timotej Lazar <timotej.lazar@araneo.si>
|
||||||
;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
|
;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
|
||||||
;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
|
;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
|
||||||
|
@ -441,20 +441,10 @@ (define-public nginx-accept-language-module
|
||||||
(begin
|
(begin
|
||||||
;; The nginx source code is part of the module’s source.
|
;; The nginx source code is part of the module’s source.
|
||||||
(format #t "decompressing nginx source code~%")
|
(format #t "decompressing nginx source code~%")
|
||||||
(call-with-output-file "nginx.tar"
|
(let ((tar (assoc-ref inputs "tar"))
|
||||||
(lambda (out)
|
(nginx-srcs (assoc-ref inputs "nginx-sources")))
|
||||||
(let* ((gzip (assoc-ref inputs "gzip"))
|
(invoke (string-append tar "/bin/tar")
|
||||||
(nginx-srcs (assoc-ref inputs "nginx-sources"))
|
"xvf" nginx-srcs "--strip-components=1"))
|
||||||
(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")
|
|
||||||
#t)))
|
#t)))
|
||||||
(add-after 'unpack 'convert-to-dynamic-module
|
(add-after 'unpack 'convert-to-dynamic-module
|
||||||
(lambda _
|
(lambda _
|
||||||
|
|
Loading…
Reference in a new issue