2

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?)

sjakobi
  • 3,546
  • 1
  • 25
  • 43

1 Answers1

2

The cabal.config files from Stackage only contain a single huge constraints section with the same syntax that the cabal.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 and new-build.

sjakobi
  • 3,546
  • 1
  • 25
  • 43