| License | BSD3 |
|---|---|
| Maintainer | simons@cryp.to |
| Stability | provisional |
| Portability | portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Distribution.Hackage.DB.Path
Description
Find the location of the local Hackage database that is maintained by running
cabal update.
Synopsis
Documentation
cabalStateDir :: IO FilePath Source #
Determines the state directory (which e.g. holds the hackage tarball) cabal-install uses via the following logic:
- If the
CABAL_DIRenvironment variable is set, its content is used as the cabal state directory - If
~/.cabal(seegetAppUserDataDirectory) exists, use that. - Otherwise, use
${XDG_CACHE_HOME}/cabal(see) which is the new directory cabal-install can use starting with versiongetXdgDirectoryXdgCache3.10.*.
This logic is mostly equivalent to what upstream cabal-install is doing with the following exception: The state directory can freely be configured to use a different location in the cabal-install configuration file. hackage-db doesn't parse this configuration file, so differing state directories are ignored.
hackageTarball :: IO FilePath Source #
Determine the default path of the Hackage database, which typically
resides in $HOME/.cabal/packages/hackage.haskell.org/.
Running the command cabal update or cabal v2-update will keep the index
up-to-date.
See cabalStateDir on how hackage-db searches for the cabal state directory.