{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/spack-bootstrap-yaml/latest.json",
  "title": "Spack bootstrap configuration file schema",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/spack/schemas/refs/heads/main/schemas/bootstrap.json",
    "sourceSha256": "ea2bbe41592f0f9f7ca941e9726a205fda9bff9d889285f38dfbd109c70c2565",
    "fileMatch": [
      "**/*spack/**/bootstrap.yaml"
    ],
    "parsers": [
      "yaml"
    ]
  },
  "type": "object",
  "properties": {
    "bootstrap": {
      "type": "object",
      "description": "Configure how Spack bootstraps its own dependencies when needed",
      "properties": {
        "enable": {
          "type": "boolean",
          "description": "Enable or disable bootstrapping entirely"
        },
        "root": {
          "type": "string",
          "description": "Where to install bootstrapped dependencies"
        },
        "sources": {
          "type": "array",
          "items": {
            "type": "object",
            "description": "Bootstrap source configuration",
            "properties": {
              "name": {
                "type": "string",
                "description": "Name of the bootstrap source (e.g., 'github-actions-v0.6', 'spack-install')"
              },
              "metadata": {
                "type": "string",
                "description": "Path to metadata directory containing bootstrap source configuration"
              }
            },
            "required": [
              "name",
              "metadata"
            ],
            "additionalProperties": false
          },
          "description": "List of bootstrap sources tried in order. Each method may bootstrap different software depending on its type (e.g., pre-built binaries, source builds)"
        },
        "trusted": {
          "type": "object",
          "description": "Controls which sources are enabled for automatic bootstrapping",
          "additionalProperties": {
            "type": "boolean"
          }
        }
      }
    }
  },
  "additionalProperties": false
}
