[Nix-dev] myEnvFun rebuilds gcc

Sergey Mironov ierton at gmail.com
Wed Jan 25 00:06:48 CET 2012


2012/1/25 Lluís Batlle i Rossell <viric at viric.name>:
> On Wed, Jan 25, 2012 at 02:39:35AM +0400, Sergey Mironov wrote:
>> Hm. Yes, overrides looks like a magic. Which list do you mean? I've tried
>>
>>     gogrEnv = pkgs.myEnvFun rec {
>>       name = "gogr";
>>       buildInputs = [
>>         ...
>>         gcc
>>         stdenv
>>         ];
>
> Remove gcc, and keep stdenv. :)
> stdenv has the right propagated build input, for you to have gcc in the path.
>
> At the time you refer to 'gcc' in your overrides, you are not referring to the
> gcc you want.
>
> First applies packageOverrides ('overrider', in applyGlobalOverrides'), and then
> applies the stdenv overrides. So, at the time of packageOverrides, 'gcc' means
> 'gcc built by stdenv'. When the stdenv overrides apply, *later* (note the //
> inside the definition of applyGlobalOverrides), 'gcc' means 'gcc part of
> stdenv'.
>
> Regards,
> Lluís.

Ok, it works at last! Lluís, thank you for your explanations. More or
less I understand now.


More information about the nix-dev mailing list