Safe Haskell | None |
---|---|
Language | Haskell2010 |
Mostly effectful functions to assemble artifacts.
- getArtifactOutputFiles :: ArtifactGenerator -> Either String [FilePath]
- assemble :: ArtifactGenerator -> B9 [AssembledArtifact]
- evalArtifactGenerator :: String -> String -> BuildVariables -> ArtifactGenerator -> Either String [InstanceGenerator [SourceGenerator]]
- parseArtifactGenerator :: ArtifactGenerator -> CGParser ()
- withArtifactSources :: [ArtifactSource] -> CGParser () -> CGParser ()
- withBindings :: [(String, String)] -> CGParser () -> CGParser ()
- addBindings :: [(String, String)] -> CGEnv -> CGEnv
- withXBindings :: [(String, [String])] -> CGParser () -> CGParser ()
- eachBindingSetT :: ArtifactGenerator -> [String] -> [[String]] -> CGParser [[(String, String)]]
- eachBindingSet :: ArtifactGenerator -> [(String, [String])] -> CGParser [[(String, String)]]
- writeInstanceGenerator :: InstanceId -> ArtifactAssembly -> CGParser ()
- newtype CGParser a = CGParser {
- runCGParser :: WriterT [InstanceGenerator CGEnv] (ReaderT CGEnv (Either CGError)) a
- data CGEnv = CGEnv {
- agEnv :: [(String, String)]
- agSources :: [ArtifactSource]
- data InstanceGenerator e = IG InstanceId e ArtifactAssembly
- newtype CGError = CGError String
- cgError :: String -> CGParser a
- execCGParser :: CGParser () -> CGEnv -> Either CGError [InstanceGenerator CGEnv]
- execIGEnv :: InstanceGenerator CGEnv -> Either String (InstanceGenerator [SourceGenerator])
- substAssembly :: [(String, String)] -> ArtifactAssembly -> ArtifactAssembly
- toSourceGen :: [(String, String)] -> ArtifactSource -> Either String [SourceGenerator]
- createAssembledArtifacts :: [InstanceGenerator [SourceGenerator]] -> B9 [AssembledArtifact]
- generateSources :: FilePath -> InstanceGenerator [SourceGenerator] -> B9 (InstanceGenerator FilePath)
- createTargets :: InstanceGenerator FilePath -> B9 AssembledArtifact
- generateUniqueIID :: InstanceId -> B9 InstanceId
- generateSourceTo :: FilePath -> SourceGenerator -> B9 ()
- sgReadSourceFile :: [(String, String)] -> SourceFile -> B9 ByteString
- sgChangePerm :: FilePath -> SGPerm -> B9 ()
- data SourceGenerator = SGConcat [(String, String)] SGSource SGPerm FilePath
- data SGSource
- data SGType
- data SGPerm
- sgGetFroms :: SourceGenerator -> [SourceFile]
- setSGPerm :: Int -> Int -> Int -> SourceGenerator -> Either String SourceGenerator
- setSGFromDirectory :: FilePath -> SourceGenerator -> SourceGenerator
- setSGToDirectory :: FilePath -> SourceGenerator -> SourceGenerator
- createTarget :: InstanceId -> FilePath -> ArtifactAssembly -> B9 [ArtifactTarget]
Documentation
getArtifactOutputFiles :: ArtifactGenerator -> Either String [FilePath] Source
Return a list of relative paths for the local files to be generated
by the ArtifactGenerator. This excludes Shared
and Transient image targets.
assemble :: ArtifactGenerator -> B9 [AssembledArtifact] Source
Run an artifact generator to produce the artifacts.
evalArtifactGenerator :: String -> String -> BuildVariables -> ArtifactGenerator -> Either String [InstanceGenerator [SourceGenerator]] Source
Evaluate an ArtifactGenerator
into a list of low-level build instructions
that can be built with createAssembledArtifacts
.
parseArtifactGenerator :: ArtifactGenerator -> CGParser () Source
Parse an artifacto generator inside a CGParser
monad.
withArtifactSources :: [ArtifactSource] -> CGParser () -> CGParser () Source
Execute a CGParser
action in an environment that contains a list of
ArtifactSource
s.
eachBindingSetT :: ArtifactGenerator -> [String] -> [[String]] -> CGParser [[(String, String)]] Source
eachBindingSet :: ArtifactGenerator -> [(String, [String])] -> CGParser [[(String, String)]] Source
writeInstanceGenerator :: InstanceId -> ArtifactAssembly -> CGParser () Source
Monad for creating Instance generators.
CGParser | |
|
data InstanceGenerator e Source
Eq e => Eq (InstanceGenerator e) | |
Data e => Data (InstanceGenerator e) | |
Read e => Read (InstanceGenerator e) | |
Show e => Show (InstanceGenerator e) | |
MonadWriter [InstanceGenerator CGEnv] CGParser | |
Typeable (* -> *) InstanceGenerator |
execCGParser :: CGParser () -> CGEnv -> Either CGError [InstanceGenerator CGEnv] Source
substAssembly :: [(String, String)] -> ArtifactAssembly -> ArtifactAssembly Source
toSourceGen :: [(String, String)] -> ArtifactSource -> Either String [SourceGenerator] Source
generateSources :: FilePath -> InstanceGenerator [SourceGenerator] -> B9 (InstanceGenerator FilePath) Source
generateSourceTo :: FilePath -> SourceGenerator -> B9 () Source
sgReadSourceFile :: [(String, String)] -> SourceFile -> B9 ByteString Source
sgChangePerm :: FilePath -> SGPerm -> B9 () Source
data SourceGenerator Source
Internal data type simplifying the rather complex source generation by
bioling down ArtifactSource
s to a flat list of uniform SourceGenerator
s.
sgGetFroms :: SourceGenerator -> [SourceFile] Source
setSGPerm :: Int -> Int -> Int -> SourceGenerator -> Either String SourceGenerator Source
createTarget :: InstanceId -> FilePath -> ArtifactAssembly -> B9 [ArtifactTarget] Source
Create the actual target, either just a mountpoint, or an ISO or VFAT image.