Description
Convert stack projects to cabal.project + cabal.project.freeze.
Description
Convert stack.yaml / package.yaml to cabal.project / cabal.project.freeze/ *.cabal.
README.md
stack2cabal
This is forked of tseenshe/stack2cabal and the current hackage package.
Installation
Clone the repo and build with either cabal or stack or see the release page for binaries.
Docker
docker pull hasufell/stack2cabal:latest
Usage
To convert a stack.yaml to cabal.project simply cd to the project directory and run:
stack2cabal
This will also create a cabal.project.freeze based on the stack resolver.
Also see stack2cabal --help for further options.
Docker
docker run --rm \
-v /etc/passwd:/etc/passwd:ro \
-u `id -u`:`id -g` \
-v `pwd`:`pwd` \
-w `pwd` \
--tmpfs "$HOME/.cache" \
hasufell/stack2cabal:latest
Notes
- Hackage packages that are specified as git repositories in e.g.
extra-depsmight have a different version than the stack resolver. Thereforestack2cabalwill download all repos and ignore their package names when generatingcabal.project.freeze. This can take some time depending on your project. Pass--no-inspect-remotesto skip this.