summary refs log tree commit diff
path: root/gnu/packages/compression.scm
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2022-08-07 02:00:00 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2022-08-07 02:00:00 +0200
commit36c5fa6c4d50999ca533be882e743a061b3ad0d8 (patch)
tree440e2fe8c691e6f16f04aaa97091c112c5d8d930 /gnu/packages/compression.scm
parent5c131aff691fa1cb0fafe71b5f2795902ae056a7 (diff)
downloadguix-36c5fa6c4d50999ca533be882e743a061b3ad0d8.tar.gz
gnu: unzip: Use G-expressions.
* gnu/packages/compression.scm (unzip)[arguments]:
Rewrite as G-expressions.
Diffstat (limited to 'gnu/packages/compression.scm')
-rw-r--r--gnu/packages/compression.scm42
1 files changed, 23 insertions, 19 deletions
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 6854bcafe4..026629cad1 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -1818,25 +1818,29 @@ Compression ratios of 2:1 to 3:1 are common for text files.")
     (build-system gnu-build-system)
     ;; no inputs; bzip2 is not supported, since not compiled with BZ_NO_STDIO
     (arguments
-     `(#:phases (modify-phases %standard-phases
-                  (delete 'configure)
-                  (add-after 'unpack 'fortify
-                    (lambda _
-                      ;; Mitigate CVE-2018-1000035, an exploitable buffer overflow.
-                      ;; This environment variable is recommended in 'unix/Makefile'
-                      ;; for passing flags to the C compiler.
-                      (setenv "LOCAL_UNZIP" "-D_FORTIFY_SOURCE=1")
-                      #t))
-                  (replace 'build
-                    (lambda* (#:key make-flags #:allow-other-keys)
-                      (apply invoke "make"
-                             `("-j" ,(number->string
-                                      (parallel-job-count))
-                               ,@make-flags
-                               "generic_gcc")))))
-       #:make-flags (list "-f" "unix/Makefile"
-                          (string-append "prefix=" %output)
-                          (string-append "MANDIR=" %output "/share/man/man1"))))
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (delete 'configure)
+               (add-after 'unpack 'fortify
+                 (lambda _
+                   ;; Mitigate CVE-2018-1000035, an exploitable buffer overflow.
+                   ;; This environment variable is recommended in 'unix/Makefile'
+                   ;; for passing flags to the C compiler.
+                   (setenv "LOCAL_UNZIP" "-D_FORTIFY_SOURCE=1")
+                   #t))
+               (replace 'build
+                 (lambda* (#:key make-flags #:allow-other-keys)
+                   (apply invoke "make"
+                          `("-j" ,(number->string
+                                   (parallel-job-count))
+                            ,@make-flags
+                            "generic_gcc")))))
+           #:make-flags
+           ;; Fix cross-compilation without affecting native builds, as doing so
+           ;; would trigger too many rebuilds: https://issues.guix.gnu.org/57127
+           #~(list "-f" "unix/Makefile"
+                   (string-append "prefix=" %output)
+                   (string-append "MANDIR=" %output "/share/man/man1"))))
     (home-page "http://www.info-zip.org/UnZip.html")
     (synopsis "Decompression and file extraction utility")
     (description