Subject: [bug#59843] [PATCH] shell: Enable --target for guix shell (--development)

From: "yarl baudig" <[email-masked]>
Date: Wed, 14 Dec 2022 21:57:37 +0100 (CET)

I responded too fast. You are right, something is wrong. Not every path is accessible. I will try to understand when I'll have some time.

---- Message d'origine ----
> De : Ludovic Courtès <[email-masked]>
> À : Yarl Baudig <[email-masked]>
> Sujet : Re: bug#59843: [PATCH] shell: Enable --target for guix shell (--development)
> Date : 14/12/2022 11:59:31 Europe/Paris
> Copie à : [email-masked]
> 
> Hi,
> 
> Yarl Baudig <[email-masked]> skribis:
> 
> > This enable the use of --target for development inputs, that is:
> > with `guix shell`, includes the dependencies for cross-building packages
> > given with --development
> >
> > * guix/scripts/environment.scm: Enable --target.
> > * guix/scripts/shell.scm: Enable --target.
> > * doc/guix.texi: Document it.
> 
> This change won’t give something useful per se, because the environment
> will contain a mixture of “host” and “build” inputs.
> 
> To make it work, we need two profiles: one for “build” inputs, and one
> for “host/target” inputs.  Search path environment variables must be
> evaluated in a way that accounts for these two profiles.  For example,
> target libraries will appear on CROSS_C_INCLUDE_PATH but not on
> C_INCLUDE_PATH.
> 
> Does that make sense?
> 
> IOW, it’s a trickier endeavor that one could hope for.  :-)
> 
> Thanks,
> Ludo’.
>