spack:
  include:
      - compiler_definitions.yaml

      - packages_stack.yaml
      - packages_env.yaml

      - modules_stack.yaml
      - modules_env.yaml

      - definitions_env.yaml

      - config_stack.yaml

  definitions:
    # -------------------------------------------------------------------------
    # PE definition
    # -------------------------------------------------------------------------
    - mpi_gcc:
        - openmpi@5.0.3

    - blas_gcc:
        - openblas@0.3.26

    - python_gcc:
        - python@3.11.7

    # -------------------------------------------------------------------------
    # Core packages
    # -------------------------------------------------------------------------
    - core_codes:
        - bzip2
        - cmake
        - emacs +tls
        - git
        - gmp
        - gzip
        - libarchive
        - libjpeg-turbo
        - libpng
        - libtiff
        - libxml2
        - lmod
        - mpfr
        - neovim
        - ninja
        - rclone
        - subversion
        - tar
        - tcl
        - tk
        - tmux
        - xclip
        - zlib-ng

    # -------------------------------------------------------------------------
    # Serial codes
    # -------------------------------------------------------------------------
    - serial_codes:
        - python

    - mpi_codes:
        - ior

    # -------------------------------------------------------------------------
    # Empty to specialize in environments
    # -------------------------------------------------------------------------
    - cuda_system_codes: []

    - cuda_serial_codes: []

  specs:
    - matrix:
        - [$compilers_specs]

    - matrix:
        - [$blas_gcc]
        - [$%compiler_gcc]

    - matrix:
        - [$mpi_gcc]
        - [$%compiler_gcc]

    - matrix:
        - [$core_codes]
        - [$%system_compiler]

    - matrix:
        - [$cuda_system_codes]
        - [$%system_compiler]

    - matrix:
        - [$serial_codes]
        - [$%compiler_gcc]

    - matrix:
        - [$cuda_serial_codes]
        - [$%compiler_gcc]

    - matrix:
        - [$mpi_codes]
        - [$^mpi_gcc]
        - [$%compiler_gcc]

  view: false
#    default:
#      root: /stack/packages/
