sjakobi
sjakobi

Reputation: 3606

How can I use Stackage's cabal.config files with nix-style cabal?

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

Upvotes: 2

Views: 163

Answers (1)

sjakobi
sjakobi

Reputation: 3606

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.

Upvotes: 2

Related Questions