Stackage provides a cabal.config file with each snapshot, e.g. this one. How can I make cabal new-configure a project with the package versions from that file?
(Alternatively: Is there another way to configure a nix-style cabal project with dependency versions from a specific Stackage snapshot?)
The
cabal.configfiles from Stackage only contain a single hugeconstraintssection with the same syntax that thecabal.projectfiles use.So you can simply copy these constraints into your
cabal.project.localfile, delete any constraints for packages in your local project andnew-build.