As suggested by @sclv on reddit. See https://github.com/haskell/cabal/issues/648#issuecomment-96895441