diff --git a/tvix/eval/src/builtins/mod.rs b/tvix/eval/src/builtins/mod.rs index 62684b824..4bdce300a 100644 --- a/tvix/eval/src/builtins/mod.rs +++ b/tvix/eval/src/builtins/mod.rs @@ -377,6 +377,15 @@ mod pure_builtins { toml::from_str(&toml_str).map_err(|err| err.into()) } + #[builtin("filterSource")] + #[allow(non_snake_case)] + async fn builtin_filterSource(_co: GenCo, #[lazy] _e: Value) -> Result { + // TODO: implement for nixpkgs compatibility + Ok(Value::Catchable(CatchableErrorKind::UnimplementedFeature( + "filterSource".to_string(), + ))) + } + #[builtin("genericClosure")] async fn builtin_generic_closure(co: GenCo, input: Value) -> Result { let attrs = input.to_attrs()?; @@ -1084,6 +1093,14 @@ pub fn pure_builtins() -> Vec<(&'static str, Value)> { crate::systems::llvm_triple_to_nix_double(CURRENT_PLATFORM).into(), )); + // TODO: implement for nixpkgs compatibility + result.push(( + "__curPos", + Value::Catchable(CatchableErrorKind::UnimplementedFeature( + "__curPos".to_string(), + )), + )); + result } diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs index f6d6ca7c0..f54dc8ba4 100644 --- a/tvix/eval/src/compiler/mod.rs +++ b/tvix/eval/src/compiler/mod.rs @@ -147,6 +147,7 @@ const GLOBAL_BUILTINS: &[&str] = &[ "scopedImport", "throw", "toString", + "__curPos", ]; pub struct Compiler<'observer> { diff --git a/tvix/eval/src/errors.rs b/tvix/eval/src/errors.rs index a61d55aa2..23905e438 100644 --- a/tvix/eval/src/errors.rs +++ b/tvix/eval/src/errors.rs @@ -42,6 +42,7 @@ use crate::{SourceCode, Value}; pub enum CatchableErrorKind { Throw(String), AssertionFailed, + UnimplementedFeature(String), /// Resolving a user-supplied angle brackets path literal failed in some way. NixPathResolution(String), }