Skip to content

creating a cabal new-build configuration from a stack configuration

License

Notifications You must be signed in to change notification settings

brunjlar/stack2cabal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stack2cabal

This is a simple tool for using cabal new-build in Haskell projects that have originally been designed for use with stack.

The tool does two things:

  • cabal new-build (at the moment) handles only dependencies that are either local or on Hackage. In stack, on the other hand, it is possible to use dependencies from GitHub by specifying repository-URL and commit in the stack.yaml file. The stack2cabal tool scans the stack.yaml file for such dependencies, clones the repositories into subfolder ./stack2cabal/ and checks out the correct commit.

  • Using the packages listed in stack.yaml and the cloned git repositories, stack path --compiler-exe to determine the correct GHC version and stack list-dependencies to get the correct version of each dependency, the stack2cabal tool creates the cabal.project file needed for cabal new-build, thus making sure that cabal new-build will build the same packages as stack, will use the same GHC version as stack and will use the same dependency versions as stack.

About

creating a cabal new-build configuration from a stack configuration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published