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

From: Ludovic Courtès <[email-masked]>
Date: Wed, 14 Dec 2022 11:59:31 +0100

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’.