[](https://gitter.im/hasufell/stack2cabal?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[](https://github.com/hasufell/stack2cabal/actions)
[](https://github.com/hasufell/stack2cabal/actions)
[](https://hackage.haskell.org/package/stack2cabal)
[](LICENSE)
# stack2cabal
This is forked of [tseenshe/stack2cabal](https://gitlab.com/tseenshe/stack2cabal) and
the current [hackage package](https://hackage.haskell.org/package/stack2cabal).
## Installation
Clone the repo and build with either cabal or stack or see the [release page](https://github.com/hasufell/stack2cabal/releases)
for binaries.
### Docker
[](https://hub.docker.com/repository/docker/hasufell/stack2cabal)
[](https://hub.docker.com/repository/docker/hasufell/stack2cabal)
[](https://hub.docker.com/repository/docker/hasufell/stack2cabal)
```sh
docker pull hasufell/stack2cabal:latest
```
## Usage
To convert a `stack.yaml` to `cabal.project` simply cd to the project directory and run:
```sh
stack2cabal
```
This will also create a `cabal.project.freeze` based on the stack resolver.
Also see `stack2cabal --help` for further options.
### Docker
```sh
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-deps` might
have a different version than the stack resolver. Therefore `stack2cabal` will download
all repos and ignore their package names when generating `cabal.project.freeze`.
This can take some time depending on your project. Pass `--no-inspect-remotes` to skip this.