mirror of
https://github.com/NixOS/nix.git
synced 2025-12-20 16:01:07 +01:00
JSON impl and Schema for DummyStore
This is the "keystone" that puts most of the other store-layer JSON formats together. Also, add some documentation for JSON testing.
This commit is contained in:
parent
622a5cd1bf
commit
0275b64b81
18 changed files with 542 additions and 55 deletions
8
src/libstore-tests/data/dummy-store/empty.json
Normal file
8
src/libstore-tests/data/dummy-store/empty.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"buildTrace": {},
|
||||
"config": {
|
||||
"store": "/nix/store"
|
||||
},
|
||||
"contents": {},
|
||||
"derivations": {}
|
||||
}
|
||||
22
src/libstore-tests/data/dummy-store/one-derivation.json
Normal file
22
src/libstore-tests/data/dummy-store/one-derivation.json
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"buildTrace": {},
|
||||
"config": {
|
||||
"store": "/nix/store"
|
||||
},
|
||||
"contents": {},
|
||||
"derivations": {
|
||||
"rlqjbbb65ggcx9hy577hvnn929wz1aj0-foo.drv": {
|
||||
"args": [],
|
||||
"builder": "",
|
||||
"env": {},
|
||||
"inputs": {
|
||||
"drvs": {},
|
||||
"srcs": []
|
||||
},
|
||||
"name": "foo",
|
||||
"outputs": {},
|
||||
"system": "",
|
||||
"version": 4
|
||||
}
|
||||
}
|
||||
}
|
||||
38
src/libstore-tests/data/dummy-store/one-flat-file.json
Normal file
38
src/libstore-tests/data/dummy-store/one-flat-file.json
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"buildTrace": {},
|
||||
"config": {
|
||||
"store": "/nix/store"
|
||||
},
|
||||
"contents": {
|
||||
"5hizn7xyyrhxr0k2magvxl5ccvk0ci9n-my-file": {
|
||||
"contents": {
|
||||
"contents": "asdf",
|
||||
"executable": false,
|
||||
"type": "regular"
|
||||
},
|
||||
"info": {
|
||||
"ca": {
|
||||
"hash": {
|
||||
"algorithm": "sha256",
|
||||
"format": "base64",
|
||||
"hash": "f1eduuSIYC1BofXA1tycF79Ai2NSMJQtUErx5DxLYSU="
|
||||
},
|
||||
"method": "nar"
|
||||
},
|
||||
"deriver": null,
|
||||
"narHash": {
|
||||
"algorithm": "sha256",
|
||||
"format": "base64",
|
||||
"hash": "f1eduuSIYC1BofXA1tycF79Ai2NSMJQtUErx5DxLYSU="
|
||||
},
|
||||
"narSize": 120,
|
||||
"references": [],
|
||||
"registrationTime": null,
|
||||
"signatures": [],
|
||||
"ultimate": false,
|
||||
"version": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"derivations": {}
|
||||
}
|
||||
16
src/libstore-tests/data/dummy-store/one-realisation.json
Normal file
16
src/libstore-tests/data/dummy-store/one-realisation.json
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"buildTrace": {
|
||||
"ungWv48Bz+pBQUDeXa4iI7ADYaOWF3qctBD/YfIAFa0=": {
|
||||
"out": {
|
||||
"dependentRealisations": {},
|
||||
"outPath": "g1w7hy3qg1w7hy3qg1w7hy3qg1w7hy3q-foo",
|
||||
"signatures": []
|
||||
}
|
||||
}
|
||||
},
|
||||
"config": {
|
||||
"store": "/nix/store"
|
||||
},
|
||||
"contents": {},
|
||||
"derivations": {}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue