Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type HomeSchema = Attrs '["herculesCI" ::? (Attrs '[] ->? HerculesCISchema)]
- type HerculesCISchema = Attrs '["onPush" ::? Dictionary OnPushSchema, "onSchedule" ::? Dictionary OnScheduleSchema]
- type OnPushSchema = Attrs '["extraInputs" ::? ExtraInputsSchema, "outputs" ::. OutputsFunction, "enable" ::? Bool]
- type OnScheduleSchema = Attrs '["extraInputs" ::? ExtraInputsSchema, "outputs" ::. OutputsFunction, "enable" ::? Bool, "when" ::?? TimeConstraintsSchema]
- type ExtraInputsSchema = Dictionary InputDeclSchema
- type InputDeclSchema = Attrs '["project" ::. StringWithoutContext, "ref" ::? StringWithoutContext]
- type InputsSchema = Dictionary InputSchema
- type InputSchema = Dictionary RawValue
- type OutputsSchema = Dictionary RawValue
- type TimeConstraintsSchema = Attrs '["hour" ::?? HoursSchema, "minute" ::?? MinuteSchema, "dayOfWeek" ::?? DaysOfWeekSchema, "dayOfMonth" ::?? DaysOfMonthSchema]
- findNixFile :: FilePath -> IO (Either Text FilePath)
- loadNixFile :: Ptr EvalState -> FilePath -> GitSource -> IO (Either Text HomeExpr)
- data HomeExpr
- homeExprRawValue :: HomeExpr -> RawValue
- getHerculesCI :: MonadEval m => HomeExpr -> HerculesCIArgs -> m (Maybe (PSObject HerculesCISchema))
- loadDefaultHerculesCI :: MonadEval m => m (PSObject DefaultHerculesCIHelperSchema)
- getVirtualValueByPath :: Ptr EvalState -> FilePath -> HerculesCIArgs -> (Map ByteString InputDeclaration -> IO (Value NixAttrs)) -> [ByteString] -> IO (Maybe RawValue)
- parseExtraInputs :: MonadEval m => PSObject ExtraInputsSchema -> m (Map ByteString InputDeclaration)
Schemas
type HomeSchema = Attrs '["herculesCI" ::? (Attrs '[] ->? HerculesCISchema)] Source #
type HerculesCISchema = Attrs '["onPush" ::? Dictionary OnPushSchema, "onSchedule" ::? Dictionary OnScheduleSchema] Source #
type OnPushSchema = Attrs '["extraInputs" ::? ExtraInputsSchema, "outputs" ::. OutputsFunction, "enable" ::? Bool] Source #
type OnScheduleSchema = Attrs '["extraInputs" ::? ExtraInputsSchema, "outputs" ::. OutputsFunction, "enable" ::? Bool, "when" ::?? TimeConstraintsSchema] Source #
type ExtraInputsSchema = Dictionary InputDeclSchema Source #
type InputDeclSchema = Attrs '["project" ::. StringWithoutContext, "ref" ::? StringWithoutContext] Source #
type InputsSchema = Dictionary InputSchema Source #
type InputSchema = Dictionary RawValue Source #
type OutputsSchema = Dictionary RawValue Source #
type TimeConstraintsSchema = Attrs '["hour" ::?? HoursSchema, "minute" ::?? MinuteSchema, "dayOfWeek" ::?? DaysOfWeekSchema, "dayOfMonth" ::?? DaysOfMonthSchema] Source #
Loading
Expression containing the bulk of the project
homeExprRawValue :: HomeExpr -> RawValue Source #
getHerculesCI :: MonadEval m => HomeExpr -> HerculesCIArgs -> m (Maybe (PSObject HerculesCISchema)) Source #
loadDefaultHerculesCI :: MonadEval m => m (PSObject DefaultHerculesCIHelperSchema) Source #
onPush
getVirtualValueByPath Source #
:: Ptr EvalState | |
-> FilePath | |
-> HerculesCIArgs | |
-> (Map ByteString InputDeclaration -> IO (Value NixAttrs)) | Resolve inputs to an attrset of fetched/fetchable stuff |
-> [ByteString] | |
-> IO (Maybe RawValue) |
A function for retrieving values from herculesCI
and legacy ci.nix.
It treats the expression as tree of attribute sets, making the required
function applications and context gather implicit.
For example, given a path, this will return the onPush output or legacy ci.nix value. Oversimplifying:
@@
e.g. ["a" "b"] => ((import file).herculesCI args).onPush.a.outputs.b
or falling back to
["a" "b"] => (import file legacyArgs).a.b
@@
parseExtraInputs :: MonadEval m => PSObject ExtraInputsSchema -> m (Map ByteString InputDeclaration) Source #