cabal.mkDerivation: Use defaultMain if no Setup.{l,}hs exists.

This mirrors the default behaviour of cabal-install for the Simple build type


You could add the ${toFile ...} path to the for loop in line 182 and add the -o Setup -odir $TMPDIR flags to the ghc call in line 183.

Also, it would be nice to have the default Setup.hs file defined in some let expression at the top so that it doesn't clutter the already complex build function any further.