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.config
files from Stackage only contain a single hugeconstraints
section with the same syntax that thecabal.project
files use.So you can simply copy these constraints into your
cabal.project.local
file, delete any constraints for packages in your local project andnew-build
.