1
1
Fork 0
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:
John Ericson 2023-03-30 11:06:52 -04:00
parent fe9cbe838c
commit b200784cec
4 changed files with 11 additions and 4 deletions

View file

@ -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"),
};