[Nix-dev] Nix-env error

James Cook james.cook at utoronto.ca
Thu Aug 13 08:07:16 CEST 2015


On 27 July 2015 at 11:53, Colin Putney <colin at wiresong.com> wrote:
>
>
> On Fri, Jul 24, 2015 at 11:16 PM, James Cook <james.cook at utoronto.ca> wrote:
>
>> I can't reproduce this at commit 554cbe9. The only thing that comes to
>> mind is per-user configuration such as ~/.nixpkgs/config.nix, if
>> you're sharing that between your computers. If that's a possibility, I
>> guess you could try creating a new user and see if that user has the
>> same problem. Good luck :-)
>
>
> It turned out to be a mix of old and new versions of nixpkgs:
>
> There was a symlink at ~/.nix-defexpr/channels_root
> It pointed into /nix/var/nix/profiles/per-user/root/channels.
> That, in turn, had a link to
> /nix/store/5n6dd7i1h3anw017paxm27mwaq4aaj8p-nixos-14.12.471.1f09b77/nixos,
> As Luca mentioned, that's an old nixpkgs.
> It would have been fine, but for the fact that
> keybase-node-client/default.nix imports <nixpkgs>,
> Which ends up being the latest nixpkgs, set by my $NIX_PATH.
> So node modules from the latest nixpkgs get built against a nodejs
> derivation from 7 months ago.
> Error
>
> Deleting ~/.nix-defexpr/channels_root solved it for me.
>
> Just as a follow up, is it a bug that nix-env --show-trace -qa didn't show
> the trace?
>
> Thanks for the help,
>
> Colin

Thanks for the diagnosis. At first glance, it seems like a bad idea
for things within nixpkgs to import <nixpkgs> for this reason, but I
don't know the circumstances.

--show-trace not showing a trace sounds like a bug to my relatively
uninformed ear.

James


More information about the nix-dev mailing list