unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* /bin/sh in package definitions
@ 2023-01-13 23:40 Andy Tai
  2023-01-15  7:41 ` Liliana Marie Prikler
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Tai @ 2023-01-13 23:40 UTC (permalink / raw)
  To: guix-devel

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)

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?


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: /bin/sh in package definitions
  2023-01-13 23:40 /bin/sh in package definitions Andy Tai
@ 2023-01-15  7:41 ` Liliana Marie Prikler
  0 siblings, 0 replies; 2+ messages in thread
From: Liliana Marie Prikler @ 2023-01-15  7:41 UTC (permalink / raw)
  To: Andy Tai, guix-devel

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-15  7:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-13 23:40 /bin/sh in package definitions Andy Tai
2023-01-15  7:41 ` Liliana Marie Prikler

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).