From 8bccc9dca99bbd4d0f02d591fd11e425bf3aecc4 Mon Sep 17 00:00:00 2001 From: Ryan Lahfa Date: Mon, 25 Mar 2024 01:01:16 +0100 Subject: feat(tvix/eval): implement `unsafeDiscardOutputDependency` This builtin only transforms any `NixContextElement::Derivation` into the trivial `NixContextElement::Plain`. This is a forgetful functor on derivation-deep context strings. The test coverage of this change is done in cl/11264. Change-Id: Icd00778c97766be6db8a6bdabaa59e9724353ec5 Signed-off-by: Ryan Lahfa Reviewed-on: https://cl.tvl.fyi/c/depot/+/11262 Tested-by: BuildkiteCI Reviewed-by: flokli --- tvix/eval/src/value/string.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tvix/eval/src/value/string.rs') diff --git a/tvix/eval/src/value/string.rs b/tvix/eval/src/value/string.rs index 6ce0d190c0a0..dd027895fd1c 100644 --- a/tvix/eval/src/value/string.rs +++ b/tvix/eval/src/value/string.rs @@ -48,6 +48,12 @@ impl From for NixContext { } } +impl From> for NixContext { + fn from(value: HashSet) -> Self { + Self(value) + } +} + impl NixContext { /// Creates an empty context that can be populated /// and passed to form a contextful [NixString], albeit -- cgit 1.4.1