about summary refs log tree commit diff
path: root/tvix/glue/src/lib.rs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-11-03T14·40+0200
committerclbot <clbot@tvl.fyi>2023-11-04T15·20+0000
commitc8cc31e07939feb707a60d2616de277f9227d6e6 (patch)
tree0b43d50b8bd1b092b19ceefdce0159fc45d1ae27 /tvix/glue/src/lib.rs
parenta72a1044c29ce41973e0cf81bcee04923f21995f (diff)
refactor(tvix/glue): move builtins into separate directory r/6939
Change-Id: I25b7197458dbfbde8623545dc0a0286eb2744f10
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9911
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Diffstat (limited to 'tvix/glue/src/lib.rs')
-rw-r--r--tvix/glue/src/lib.rs25
1 files changed, 1 insertions, 24 deletions
diff --git a/tvix/glue/src/lib.rs b/tvix/glue/src/lib.rs
index 760e730217ee..6b3de0e23555 100644
--- a/tvix/glue/src/lib.rs
+++ b/tvix/glue/src/lib.rs
@@ -1,32 +1,9 @@
-use std::{cell::RefCell, rc::Rc};
-
-use known_paths::KnownPaths;
-
-pub mod derivation;
-pub mod errors;
+pub mod builtins;
 pub mod known_paths;
 pub mod refscan;
 pub mod tvix_io;
 pub mod tvix_store_io;
 
-/// Adds derivation-related builtins to the passed [tvix_eval::Evaluation].
-///
-/// These are `derivation` and `derivationStrict`.
-///
-/// As they need to interact with `known_paths`, we also need to pass in
-/// `known_paths`.
-pub fn add_derivation_builtins(
-    eval: &mut tvix_eval::Evaluation,
-    known_paths: Rc<RefCell<KnownPaths>>,
-) {
-    eval.builtins
-        .extend(derivation::derivation_builtins(known_paths));
-
-    // Add the actual `builtins.derivation` from compiled Nix code
-    eval.src_builtins
-        .push(("derivation", include_str!("derivation.nix")));
-}
-
 /// Tell the Evaluator to resolve <nix> to the path `/__corepkgs__`,
 /// which has special handling in [tvix_io::TvixIO].
 /// This is used in nixpkgs to import `fetchurl.nix` from `<nix>`.