{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/spack-upstreams-yaml/latest.json",
  "title": "Spack core configuration file schema",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/spack/schemas/refs/heads/main/schemas/upstreams.json",
    "sourceSha256": "95b8963f8bff32a9330da578c25328ab8d0e199d0f6a42483e39e28ac53b81d8",
    "fileMatch": [
      "**/*spack/**/upstreams.yaml"
    ],
    "parsers": [
      "yaml"
    ]
  },
  "type": "object",
  "properties": {
    "upstreams": {
      "type": "object",
      "default": {},
      "description": "Configuration for chaining Spack installations. Point this Spack instance to other Spack installations to use their installed packages",
      "additionalProperties": {
        "type": "object",
        "default": {},
        "properties": {
          "install_tree": {
            "type": "string",
            "description": "Path to the opt/spack directory of the upstream Spack installation (or the install_tree root from its config.yaml)"
          },
          "modules": {
            "type": "object",
            "description": "Configuration to use modules generated by the upstream Spack instance",
            "properties": {
              "tcl": {
                "type": "string",
                "description": "Path to TCL modules directory of the upstream instance"
              },
              "lmod": {
                "type": "string",
                "description": "Path to Lmod modules directory of the upstream instance"
              }
            }
          }
        },
        "description": "Named upstream Spack instance configuration",
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}
