Nix has a debugger now. You can drop into the frames that are causing problems and inspect the state. Miles easier than looking at the trace manually.
Fix the fucking “—show-trace” thing folks. Seriously.
IIRC debugger comes with nix 2.9 and nixpkgs for 22.05 still has 2.8.x.
Of course running with the debugger flag resulted in an unintelligible error message and no debugger.