Error: infinite recursion encountered, at undefined position

I ran into my first infinite recursion error when attempting to open shell.nix, and --show-trace points to line 1, column 13:
https://gist.github.com/heath/40b04df97f7badc798a208c2a30b8cd3

There are no other nix files in the project.

Any pro tips on addressing this issue? :slightly_smiling_face:

What do you mean by open? The file looks completely fine to me and running nix-shell in directory with shell.nix seems to work as well.

Thanks for mentioning that it works on your machine. The error is surprising since it has been working fine on a Macbook Pro 2018 (macOS Catalina 10.15). The infinite recursion error occurs when I try running it on a different Macbook Pro (2020) with macOS Catalina 10.15.7.

By open I mean running nix-shell.

I’ll chalk it up to work laptop configurations out of my control and move on.

Do you have a ~/.config/nixpkgs/overlay{.nix,/default.nix}? Or perhaps an overlay on the system level?

Overlays are exactly that kind of impurities that might cause such irreproducible errors.