From bb185b2c6eb8c4e035cddb61be772169df1b0139 Mon Sep 17 00:00:00 2001 From: Jürgen Hahn Date: Wed, 28 Dec 2022 10:28:37 +0100 Subject: feat(tvix/derivation): serialize Nix Derivation This adds a Derivation structure and allows to write it to a structure that implements std::fmt:Write. The implementation is based on the go-nix version. Change-Id: Ib54e1202b5c67f5d206b21bc109a751e971064cf Reviewed-on: https://cl.tvl.fyi/c/depot/+/7659 Reviewed-by: flokli Reviewed-by: tazjin Tested-by: BuildkiteCI --- .../ch49594n9avinrf8ip0aslidkc4lxkqv-foo.drv.json | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tvix/derivation/src/tests/derivation_tests/ch49594n9avinrf8ip0aslidkc4lxkqv-foo.drv.json (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 new file mode 100644 index 000000000000..2d7dbeb75299 --- /dev/null +++ b/tvix/derivation/src/tests/derivation_tests/ch49594n9avinrf8ip0aslidkc4lxkqv-foo.drv.json @@ -0,0 +1,23 @@ +{ + "outputs": { + "out": { + "path": "/nix/store/fhaj6gmwns62s6ypkcldbaj2ybvkhx3p-foo" + } + }, + "input_sources": [], + "input_derivations": { + "/nix/store/ss2p4wmxijn652haqyd7dckxwl4c7hxx-bar.drv": [ + "out" + ] + }, + "platform": ":", + "builder": ":", + "arguments": [], + "environment": { + "bar": "/nix/store/mp57d33657rf34lzvlbpfa1gjfv5gmpg-bar", + "builder": ":", + "name": "foo", + "out": "/nix/store/fhaj6gmwns62s6ypkcldbaj2ybvkhx3p-foo", + "system": ":" + } +} -- cgit 1.4.1