# How to deal with package source code

**URL:** <https://discourse.haskell.org/t/how-to-deal-with-package-source-code/9553>\
**Category:** Links\
**Created:** [May 14, 2024, 10:47am UTC](https://discourse.haskell.org/t/how-to-deal-with-package-source-code/9553 "2024-05-14T10:47:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![philderbeast](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/philderbeast/32/2489_2.png) [@philderbeast](https://discourse.haskell.org/u/philderbeast)\
**Post date:** [May 14, 2024, 10:47am UTC](https://discourse.haskell.org/t/how-to-deal-with-package-source-code/9553/1 "2024-05-14T10:47:56Z")

</div>

In the latest Cabal docs there’s a new guide, [How to deal with package source  
code](https://cabal.readthedocs.io/en/latest/how-to-source-packages.html).

- It mentions how much Cabal works with source code behind the scenes.
- It explains how to download a package `.tar.gz` archive 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-repository` and `source-repository-package` point to.
- It compares and converts a `source-repository` into a `source-repository-package`.
- It rates `source-repository-package` as easier to use than `git 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 sdist` for creating a `.tar.gz` archive for publishing.
