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

[ building, gpl, library, program ] [ Propose Tags ]

Convert stack.yaml / package.yaml to cabal.project / cabal.project.freeze/ *.cabal.

[Skip to Readme]
Versions [faq] 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.11, 1.0.12
Change log
Dependencies base (>=4.10 && <5.0), bytestring, Cabal (>=3.0 && <3.4), containers, directory, exceptions (>=0.10.4 && <0.11), extra (>=1.7.8 && <1.8), filepath, filepattern (>=0.1.2 && <0.2), fuzzy-dates (>= && <0.2), hourglass (>=0.2.12 && <0.3), hpack (==0.34.2), HsYAML (==0.2.*), http-client (>= && <0.7), http-client-tls (>= && <0.4), optparse-applicative (>= && <0.16), process (>=, safe (>=0.3.19 && <0.4), stack2cabal, temporary (==1.3.*), text (>= [details]
License GPL-3.0-only
Copyright 2018 Tseen She, 2020 Julian Ospald
Author Tseen She
Maintainer Julian Ospald
Category Building
Bug tracker
Source repo head: git clone
Uploaded by maerwald at 2020-10-23T20:37:57Z
Distributions NixOS:1.0.12
Executables stack2cabal
Downloads 2515 total (26 in the last 30 days)
Rating 1.75 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2020-10-23 [all 1 reports]


[Index] [Quick Jump]



Generate .ghc.flags files during compilation


Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainer's Corner

For package maintainers and hackage trustees

Readme for stack2cabal-1.0.12

[back to package description]

Gitter Haskell CI Docker build Hackage version license


This is forked of tseenshe/stack2cabal and the current hackage package.


Clone the repo and build with either cabal or stack or see the release page for binaries.


Docker pulls Docker stars Docker image size

docker pull hasufell/stack2cabal:latest


To convert a stack.yaml to cabal.project simply cd to the project directory and run:


This will also create a cabal.project.freeze based on the stack resolver.

Also see stack2cabal --help for further options.


docker run --rm \
  -v /etc/passwd:/etc/passwd:ro \
  -u `id -u`:`id -g` \
  -v `pwd`:`pwd` \
  -w `pwd` \
  --tmpfs "$HOME/.cache" \


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