@hackage / stack2cabal

Convert stack projects to cabal.project + cabal.project.freeze

Latest1.0.14

About

Metadata

  • Last updated , by maerwald
  • License GPL-3.0-only
  • Maintained by: Julian Ospald

  • Lottery factor: 0

Links

Installation

Tested Compilers

  1. 8.10.7
  2. 8.8.4

Package Flags

Use the -f option with cabal commands to enable flags

    ghcflags (off by default)

    Generate .ghc.flags files during compilation

Readme

Gitter Haskell CI Docker build Hackage version license

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 pulls Docker stars Docker image size

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-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.