https://github.com/hasufell/stack2cabal
Convert stack projects to cabal.project + cabal.project.freeze
https://github.com/hasufell/stack2cabal
cabal haskell stack
Last synced: about 1 month ago
JSON representation
Convert stack projects to cabal.project + cabal.project.freeze
- Host: GitHub
- URL: https://github.com/hasufell/stack2cabal
- Owner: hasufell
- License: gpl-3.0
- Created: 2020-09-25T13:04:17.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-03-18T01:55:14.000Z (about 1 year ago)
- Last Synced: 2025-03-26T15:21:12.470Z (about 2 months ago)
- Topics: cabal, haskell, stack
- Language: Haskell
- Homepage:
- Size: 419 KB
- Stars: 25
- Watchers: 2
- Forks: 12
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](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.