From 407a9cd90f3a1ea3bb0cf4ced85cfacb29881b0c Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Wed, 4 Jan 2023 19:26:05 +0100 Subject: chore(tvix/derivation): align json serialization with nix output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the #[serde(rename = "…")] field attributes to match the field names that Nix uses in its JSON output (nix show-derivation). This allows us to just re-use the exact same fixtures from go-nix, without manual post-massaging. Change-Id: Ifd5c08e43cd4f50d5e02903eccd8cb37230b70a6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7757 Reviewed-by: jrhahn Tested-by: BuildkiteCI Reviewed-by: tazjin --- .../ch49594n9avinrf8ip0aslidkc4lxkqv-foo.drv.json | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'tvix/derivation/src/tests/derivation_tests/ch49594n9avinrf8ip0aslidkc4lxkqv-foo.drv.json') diff --git a/tvix/derivation/src/tests/derivation_tests/ch49594n9avinrf8ip0aslidkc4lxkqv-foo.drv.json b/tvix/derivation/src/tests/derivation_tests/ch49594n9avinrf8ip0aslidkc4lxkqv-foo.drv.json index 2d7dbeb75299..831d27956d86 100644 --- a/tvix/derivation/src/tests/derivation_tests/ch49594n9avinrf8ip0aslidkc4lxkqv-foo.drv.json +++ b/tvix/derivation/src/tests/derivation_tests/ch49594n9avinrf8ip0aslidkc4lxkqv-foo.drv.json @@ -1,23 +1,23 @@ { - "outputs": { - "out": { - "path": "/nix/store/fhaj6gmwns62s6ypkcldbaj2ybvkhx3p-foo" - } - }, - "input_sources": [], - "input_derivations": { - "/nix/store/ss2p4wmxijn652haqyd7dckxwl4c7hxx-bar.drv": [ - "out" - ] - }, - "platform": ":", + "args": [], "builder": ":", - "arguments": [], - "environment": { + "env": { "bar": "/nix/store/mp57d33657rf34lzvlbpfa1gjfv5gmpg-bar", "builder": ":", "name": "foo", "out": "/nix/store/fhaj6gmwns62s6ypkcldbaj2ybvkhx3p-foo", "system": ":" - } + }, + "inputDrvs": { + "/nix/store/ss2p4wmxijn652haqyd7dckxwl4c7hxx-bar.drv": [ + "out" + ] + }, + "inputSrcs": [], + "outputs": { + "out": { + "path": "/nix/store/fhaj6gmwns62s6ypkcldbaj2ybvkhx3p-foo" + } + }, + "system": ":" } -- cgit 1.4.1