[Nix-dev] myEnvFun rebuilds gcc

Lluís Batlle i Rossell viric at viric.name
Tue Jan 24 23:48:21 CET 2012


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.


More information about the nix-dev mailing list