stack-1.9.3: The Haskell Tool Stack

Safe HaskellNone
LanguageHaskell2010

Stack.Fetch

Description

Functionality for downloading packages securely for cabal's usage.

Synopsis

Documentation

unpackPackages Source #

Arguments

:: HasCabalLoader env 
=> Maybe SnapshotDef

when looking up by name, take from this build plan

-> FilePath

destination

-> [String]

names or identifiers

-> RIO env () 

Intended to work for the command line command.

unpackPackageIdent Source #

Arguments

:: HasCabalLoader env 
=> Path Abs Dir

unpack directory

-> Path Rel Dir

the dist rename directory, see: https://github.com/fpco/stack/issues/157

-> PackageIdentifierRevision 
-> RIO env (Path Abs Dir) 

Same as unpackPackageIdents, but for a single package.

unpackPackageIdents Source #

Ensure that all of the given package idents are unpacked into the build unpack directory, and return the paths to all of the subdirectories.

fetchPackages :: HasCabalLoader env => Set PackageIdentifier -> RIO env () Source #

Fetch packages into the cache without unpacking

untar :: forall b1 b2. Path b1 File -> Path Rel Dir -> Path b2 Dir -> IO [(FilePath, Text)] Source #

Internal function used to unpack tarball.

Takes a path to a .tar.gz file, the name of the directory it should contain, and a destination folder to extract the tarball into. Returns unexpected entries, as pairs of paths and descriptions.

resolvePackages Source #

Arguments

:: HasCabalLoader env 
=> Maybe SnapshotDef

when looking up by name, take from this build plan

-> [PackageIdentifierRevision] 
-> Set PackageName 
-> RIO env [ResolvedPackage] 

Resolve a set of package names and identifiers into FetchPackage values.

resolvePackagesAllowMissing Source #

Arguments

:: HasCabalLoader env 
=> Maybe SnapshotDef

when looking up by name, take from this build plan

-> [PackageIdentifierRevision] 
-> Set PackageName 
-> RIO env (Set PackageName, HashSet PackageIdentifierRevision, [ResolvedPackage]) 

Turn package identifiers and package names into a list of ResolvedPackages. Returns any unresolved names and identifier. These are considered unresolved even if the only mismatch is in the cabal file info (MSS 2017-07-17: old versions of this code had special handling to treat missing cabal file info as a warning, that's no longer necessary or desirable since all info should be present and checked).

withCabalFiles :: HasCabalLoader env => IndexName -> [(ResolvedPackage, a)] -> (PackageIdentifier -> a -> ByteString -> IO b) -> RIO env [b] Source #

Add the cabal files to a list of idents with their caches.