[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: /bin/sh in package definitions
From: |
Liliana Marie Prikler |
Subject: |
Re: /bin/sh in package definitions |
Date: |
Sun, 15 Jan 2023 08:41:38 +0100 |
User-agent: |
Evolution 3.46.0 |
Am Freitag, dem 13.01.2023 um 15:40 -0800 schrieb Andy Tai:
> Hi, currently package definitions often need to patch references to
> /bin/sh as common in package sources or makefiles to make it refer to
> the actual bash shell used in Guix in /gnu/store/... somewhere.
>
> question 1: is there a way, to simulate /bin/sh using container or
> some such set up so the actual shell used by Guix can appear as
> /bin/sh in the package build process? (sorry if this is a wild
> question)
Yes, you can use /bin/sh in a container, but we deliberately set it up
so that it's not that inside a build container.
> question 2: (if question 1 is not possible) in guile, how to replace
> only occurrences of /bin/sh, not substring "/bin/sh" in some strings
> like /usr/bin/shsomethingsomethng, in the "patch" stage of package
> building?
Depends on your particular use case, but often, you could match e.g.
"/bin/sh" (including the quotes), or alternatively ^/bin/sh(.), where
depending on the thing matched via dot you either replace the
expression or leave it as-is.
Cheers