See https://github.com/haskell/cabal/commit/978c083abdb72d5760ab271c5079df66dbdc7647#commitcomment-17241967.