about summary refs log tree commit diff
path: root/tvix/nix-compat/src/derivation/escape.rs (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-10-16 r/6831 feat(nix-compat/{aterm,derivation}): init parserFlorian Klink1-27/+0
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 <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
2023-08-19 r/6487 refactor(tvix/nix-compat/derivation/escape): move to Vec<u8>Florian Klink1-5/+5
We only need bstr::ByteSlice to be able to use replace, it doesn't need to return a BString. Change-Id: I811948436fb89652e880970c2c05356183f3e439 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9084 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2023-07-31 r/6450 refactor(tvix/nix-compat/derivation): simplifyFlorian Klink1-11/+7
Let the escape function only take care of string escaping, not quoting. Let write_array_elements always quote and escape strings it consumes. Move the business of writing additional wrapping characters around it to the caller. Change-Id: Ib8dea69c409561b49862c531ba5a3fe6c2f061f8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8993 Reviewed-by: raitobezarius <tvl@lahfa.xyz> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2023-07-31 r/6449 refactor(tvix/nix-compat): support non-unicode DerivationsFlorian Klink1-0/+31
Derivations can have non-unicode strings in their env values, so the ATerm representations are not necessarily String anymore, but Vec<u8>. Change-Id: Ic23839471eb7f68d9c3c30667c878830946b6607 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8990 Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz> Autosubmit: flokli <flokli@flokli.de>