Skip to content

Conversation

bcumming
Copy link
Member

@bcumming bcumming commented Aug 22, 2025

Add support for setting custom environment variables in a view definition in environments.yaml
https://spack.readthedocs.io/en/latest/env_vars_yaml.html
The syntax is based loosely on the env_vars.yaml format used by Spack

With some modifications to allow for effective ordering of environment variable updates.

example:

  views:
    nosu:
      link: roots
      exclude: [osu-micro-benchmarks]
      uenv:
        add_compilers: true
        prefix_paths:
          LD_LIBRARY_PATH: [lib, lib64]
        env_vars:
          set:
          - WOMBAT: "soup"
          - NOCOLOR: null # unset variable
          prepend_path:
          - PATH: "${@HOME@}/.local/x86_4/bin"
          append_path:
          - PATH: "${@HOME@}/.local/bin"

TODO

  • update documentation

@bcumming bcumming requested review from msimberg, albestro and RMeli and removed request for msimberg, albestro and RMeli August 22, 2025 15:49
Co-authored-by: Alberto Invernizzi <[email protected]>
@bcumming bcumming requested a review from albestro August 26, 2025 06:47
@bcumming bcumming merged commit af42c74 into eth-cscs:main Aug 26, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants