stack-1.3.0: The Haskell Tool Stack

Safe HaskellNone



Functionality for downloading packages securely for cabal's usage.



unpackPackages Source


:: (StackMiniM env m, HasConfig env) 
=> EnvOverride 
-> FilePath


-> [String]

names or identifiers

-> m () 

Intended to work for the command line command.

unpackPackageIdents Source


:: (StackMiniM env m, HasConfig env) 
=> EnvOverride 
-> Path Abs Dir

unpack directory

-> Maybe (Path Rel Dir)

the dist rename directory, see:

-> Map PackageIdentifier (Maybe GitSHA1) 
-> m (Map PackageIdentifier (Path Abs Dir)) 

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 :: (StackMiniM env m, HasConfig env) => EnvOverride -> Set PackageIdentifier -> m () 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 :: (StackMiniM env m, HasConfig env) => EnvOverride -> Map PackageIdentifier (Maybe GitSHA1) -> Set PackageName -> m (Map PackageIdentifier ResolvedPackage) Source

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

withCabalFiles :: (StackMiniM env m, HasConfig env) => IndexName -> [(PackageIdentifier, PackageCache, Maybe GitSHA1, a)] -> (PackageIdentifier -> a -> ByteString -> IO b) -> m [b] Source

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

withCabalLoader :: (StackMiniM env m, HasConfig env, MonadBaseUnlift IO m) => EnvOverride -> ((PackageIdentifier -> IO ByteString) -> m a) -> m a Source

Provide a function which will load up a cabal ByteString from the package indices.