summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorTimothy Sample <samplet@ngyro.com>2021-02-07 13:38:56 -0500
committerTimothy Sample <samplet@ngyro.com>2022-03-19 13:33:06 -0600
commit6bf2fa8d1c79accc85aee987687c5d8f375b3d2c (patch)
tree4f86454388b6f1d7f8b3759302dd55bd54283e43 /gnu/packages
parentee2f074d0b0f9c338a4e6abda7a544476cd41319 (diff)
downloadguix-6bf2fa8d1c79accc85aee987687c5d8f375b3d2c.tar.gz
gnu: gash-utils-boot: Create 'echo' wrapper.
* gnu/packages/commencement.scm (gash-utils-boot)[arguments]: Add a
phase that generates an external wrapper for Gash's 'echo' built-in.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/commencement.scm14
1 files changed, 13 insertions, 1 deletions
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index e63c0b3437..df91f57b59 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -242,7 +242,19 @@ pure Scheme to Tar and decompression in one easy step.")
                  (copy-file (string-append gash-godir "/gash/compat.go")
                             (string-append godir "/gash/compat.go"))
                  (copy-recursively (string-append gash-godir "/gash/compat")
-                                   (string-append godir "/gash/compat")))))))))
+                                   (string-append godir "/gash/compat")))))
+           ;; We need an external echo.
+           (add-after 'install 'make-echo
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out"))
+                      (gash (assoc-ref inputs "gash")))
+                 (with-output-to-file (string-append out "/bin/echo")
+                   (lambda ()
+                     (display (string-append "#!" gash "/bin/gash\n"))
+                     (newline)
+                     (display "echo \"$@\"")
+                     (newline)))
+                 (chmod (string-append out "/bin/echo") #o755))))))))
     (inputs `(("gash" ,gash-boot)
               ("guile" ,%bootstrap-guile)))
     (native-inputs `(("bootar" ,bootar)))))