Safe Haskell | None |
---|---|
Language | Haskell2010 |
Functionality for downloading packages securely for cabal's usage.
- unpackPackages :: (StackMiniM env m, HasConfig env) => Maybe MiniBuildPlan -> FilePath -> [String] -> m ()
- unpackPackageIdents :: (StackMiniM env m, HasConfig env) => Path Abs Dir -> Maybe (Path Rel Dir) -> Map PackageIdentifier (Maybe GitSHA1) -> m (Map PackageIdentifier (Path Abs Dir))
- fetchPackages :: (StackMiniM env m, HasConfig env) => 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) => Maybe MiniBuildPlan -> Map PackageIdentifier (Maybe GitSHA1) -> Set PackageName -> m [ResolvedPackage]
- resolvePackagesAllowMissing :: (StackMiniM env m, HasConfig env) => Maybe MiniBuildPlan -> Map PackageIdentifier (Maybe GitSHA1) -> Set PackageName -> m (Set PackageName, Set PackageIdentifier, [ResolvedPackage])
- data ResolvedPackage = ResolvedPackage {}
- withCabalFiles :: (StackMiniM env m, HasConfig env) => IndexName -> [(ResolvedPackage, a)] -> (PackageIdentifier -> a -> ByteString -> IO b) -> m [b]
- withCabalLoader :: (StackMiniM env m, HasConfig env, MonadBaseUnlift IO m) => ((PackageIdentifier -> IO ByteString) -> m a) -> m a
Documentation
:: (StackMiniM env m, HasConfig env) | |
=> Maybe MiniBuildPlan | when looking up by name, take from this build plan |
-> FilePath | destination |
-> [String] | names or identifiers |
-> m () |
Intended to work for the command line command.
:: (StackMiniM env m, HasConfig env) | |
=> 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) => 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.
:: (StackMiniM env m, HasConfig env) | |
=> Maybe MiniBuildPlan | when looking up by name, take from this build plan |
-> Map PackageIdentifier (Maybe GitSHA1) | |
-> Set PackageName | |
-> m [ResolvedPackage] |
Resolve a set of package names and identifiers into FetchPackage
values.
resolvePackagesAllowMissing Source #
:: (StackMiniM env m, HasConfig env) | |
=> Maybe MiniBuildPlan | when looking up by name, take from this build plan |
-> Map PackageIdentifier (Maybe GitSHA1) | |
-> Set PackageName | |
-> m (Set PackageName, Set PackageIdentifier, [ResolvedPackage]) |
data ResolvedPackage Source #
withCabalFiles :: (StackMiniM env m, HasConfig env) => IndexName -> [(ResolvedPackage, 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) => ((PackageIdentifier -> IO ByteString) -> m a) -> m a Source #
Provide a function which will load up a cabal ByteString
from the
package indices.