Copyright | (c) The University of Glasgow 2006 Duncan Coutts 2008 |
---|---|
Maintainer | [email protected] |
Stability | alpha |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Distribution.Client.SetupWrapper
Description
An interface to building and installing Cabal packages.
If the Built-Type
field is specified as something other than
Custom
, and the current version of Cabal is acceptable, this performs
setup actions directly. Otherwise it builds the setup script and
runs it with the given arguments.
Synopsis
- getSetup :: Verbosity -> SetupScriptOptions -> Maybe PackageDescription -> IO Setup
- runSetup :: Verbosity -> Setup -> [String] -> IO ()
- runSetupCommand :: Verbosity -> Setup -> CommandUI flags -> (flags -> CommonSetupFlags) -> flags -> [String] -> IO ()
- setupWrapper :: Verbosity -> SetupScriptOptions -> Maybe PackageDescription -> CommandUI flags -> (flags -> CommonSetupFlags) -> (Version -> IO flags) -> (Version -> [String]) -> IO ()
- data SetupScriptOptions = SetupScriptOptions {
- useCabalVersion :: VersionRange
- useCabalSpecVersion :: Maybe Version
- useCompiler :: Maybe Compiler
- usePlatform :: Maybe Platform
- usePackageDB :: PackageDBStackCWD
- usePackageIndex :: Maybe InstalledPackageIndex
- useProgramDb :: ProgramDb
- useDistPref :: SymbolicPath Pkg (Dir Dist)
- useLoggingHandle :: Maybe Handle
- useWorkingDir :: Maybe (SymbolicPath CWD (Dir Pkg))
- useExtraPathEnv :: [FilePath]
- useExtraEnvOverrides :: [(String, Maybe FilePath)]
- forceExternalSetupMethod :: Bool
- useDependencies :: [(ComponentId, PackageId)]
- useDependenciesExclusive :: Bool
- useVersionMacros :: Bool
- useWin32CleanHack :: Bool
- setupCacheLock :: Maybe Lock
- isInteractive :: Bool
- defaultSetupScriptOptions :: SetupScriptOptions
Documentation
getSetup :: Verbosity -> SetupScriptOptions -> Maybe PackageDescription -> IO Setup Source #
Prepare to build a package by configuring a SetupMethod
. The returned
Setup
object identifies the method. The SetupScriptOptions
may be changed
during the configuration process; the final values are given by
setupScriptOptions
.
Run a configured Setup
with specific arguments.
Arguments
:: Verbosity | |
-> Setup | |
-> CommandUI flags | command definition |
-> (flags -> CommonSetupFlags) | |
-> flags | command flags |
-> [String] | extra command-line arguments |
-> IO () |
Run a command through a configured Setup
.
Arguments
:: Verbosity | |
-> SetupScriptOptions | |
-> Maybe PackageDescription | |
-> CommandUI flags | |
-> (flags -> CommonSetupFlags) | |
-> (Version -> IO flags) | produce command flags given the Cabal library version |
-> (Version -> [String]) | |
-> IO () |
Configure a Setup
and run a command in one step. The command flags
may depend on the Cabal library version in use.
data SetupScriptOptions Source #
SetupScriptOptions
are options used to configure and run Setup
, as
opposed to options given to the Cabal command at runtime.
Constructors
SetupScriptOptions | |
Fields
|