dream2nix/specifications/dream-lock-schema.json
2021-09-23 11:05:25 +01:00

97 lines
2.2 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema",
"title": "manifest",
"type": "object",
"properties": {
"sources": {
"type": "object",
"patternProperties": {
"^.*$": {
"type": "object",
"properties": {
"type": {
"enum": [
"fetchurl",
"git",
"github",
"gitlab"
]
},
"url": {
"type": "string"
},
"hash": {
"type": "string"
}
},
"allOf": [
{
"if": {
"properties": { "type": { "const": "unknown" } }
},
"then": { "properties": {} }
},
{
"if": {
"properties": { "type": { "const": "fetchurl" } }
},
"then": {
"properties": { "url": { "type": "string" } }
}
},
{
"if": {
"properties": { "type": { "const": "git" } }
},
"then": {
"properties": {
"url": { "type": "string" },
"rev": { "type": "string" }
}
}
},
{
"if": {
"properties": { "type": { "pattern": "(github)|(gitlab)" } }
},
"then": {
"properties": {
"owner": { "type": "string" },
"repo": { "type": "string" },
"rev": { "type": "string" }
}
}
}
]
}
}
},
"generic": {
"type": "object",
"properties": {
"buildSystem": { "type": "string" },
"producedBy": { "type": "string" },
"dependencyGraph": {
"type": "object",
"properties": {
"^.*$": {
"type": "array",
"items": { "type": "string" }
}
}
}
}
},
"buildSystem": {
"description": "build system specifics",
"type": "object"
}
}
}