In the latest Cabal docs there’s a new guide, How to deal with package source
code.
- It mentions how much Cabal works with source code behind the scenes.
- It explains how to download a package
.tar.gzarchive from Hackage. - It shows how to take a dependency from a source code repository.
- It picks apart the console logging when Cabal clones a Git repository.
- It diagrams what
source-repositoryandsource-repository-packagepoint to. - It compares and converts a
source-repositoryinto asource-repository-package. - It rates
source-repository-packageas easier to use thangit submodule. - It encourages forking rather than vendoring dependencies in archive or unpacked form.
- It warns that Cabal project files don’t declare dependencies.
- It disambiguates “revision”, “commit” and “tag”.
- It lists what “tag” gets you; when missing, for a branch, and for a commit.
- It links to
cabal sdistfor creating a.tar.gzarchive for publishing.