Safe Haskell | None |
---|---|
Language | Haskell2010 |
Functionality for downloading packages securely for cabal's usage.
- unpackPackages :: (StackMiniM env m, HasConfig env) => EnvOverride -> FilePath -> [String] -> m ()
- unpackPackageIdents :: (StackMiniM env m, HasConfig env) => EnvOverride -> Path Abs Dir -> Maybe (Path Rel Dir) -> Map PackageIdentifier (Maybe GitSHA1) -> m (Map PackageIdentifier (Path Abs Dir))
- fetchPackages :: (StackMiniM env m, HasConfig env) => EnvOverride -> Set PackageIdentifier -> m ()
- untar :: forall b1 b2. Path b1 File -> Path Rel Dir -> Path b2 Dir -> IO [(FilePath, Text)]
- resolvePackages :: (StackMiniM env m, HasConfig env) => EnvOverride -> Map PackageIdentifier (Maybe GitSHA1) -> Set PackageName -> m (Map PackageIdentifier ResolvedPackage)
- resolvePackagesAllowMissing :: (StackMiniM env m, HasConfig env) => Map PackageIdentifier (Maybe GitSHA1) -> Set PackageName -> m (Set PackageName, Set PackageIdentifier, Map PackageIdentifier ResolvedPackage)
- data ResolvedPackage = ResolvedPackage {
- rpCache :: !PackageCache
- rpIndex :: !PackageIndex
- rpGitSHA1 :: !(Maybe GitSHA1)
- withCabalFiles :: (StackMiniM env m, HasConfig env) => IndexName -> [(PackageIdentifier, PackageCache, Maybe GitSHA1, a)] -> (PackageIdentifier -> a -> ByteString -> IO b) -> m [b]
- withCabalLoader :: (StackMiniM env m, HasConfig env, MonadBaseUnlift IO m) => EnvOverride -> ((PackageIdentifier -> IO ByteString) -> m a) -> m a
Documentation
:: (StackMiniM env m, HasConfig env) | |
=> EnvOverride | |
-> FilePath | destination |
-> [String] | names or identifiers |
-> m () |
Intended to work for the command line command.
:: (StackMiniM env m, HasConfig env) | |
=> EnvOverride | |
-> Path Abs Dir | unpack directory |
-> Maybe (Path Rel Dir) | the dist rename directory, see: https://github.com/fpco/stack/issues/157 |
-> 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.
resolvePackagesAllowMissing :: (StackMiniM env m, HasConfig env) => Map PackageIdentifier (Maybe GitSHA1) -> Set PackageName -> m (Set PackageName, Set PackageIdentifier, Map PackageIdentifier ResolvedPackage) Source
data ResolvedPackage Source
ResolvedPackage | |
|
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.