Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Source = Source {}
- data Hash
- data DerivationSource = DerivationSource {}
- fromDerivationSource :: DerivationSource -> Source
- fetch :: forall a. (String -> MaybeT IO a) -> Source -> IO (Maybe (DerivationSource, a))
- fetchWith :: (Bool, String, [String]) -> Source -> MaybeT IO (DerivationSource, FilePath)
Documentation
A source is a location from which we can fetch, such as a HTTP URL, a GIT URL, ....
Source | |
|
data DerivationSource Source #
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).
:: (String -> MaybeT IO a) | This function is passed the output path name as an argument.
It should return |
-> Source | The source to fetch from. |
-> 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.