Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

env

This field contains a map of environment variable scopes for the module.

Three scopes are available:

  • local: Variables only visible to this module’s own build commands. Applied after exported variables from dependencies, so it can override imported values.
  • export: Variables visible to this module and transitively to all modules that depend on or use this module.
  • global: Variables merged into the build’s global environment, visible to all modules in the build.

Each scope is a map where keys are variable names and values are either a single value or a list of values.

Example:

modules:
  - name: my_module
    env:
      local:
        CFLAGS:
          - -DLOCAL_ONLY
      export:
        CFLAGS:
          - -I${relpath}/include
      global:
        GLOBAL_VAR: my_module_was_here