Subject: [PATCH 1/3] gnu: gzip: Fix script interpreters when cross-compiling.

From: Christopher Baines <[email-masked]>
Date: Fri, 28 Oct 2022 13:29:34 +0100

Add bash-minimal as an input fixes the interpreters for various scripts (like
zcat and zless) when cross-compiling.

* gnu/packages/compression.scm (gzip)[inputs]: Add bash-minimal when cross
compiling.
---
 gnu/packages/compression.scm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index f2bf5c443c..b3a678480d 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -70,6 +70,7 @@ (define-module (gnu packages compression)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages backup)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages benchmark)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
@@ -281,6 +282,10 @@ (define-public gzip
                (string-append "exec " (assoc-ref outputs "out")
                               "/bin/gzip")))
             #t)))))
+   (inputs
+    `(,@(if (%current-target-system)
+            `(("bash" ,bash-minimal))
+            '())))
    (description
     "GNU Gzip provides data compression and decompression utilities; the
 typical extension is \".gz\".  Unlike the \"zip\" format, it compresses a single
-- 
2.37.3