[Nix-dev] overriding a package
Bjørn Forsman
bjorn.forsman at gmail.com
Sat Jan 31 19:13:45 CET 2015
On 31 January 2015 at 18:29, Catonano <catonano at gmail.com> wrote:
> 2015-01-31 16:50 GMT+01:00 Bjørn Forsman <bjorn.forsman at gmail.com>:
>>
>> That's weird. I copy/pasted your code into my ~/.nixpkgs/config.nix
>> and it worked just fine.
>
> I removed it and reinstalled it again.
>
> Now the sympthom is different
>
> $ nix-env -i InfTaRacket
> error: selector ‘InfTaRacket’ matches no derivations
>
> $ nix-env -i myRacket
> error: selector ‘myRacket’ matches no derivations
>
> $ nix-env -qa racket
> racket-6.1.1
> racket-6.1.1
>
>
> BUT if I decomment the line
>
> #name = "${pname}-${version}";
>
> then this is the result
>
> $ nix-env -qa racket
> error: undefined variable ‘pname’ at "/home/me/.nixpkgs/config.nix":9:16
To enable attributes to refer to each other, within the same attrset,
you need to put 'rec' in front of the attrset. In other words, instead
of "oldAttrs: {", use "oldAttrs: rec {".
More information about the nix-dev
mailing list