I managed to get GHC to build with the help of user chreekat on #ghc, who pointed out that the issue I was having with building
.hi
files had been
filed by Richard Eisenberg, and a workaround had been written by Ben Gamari. I cherry-picked that workaround, and it fixed the problem! After that, it only took 13 1/2 minutes to build GHC.
I still haven’t gotten it working via nix, but that’s OK - I only needed to get it working one way or the other.