Safe Haskell | None |
---|---|
Language | Haskell2010 |
Static B9 configuration. Read, write and merge configurable properties. The properties are independent of specific build targets.
- data B9Config = B9Config {
- _verbosity :: Maybe LogLevel
- _logFile :: Maybe FilePath
- _buildDirRoot :: Maybe FilePath
- _keepTempDirs :: Bool
- _execEnvType :: ExecEnvType
- _profileFile :: Maybe FilePath
- _envVars :: BuildVariables
- _uniqueBuildDirs :: Bool
- _repositoryCache :: Maybe SystemPath
- _repository :: Maybe String
- _interactive :: Bool
- _libVirtLXCConfigs :: Maybe LibVirtLXCConfig
- _remoteRepos :: [RemoteRepo]
- verbosity :: Lens' B9Config (Maybe LogLevel)
- logFile :: Lens' B9Config (Maybe FilePath)
- buildDirRoot :: Lens' B9Config (Maybe FilePath)
- keepTempDirs :: Lens' B9Config Bool
- execEnvType :: Lens' B9Config ExecEnvType
- profileFile :: Lens' B9Config (Maybe FilePath)
- envVars :: Lens' B9Config BuildVariables
- uniqueBuildDirs :: Lens' B9Config Bool
- repositoryCache :: Lens' B9Config (Maybe SystemPath)
- repository :: Lens' B9Config (Maybe String)
- interactive :: Lens' B9Config Bool
- libVirtLXCConfigs :: Lens' B9Config (Maybe LibVirtLXCConfig)
- remoteRepos :: Lens' B9Config [RemoteRepo]
- data B9ConfigOverride = B9ConfigOverride {}
- customB9Config :: Lens' B9ConfigOverride B9Config
- customB9ConfigPath :: Lens' B9ConfigOverride (Maybe SystemPath)
- defaultB9ConfigFile :: SystemPath
- defaultRepositoryCache :: SystemPath
- defaultB9Config :: B9Config
- openOrCreateB9Config :: MonadIO m => Maybe SystemPath -> m ConfigParser
- writeB9ConfigParser :: MonadIO m => Maybe SystemPath -> ConfigParser -> m ()
- readB9Config :: MonadIO m => Maybe SystemPath -> m ConfigParser
- parseB9Config :: ConfigParser -> Either CPError B9Config
- appendPositionalArguments :: [String] -> B9Config -> B9Config
- modifyConfigParser :: (B9Config -> B9Config) -> ConfigParser -> Either CPError ConfigParser
- b9ConfigToConfigParser :: B9Config -> ConfigParser -> Either CPError ConfigParser
- data LogLevel
- data ExecEnvType = LibVirtLXC
- type BuildVariables = [(String, String)]
Documentation
data B9ConfigOverride Source #
Override b9 configuration items and/or the path of the b9 configuration file. This is useful, i.e. when dealing with command line parameters.
openOrCreateB9Config :: MonadIO m => Maybe SystemPath -> m ConfigParser Source #
Open the configuration file that contains the B9Config
.
If the configuration does not exist, write a default configuration file,
and create a all missing directories.
writeB9ConfigParser :: MonadIO m => Maybe SystemPath -> ConfigParser -> m () Source #
Write the configuration in the ConfigParser
to either the user supplied
configuration file path or to defaultB9ConfigFile
.
Create all missing (parent) directories.
readB9Config :: MonadIO m => Maybe SystemPath -> m ConfigParser Source #
appendPositionalArguments :: [String] -> B9Config -> B9Config Source #
If environment variables arg_1 .. arg_n
are bound
and a list of k
additional values are passed to this function,
store them with keys arg_(n+1) .. arg_(n+k)
.
modifyConfigParser :: (B9Config -> B9Config) -> ConfigParser -> Either CPError ConfigParser Source #
Parse a B9Config
, modify it, and merge it back to the given ConfigParser
.
b9ConfigToConfigParser :: B9Config -> ConfigParser -> Either CPError ConfigParser Source #
Append a config file section for the B9Config
to a ConfigParser
.
data ExecEnvType Source #
type BuildVariables = [(String, String)] Source #