Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hasufell/stack2cabal
Convert stack projects to cabal.project + cabal.project.freeze
https://github.com/hasufell/stack2cabal
cabal haskell stack
Last synced: 23 days 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 (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-03-18T01:55:14.000Z (8 months ago)
- Last Synced: 2024-05-01T20:47:58.313Z (6 months ago)
- Topics: cabal, haskell, stack
- Language: Haskell
- Homepage:
- Size: 419 KB
- Stars: 22
- Watchers: 2
- Forks: 10
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[![Gitter](https://badges.gitter.im/hasufell/stack2cabal.svg)](https://gitter.im/hasufell/stack2cabal?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Haskell CI](https://github.com/hasufell/stack2cabal/workflows/Haskell%20CI/badge.svg)](https://github.com/hasufell/stack2cabal/actions)
[![Docker build](https://github.com/hasufell/stack2cabal/workflows/Docker%20build/badge.svg)](https://github.com/hasufell/stack2cabal/actions)
[![Hackage version](https://img.shields.io/hackage/v/stack2cabal.svg?label=Hackage)](https://hackage.haskell.org/package/stack2cabal)
[![license](https://img.shields.io/github/license/hasufell/stack2cabal.svg)](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
[![Docker pulls](https://img.shields.io/docker/pulls/hasufell/stack2cabal.svg)](https://hub.docker.com/repository/docker/hasufell/stack2cabal)
[![Docker stars](https://img.shields.io/docker/stars/hasufell/stack2cabal.svg)](https://hub.docker.com/repository/docker/hasufell/stack2cabal)
[![Docker image size](https://img.shields.io/docker/image-size/hasufell/stack2cabal/latest.svg)](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.