Skip to content

Commit a8a4cdc

Browse files
committed
better README
1 parent dad32be commit a8a4cdc

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

README.md

+25
Original file line numberDiff line numberDiff line change
@@ -1 +1,26 @@
11
# stack2cabal
2+
3+
This is a simple tool for using
4+
[`cabal new-build`](http://cabal.readthedocs.io/en/latest/nix-local-build-overview.html)
5+
in Haskell projects that have originally been designed
6+
for use with [`stack`](https://docs.haskellstack.org/en/stable/README/).
7+
8+
The tool does two things:
9+
10+
* `cabal new-build` (at the moment) handles only dependencies that are
11+
either _local_ or _on Hackage_.
12+
In `stack`, on the other hand, it is possible to use
13+
dependencies from GitHub by specifying repository-URL and commit
14+
in the `stack.yaml` file.
15+
The `stack2cabal` tool scans the `stack.yaml` file for such dependencies,
16+
clones the repositories into subfolder `./stack2cabal/`
17+
and checks out the correct commit.
18+
19+
* Using the packages listed in `stack.yaml` and the cloned git repositories,
20+
`stack path --compiler-exe` to determine the correct GHC version
21+
and `stack list-dependencies` to get the correct version of each dependency,
22+
the `stack2cabal` tool creates the `cabal.project` file needed for
23+
`cabal new-build`,
24+
thus making sure that `cabal new-build` will build the same packages as `stack`,
25+
will use the same GHC version as `stack`
26+
and will use the same dependency versions as `stack`.

0 commit comments

Comments
 (0)