mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
Change JSON derivation format in two ways
- Use canonical content address JSON format for floating content addressed derivation outputs This keeps it more consistent. - Reorganize inputs into nested structure (`inputs.srcs` and `inputs.drvs`) This will allow for an easier to use, but less compact, alternative where `srcs` is just a list of derived paths. It also allows for other experiments for derivations with a different input structure, as I suspect will be needed for secure build traces.
This commit is contained in:
parent
147e183c68
commit
0c37a62207
21 changed files with 298 additions and 251 deletions
|
|
@ -51,10 +51,12 @@ builtins.outputOf
|
|||
"$word": "hello, from $word!",
|
||||
"PATH": ${builtins.toJSON path}
|
||||
},
|
||||
"inputDrvs": {
|
||||
$inputDrvs
|
||||
"inputs": {
|
||||
"drvs": {
|
||||
$inputDrvs
|
||||
},
|
||||
"srcs": []
|
||||
},
|
||||
"inputSrcs": [],
|
||||
"name": "build-$word",
|
||||
"outputs": {
|
||||
"out": {
|
||||
|
|
@ -63,7 +65,7 @@ builtins.outputOf
|
|||
}
|
||||
},
|
||||
"system": "${system}",
|
||||
"version": 3
|
||||
"version": 4
|
||||
}
|
||||
EOF
|
||||
drvPath=$(echo "$json" | nix derivation add)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue