Navigation

Build

plan validates a sequence of BuildStep records via fx.pipeline.run (reader/error/acc effects). materialize lowers a validated plan to a pkgs.runCommand derivation; shell generation is pure and tested inline.

materialize

materialize: convert a validated BuildPlan into a pkgs.runCommand derivation; copies sources, scopes per-step env vars, runs steps under set -euo pipefail.

materialize : { pkgs, plan, native ? [] } -> Derivation

Materialize a validated BuildPlan into a derivation.

Converts the eval-time plan (validated by fx.build.plan) into a pkgs.runCommand derivation. Sources are copied into a working directory, per-step environment variables are scoped, and steps execute sequentially under set -euo pipefail.

The plan argument is the .plan field from fx.build.plan's output. Shell generation helpers (mkStepScript, mkSourceSetup, mkBuildScript) are pure functions tested inline.

plan

plan: validate build steps against BuildStep, filter by when predicates against reader context, and collect errors/warnings without throwing.

plan : { name, steps, sources ? {}, context ? {} } -> { plan : BuildPlan, errors : [Err], warnings : [Warn], typeErrors : [Err] }

Validate and process build steps into a BuildPlan.

Runs an eval-time pipeline that validates each step against BuildStep, filters steps by when predicates using reader context, and collects all errors without throwing.

Sub-namespaces

Source