NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
12.11k stars 1.47k forks source link

Regression: stackoverflow on nix 2.20 and 2.21 when running poetry2nix with a projectDir from a flake input #10496

Open Atry opened 5 months ago

Atry commented 5 months ago

Describe the bug

When running poetry2nix with a projectDir from a flake input, a stack overflow error is raised by nix 2.20 and 2.21, while nix 2.18 and 2.19 would not raise such an error.

Steps To Reproduce

  1. Install Nix 2.20 or later version
  2. Run nix build github:Atry/nix-2.20-crash

Now it failed to build with the following error message

[0.0 MiB DL] copying '/nix/store/0fvd8z4l32snmj9jmr3zky1aadmia0wr-source' to the storeerror: stack overflow (possible infinite recursion)

Expected behavior

Don't stack overflow

nix-env --version output

nix-env (Nix) 2.21.0

Additional context

Priorities

Add :+1: to issues you find important.

Atry commented 5 months ago

Workaround: using pkgs.fetchFromGitHub instead of flake inputs. See https://github.com/Atry/nix-2.20-crash/compare/main...good

Atry commented 5 months ago

Maybe related to https://github.com/NixOS/nix/issues/9672

Atry commented 5 months ago

Maybe related to https://github.com/NixOS/nix/issues/10115 ?

edolstra commented 1 month ago

Maybe related to https://github.com/NixOS/nix/issues/9672

Yeah, looks like it. This should be fixed by #10505.