Does https://docs.haskellstack.org/en/stable/yaml_configuration/#setup-info really work? See https://github.com/commercialhaskell/stack/issues/2983.