{
  "name": "org.osbuild.apt",
  "version": "1.0.0",
  "description": "Debian APT package management stage for osbuild",
  "main": "apt_stage.py",
  "schema": {
    "type": "object",
    "properties": {
      "packages": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "List of packages to install"
      },
      "repos": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "Repository name"
            },
            "baseurls": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Repository base URLs"
            },
            "enabled": {
              "type": "boolean",
              "description": "Whether repository is enabled"
            },
            "gpgcheck": {
              "type": "boolean",
              "description": "Whether to check GPG signatures"
            },
            "priority": {
              "type": "integer",
              "description": "Repository priority"
            }
          }
        },
        "description": "Additional repository configurations"
      },
      "release": {
        "type": "string",
        "description": "Debian release (e.g., 'trixie', 'bookworm')",
        "default": "trixie"
      },
      "arch": {
        "type": "string",
        "description": "Target architecture",
        "default": "amd64"
      },
      "exclude_packages": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "List of packages to exclude from installation"
      },
      "install_weak_deps": {
        "type": "boolean",
        "description": "Whether to install weak dependencies",
        "default": true
      }
    },
    "required": ["packages"]
  },
  "dependencies": {
    "packages": [
      "apt",
      "apt-utils",
      "dpkg"
    ]
  },
  "stages": {
    "build": {
      "org.osbuild.apt": {
        "packages": ["${packages}"],
        "repos": "${repos}",
        "release": "${release}",
        "arch": "${arch}",
        "exclude_packages": "${exclude_packages}",
        "install_weak_deps": "${install_weak_deps}"
      }
    }
  }
}
