Good evening Felix,
Felix Lechner via "Development of GNU Guix and the GNU System
distribution." <[email protected]> writes:
> Hi,
>
> I'd like to tell regular inputs from "native" inputs in my own build
> system, but the procedure called by bag->derivation receives merely a
> consolidated variable called "inputs". [1] How may I tell the inputs
> apart, please?
>
> My build system automatically wraps executables with variables like
> LD_LIBRARY_PATH from the inputs. It is wrong to include native inputs
> in LD_LIBRARY_PATH.
>
> The cross-building procedure called by the nearby bag->cross-derivation,
> on the other hand, receives separate variables for "build-inputs" and
> "host-inputs" [2] but it rebuilds more packages than I expected when I
> used it for the current system architecture. Do cross-builds targeting
> an architecture satisfy the prerequisites for native builds on that
> architecture? Thanks for looking!
You can do something like this (inside a GEXP) to get all inputs that
are *not native* (you can use `filter` if you want to get the native
ones):
```
#$(pk 'native-inputs
(remove
(match-lambda
((label (? gexp-input? input))
(gexp-input-native? input)))
inputs))
```
Let me know if something is unclear.
Best regards,
Sergio