| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Distribution.Nixpkgs.Fetch
Synopsis
- data Source = Source {}
- data Hash
- data DerivationSource = DerivationSource {}
- fromDerivationSource :: DerivationSource -> Source
- urlDerivationSource :: String -> String -> DerivationSource
- fetch :: forall a. Bool -> (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, ....
Constructors
| Source | |
Fields
| |
Instances
| Eq Source Source # | |
| Ord Source Source # | |
| Show Source Source # | |
| Generic Source Source # | |
| NFData Source Source # | |
Defined in Distribution.Nixpkgs.Fetch | |
| type Rep Source Source # | |
Defined in Distribution.Nixpkgs.Fetch type Rep Source = D1 (MetaData "Source" "Distribution.Nixpkgs.Fetch" "cabal2nix-2.14.3-Kr1oLuEpenVzlKtMSSPI6" False) (C1 (MetaCons "Source" PrefixI True) ((S1 (MetaSel (Just "sourceUrl") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Just "sourceRevision") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :*: (S1 (MetaSel (Just "sourceHash") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Hash) :*: S1 (MetaSel (Just "sourceCabalDir") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)))) | |
Constructors
| Certain String | |
| Guess String | |
| UnknownHash |
Instances
| Eq Hash Source # | |
| Ord Hash Source # | |
| Show Hash Source # | |
| Generic Hash Source # | |
| NFData Hash Source # | |
Defined in Distribution.Nixpkgs.Fetch | |
| type Rep Hash Source # | |
Defined in Distribution.Nixpkgs.Fetch type Rep Hash = D1 (MetaData "Hash" "Distribution.Nixpkgs.Fetch" "cabal2nix-2.14.3-Kr1oLuEpenVzlKtMSSPI6" False) (C1 (MetaCons "Certain" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: (C1 (MetaCons "Guess" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: C1 (MetaCons "UnknownHash" PrefixI False) (U1 :: Type -> Type))) | |
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).
Constructors
| DerivationSource | |
Fields
| |
Instances
urlDerivationSource :: String -> String -> DerivationSource Source #
Arguments
| :: Bool | If True, fetch submodules when the source is a git repository |
| -> (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.