Skip to main content

build_context

Function build_context 

Source
pub fn build_context(spec_id: &str, specs_dir: &Path) -> DerivationContext
Expand description

Build a DerivationContext populated with current environment data.

This creates a fully populated context with:

  • Current git branch name
  • Spec file path (constructed from spec_id and specs_dir)
  • All environment variables
  • Git user name and email from config

This is the canonical way to build a context for derivation operations.