Nix triggering GHC bug

Can somebody chime in to help solve or debug this? The way Nix (or haskell.nix) uses GHC seems to be triggering a GHC bug.

didn’t you say

rm -R ~/.cabal sorted it for me.

so if thats the case, there must be some cabal state causing this problem.

This issue only happens under Nix. I’m not saying it’s a Nix bug, but it would be helpful if someone with understanding of the Nix side could lend some insight into what might be happening.

ah, i understand, do you have a test case, or small example in a repo where the bug can be reproduced.