mirror of
https://github.com/NixOS/nix.git
synced 2025-11-17 07:52:43 +01:00
Include the name in the JSON for derivations
This is non-breaking change in the to-JSON direction. This *is* a breaking change in the from-JSON direction, but we don't care, as that is brand new in this PR. `nix show-derivation --help` currently has the sole public documentation of this format, it is updated accordingly.
This commit is contained in:
parent
fe9cbe838c
commit
b200784cec
4 changed files with 11 additions and 4 deletions
|
|
@ -98,12 +98,12 @@ TEST_JSON(impure,
|
|||
Derivation { VAL }, \
|
||||
Derivation::fromJSON( \
|
||||
*store, \
|
||||
DRV_NAME, \
|
||||
STR ## _json)); \
|
||||
}
|
||||
|
||||
TEST_JSON(simple,
|
||||
R"({
|
||||
"name": "my-derivation",
|
||||
"inputSrcs": [
|
||||
"/nix/store/c015dhfh5l0lp6wxyvdn7bmwhbbr6hr9-dep1"
|
||||
],
|
||||
|
|
@ -126,6 +126,7 @@ TEST_JSON(simple,
|
|||
})",
|
||||
({
|
||||
Derivation drv;
|
||||
drv.name = "my-derivation";
|
||||
drv.inputSrcs = {
|
||||
store->parseStorePath("/nix/store/c015dhfh5l0lp6wxyvdn7bmwhbbr6hr9-dep1"),
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue