From 2410f2292f53a17242ed54b0af2d7b04ec3173f6 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 31 Jul 2023 15:46:39 +0200 Subject: feat(nix-compat/{aterm,derivation}): init parser This provides a nom-based parser for Nix derivations in ATerm format, which can be reached via `Derivation::from_aterm_bytes`. Some of the lower-level ATerm primitives are moved into a (new) aterm module, and some more higher-level ones that construct derivation- specific types. Also, move the escape_bytes function into there, this is a generic ATerm thing. Change-Id: I2b03b8a1461c7ea2fcb8640c2fc3d1fa3ea719fb Reviewed-on: https://cl.tvl.fyi/c/depot/+/9730 Autosubmit: flokli Reviewed-by: raitobezarius Tested-by: BuildkiteCI --- tvix/Cargo.lock | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tvix/Cargo.lock') diff --git a/tvix/Cargo.lock b/tvix/Cargo.lock index 38d066eb140f..b67f70669a2a 100644 --- a/tvix/Cargo.lock +++ b/tvix/Cargo.lock @@ -1340,6 +1340,12 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + [[package]] name = "miniz_oxide" version = "0.7.1" @@ -1427,7 +1433,9 @@ dependencies = [ "data-encoding", "futures", "futures-util", + "glob", "lazy_static", + "nom", "serde", "serde_json", "sha2", @@ -1436,6 +1444,16 @@ dependencies = [ "thiserror", ] +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + [[package]] name = "nom8" version = "0.2.0" -- cgit 1.4.1