HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulecabal2nix-2.20.1Haskell2010

Distribution.Nixpkgs.Fetch

  • 6 types
  • 5 values
  • Packagecabal2nix-2.20.1
  • Exports11
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceFetch.hs
datadata Source
#

A source is a location from which we can fetch, such as a HTTP URL, a GIT URL, ....

Constructors

Instances6Eq, Ord, Show, Generic, NFData, Rep
datadata Hash
#
Instances6Eq, Ord, Show, Generic, NFData, Rep
datadata DerivationSource
#

A source for a derivation. It always needs a hash and also has a protocol attached to it (url, git, svn, ...). A DerivationSource also always has it's revision fully resolved (not relative revisions like master, HEAD, etc).

Constructors

Instances6Show, Generic, NFData, Pretty, FromJSON, Rep
datadata DerivKind
#
Instances4Show, Generic, NFData, Rep
datadata FetchSubmodules
#

Whether to fetch submodules (git).

Instances4Show, Generic, NFData, Rep
datadata UnpackArchive
#

Whether to unpack an archive after fetching, before putting it into the nix store.

Instances4Show, Generic, NFData, Rep
valuefetch
  1. :: FetchSubmodules

    whether to fetch submodules when the source is a git repository

  2. -> (String -> MaybeT IO a)

    This function is passed the output path name as an argument. It should return Nothing if the file doesn't match the expected format. This is required, because we cannot always check if a download succeeded otherwise.

  3. -> Source

    The source to fetch from.

  4. -> IO (Maybe (DerivationSource, a))

    The derivation source and the result of the processing function. Returns Nothing if the download failed.

#

Fetch a source, trying any of the various nix-prefetch-* scripts.