[Nix-dev] buildInputs vs buildNativeInputs

Shea Levy shea at shealevy.com
Mon Aug 27 13:18:14 CEST 2012


On 08/27/2012 07:12 AM, Mathijs Kwik wrote:
> Hi all,
>
> I understand the difference between buildInputs and buildNativeInputs,
> but I'm not quite sure how to figure out when an input should be
> native.

The question is, when is the machine code provided by the input 
executed? If it's at build time (e.g. you execute 'perl' to run a build 
script), it's a buildNativeInput. If it's at run time (e.g. a linked-to 
library), it's a buildInput. The reason for this is cross-compilation: 
buildNativeInputs are host versions of the package, buildInputs are 
target versions of the package.

Cheers,
Shea


More information about the nix-dev mailing list