Open rihardsk opened 2 years ago
I got something similar with babel
My error is:
error: infinite recursion encountered
at /nix/store/pxf5kjsydf0rrb4kkmn5g92xjqx51kzy-nixpkgs/pkgs/top-level/python-aliases.nix:41:11:
40| asyncio-nats-client = nats-py; # added 2022-02-08
41| Babel = babel; # added 2022-05-06
| ^
42| bitcoin-price-api = throw "bitcoin-price-api has been removed, it was using setuptools 2to3 translation feautre, which has been removed in setuptools 58"; # added 2022-02-15
(use '--show-trace' to show detailed location information)
I guess mach-nix isn't case-sensitive here?
@gador I'm seeing that issue too, and while the error does look the same, I think the cause might be different.
I think the root of the problem you and I are seeing is that python-aliases.nix
in the official nixpkgs
added the alias from Babel
to babel
(it is case sensitive). However, in the generated overrides that mach-nix creates during build, it does;
"babel" = override python-super."Babel" ( ... )
which means that Babel
refers to babel
which refers to Babel
💥😭.
I'm no expert when it comes to nix though, and mach-nix is super clever, but pretty complicated so I could definitely be wrong. If someone who knows better can confirm, then I'll create a different issue for the problem @gador and me are seeing. (My full trace output is in this gist)
(@gador I did poke around trying to work around the problem but didn't have much luck. That being said, if you are able to pin to a version of nixpkgs before 2022-05-06 you can probably avoid the issue if that helps. Unfortunately for me I need to be on a newer nixpkgs for other reasons 😔 )
I happened to come across this again today. Setting this for the overridesPre
;
overridesPre = [
(self: super: {
_babel = super.babel;
})
];
and overridesPost
to include;
overridesPost = [
(self: super: {
babel = self._babel;
Babel = self._babel;
})
];
``
helped as a workaround
Worth pointing out this bug can also look more like this;
nix build
warning: Git tree '/home/asymmetric/code/foo/bar' is dirty
error: infinite recursion encountered
at /nix/store/8gwzhqn67qm8r5biakx2hxsqiy3jfqmz-source/lib/attrsets.nix:312:41:
311| */
312| nameValuePair = name: value: { inherit name value; };
| ^
313|
(use '--show-trace' to show detailed location information)
from https://github.com/nix-community/poetry2nix/issues/750 (thanks lelit for linking to that issue!)
Here's a part of the trace from
nix-build
:Encountered when building this thing
Started happening after I switched from
mach-nix
3.4.0 to 3.5.0 and updated the source I was building.