mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
Better JSON schema for derivation outputs
It now uses a `oneOf` and properly models each type of output (corresponding to each type of derivation) separately.
This commit is contained in:
parent
3b2186e1c8
commit
c2609df08c
2 changed files with 162 additions and 27 deletions
|
|
@ -45,6 +45,20 @@ schemas = [
|
|||
'simple.json',
|
||||
],
|
||||
},
|
||||
{
|
||||
'stem' : 'deriving-path',
|
||||
'schema' : schema_dir / 'deriving-path-v1.yaml',
|
||||
'files' : [
|
||||
'single_opaque.json',
|
||||
'single_built.json',
|
||||
'single_built_built.json',
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
# Derivation and Derivation output
|
||||
schemas += [
|
||||
# Match overall
|
||||
{
|
||||
'stem' : 'derivation',
|
||||
'schema' : schema_dir / 'derivation-v3.yaml',
|
||||
|
|
@ -55,7 +69,7 @@ schemas = [
|
|||
},
|
||||
{
|
||||
'stem' : 'derivation',
|
||||
'schema' : schema_dir / 'derivation-v3.yaml#/$defs/output',
|
||||
'schema' : schema_dir / 'derivation-v3.yaml#/$defs/output/overall',
|
||||
'files' : [
|
||||
'output-caFixedFlat.json',
|
||||
'output-caFixedNAR.json',
|
||||
|
|
@ -66,15 +80,48 @@ schemas = [
|
|||
'output-inputAddressed.json',
|
||||
],
|
||||
},
|
||||
# Match exact variant
|
||||
{
|
||||
'stem' : 'deriving-path',
|
||||
'schema' : schema_dir / 'deriving-path-v1.yaml',
|
||||
'stem' : 'derivation',
|
||||
'schema' : schema_dir / 'derivation-v3.yaml#/$defs/output/inputAddressed',
|
||||
'files' : [
|
||||
'single_opaque.json',
|
||||
'single_built.json',
|
||||
'single_built_built.json',
|
||||
'output-inputAddressed.json',
|
||||
],
|
||||
},
|
||||
{
|
||||
'stem' : 'derivation',
|
||||
'schema' : schema_dir / 'derivation-v3.yaml#/$defs/output/caFixed',
|
||||
'files' : [
|
||||
'output-caFixedFlat.json',
|
||||
'output-caFixedNAR.json',
|
||||
'output-caFixedText.json',
|
||||
],
|
||||
},
|
||||
{
|
||||
'stem' : 'derivation',
|
||||
'schema' : schema_dir / 'derivation-v3.yaml#/$defs/output/caFloating',
|
||||
'files' : [
|
||||
'output-caFloating.json',
|
||||
],
|
||||
},
|
||||
{
|
||||
'stem' : 'derivation',
|
||||
'schema' : schema_dir / 'derivation-v3.yaml#/$defs/output/deferred',
|
||||
'files' : [
|
||||
'output-deferred.json',
|
||||
],
|
||||
},
|
||||
{
|
||||
'stem' : 'derivation',
|
||||
'schema' : schema_dir / 'derivation-v3.yaml#/$defs/output/impure',
|
||||
'files' : [
|
||||
'output-impure.json',
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
# Store object info
|
||||
schemas += [
|
||||
# Match overall
|
||||
{
|
||||
'stem' : 'store-object-info',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue