Subject: Re: [bug#54021] [PATCH] Add rhino javascript package

From: Maxime Devos <[email-masked]>
Date: Wed, 16 Feb 2022 19:43:21 +0100

Frank Pursel schreef op wo 16-02-2022 om 18:36 [+0000]:
> I did not understand the bash-minimal comment.  Are you saying that
> (search-input-file inputs "/bin/bash") will not work in the way I
> intended

'bash-minimal' (*) is an implicit native-input of ant-build-system.
When compiling natively, inputs and native-inputs are merged together
into 'inputs'.  As such, bash-minimal (and hence "/bin/bash") is
contained in 'inputs' when compiling natively.  So if you compiled
natively (most likely), then using (search-input-file inputs
"/bin/bash") this succeeds.

However, if cross-compiling with "guix build --target=aarch64-linux-
gnu" or the like (**), then the native-inputs and inputs are kept
separate, so 'inputs' would not contain bash, (search-input-file ...)
would fail by raising a &search-error exception and the build would
therefore fail.

This can be resolved by adding the 'bash-minimal' package to 'inputs'.

(*) Actually a variant of 'bash-minimal' but that does not matter here.
(**) This won't work _yet_ because 'ant-build-system' does not support
cross-compilation yet.

Greetings,
Maxime.