Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Source = Source {}
- data Hash
- data DerivationSource = DerivationSource {}
- fromDerivationSource :: DerivationSource -> Source
- urlDerivationSource :: String -> String -> DerivationSource
- data DerivKind
- derivKindFunction :: DerivKind -> String
- data FetchSubmodules
- data UnpackArchive
- fetch :: forall a. FetchSubmodules -> (String -> MaybeT IO a) -> Source -> IO (Maybe (DerivationSource, a))
- fetchWith :: (Bool, DerivKind) -> 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 | |
|
Instances
Generic Source Source # | |
Show Source Source # | |
NFData Source Source # | |
Defined in Distribution.Nixpkgs.Fetch | |
Eq Source Source # | |
Ord Source Source # | |
type Rep Source Source # | |
Defined in Distribution.Nixpkgs.Fetch type Rep Source = D1 ('MetaData "Source" "Distribution.Nixpkgs.Fetch" "cabal2nix-2.19.1-FkzaVOTKSuiIS3IHqjy34R" '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)))) |
Instances
Generic Hash Source # | |
Show Hash Source # | |
NFData Hash Source # | |
Defined in Distribution.Nixpkgs.Fetch | |
Eq Hash Source # | |
Ord Hash Source # | |
type Rep Hash Source # | |
Defined in Distribution.Nixpkgs.Fetch type Rep Hash = D1 ('MetaData "Hash" "Distribution.Nixpkgs.Fetch" "cabal2nix-2.19.1-FkzaVOTKSuiIS3IHqjy34R" '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).
DerivationSource | |
|
Instances
urlDerivationSource :: String -> String -> DerivationSource Source #
Instances
Generic DerivKind Source # | |
Show DerivKind Source # | |
NFData DerivKind Source # | |
Defined in Distribution.Nixpkgs.Fetch | |
type Rep DerivKind Source # | |
Defined in Distribution.Nixpkgs.Fetch type Rep DerivKind = D1 ('MetaData "DerivKind" "Distribution.Nixpkgs.Fetch" "cabal2nix-2.19.1-FkzaVOTKSuiIS3IHqjy34R" 'False) ((C1 ('MetaCons "DerivKindUrl" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnpackArchive)) :+: C1 ('MetaCons "DerivKindGit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FetchSubmodules))) :+: (C1 ('MetaCons "DerivKindHg" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DerivKindSvn" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DerivKindBzr" 'PrefixI 'False) (U1 :: Type -> Type)))) |
derivKindFunction :: DerivKind -> String Source #
The nixpkgs function to use for fetching this kind of derivation
data FetchSubmodules Source #
Whether to fetch submodules (git).
Instances
Generic FetchSubmodules Source # | |
Defined in Distribution.Nixpkgs.Fetch type Rep FetchSubmodules :: Type -> Type # from :: FetchSubmodules -> Rep FetchSubmodules x # to :: Rep FetchSubmodules x -> FetchSubmodules # | |
Show FetchSubmodules Source # | |
Defined in Distribution.Nixpkgs.Fetch showsPrec :: Int -> FetchSubmodules -> ShowS # show :: FetchSubmodules -> String # showList :: [FetchSubmodules] -> ShowS # | |
NFData FetchSubmodules Source # | |
Defined in Distribution.Nixpkgs.Fetch rnf :: FetchSubmodules -> () # | |
type Rep FetchSubmodules Source # | |
Defined in Distribution.Nixpkgs.Fetch |
data UnpackArchive Source #
Whether to unpack an archive after fetching, before putting it into the nix store.
Instances
Generic UnpackArchive Source # | |
Defined in Distribution.Nixpkgs.Fetch type Rep UnpackArchive :: Type -> Type # from :: UnpackArchive -> Rep UnpackArchive x # to :: Rep UnpackArchive x -> UnpackArchive # | |
Show UnpackArchive Source # | |
Defined in Distribution.Nixpkgs.Fetch showsPrec :: Int -> UnpackArchive -> ShowS # show :: UnpackArchive -> String # showList :: [UnpackArchive] -> ShowS # | |
NFData UnpackArchive Source # | |
Defined in Distribution.Nixpkgs.Fetch rnf :: UnpackArchive -> () # | |
type Rep UnpackArchive Source # | |
Defined in Distribution.Nixpkgs.Fetch |
:: forall a. FetchSubmodules | whether to 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.