help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to add /bin/sh to the build environment


From: Xinglu Chen
Subject: Re: How to add /bin/sh to the build environment
Date: Mon, 08 Nov 2021 17:54:12 +0100

Hi,

On Mon, Nov 08 2021, Foo Chuan Wei wrote:

> I am trying to package the Standard ML of New Jersey (SML/NJ) compiler
> in Guix. My current understanding is that its installation process
> relies on the existence of /bin/sh in a fundamental way. Is there a way
> to add /bin/sh to the build environment?
>
> In the build phase of the package definition, I tried something like
> this:
>
>     (mkdir-p "/bin")
>     (symlink (which "sh") "/bin/sh")

I would use ‘substitute*’ from (guix build utils) to patch the
references to /bin/sh

  (lambda* (#:key inputs #:allow-other-keys)
    (let ((sh (assoc-ref inputs "bash")))
      (substitute* "some-file"
       (("\"/bin/sh\"") (string-append "\"" sh "/bin/sh\"")))))

Hope that helps!

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]