hercules-ci-agent-0.10.1: Runs Continuous Integration tasks on your machines
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hercules.Agent.NixFile

Synopsis

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 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

data HomeExpr Source #

Expression containing the bulk of the project

Constructors

Flake (Value NixAttrs) 
CiNix FilePath RawValue 

getHerculesCI :: MonadEval m => HomeExpr -> HerculesCIArgs -> m (Maybe (PSObject HerculesCISchema)) Source #

loadDefaultHerculesCI :: MonadEval m => m (PSObject DefaultHerculesCIHelperSchema) Source #

onPush

getVirtualValueByPath Source #

Arguments

:: 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 #