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

[ building, gpl, library, program ] [ Propose Tags ] [ Report a vulnerability ]

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


[Skip to Readme]

Modules

[Last Documentation]

  • StackageToHackage
    • StackageToHackage.Hackage
      • StackageToHackage.Hackage.Types
    • StackageToHackage.Hpack
    • StackageToHackage.Prelude
    • StackageToHackage.Stackage
      • StackageToHackage.Stackage.Types
      • StackageToHackage.Stackage.YAML

Flags

Manual Flags

NameDescriptionDefault
ghcflags

Generate .ghc.flags files during compilation

Disabled

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

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 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, 1.0.13, 1.0.14
Change log CHANGELOG.md
Dependencies base (>=4.13 && <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.1.1.2 && <0.2), hourglass (>=0.2.12 && <0.3), hpack (==0.34.5), HsYAML (>=0.2 && <0.3), http-client (>=0.6.4.1 && <0.7), http-client-tls (>=0.3.5.3 && <0.4), optparse-applicative (>=0.15.1.0 && <0.17), process (>=1.6.9.0), safe (>=0.3.19 && <0.4), stack2cabal, temporary (>=1.3 && <1.4), text (>=1.2.3.1) [details]
Tested with ghc ^>=8.8.4 || ^>=8.10.7
License GPL-3.0-only
Copyright 2018 Tseen She, 2020 Julian Ospald
Author Tseen She
Maintainer Julian Ospald
Category Building
Bug tracker https://github.com/hasufell/stack2cabal/issues
Source repo head: git clone https://github.com/hasufell/stack2cabal.git
Uploaded by maerwald at 2022-09-13T14:41:01Z
Distributions
Executables stack2cabal
Downloads 4341 total (16 in the last 30 days)
Rating 1.75 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2022-09-13 [all 2 reports]

Readme for stack2cabal-1.0.14

[back to package description]

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.