about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tvix/utils.nix10
-rw-r--r--web/tvixbolt/default.nix2
2 files changed, 7 insertions, 5 deletions
diff --git a/tvix/utils.nix b/tvix/utils.nix
index 5edc1dc2e856..0bb9323d684d 100644
--- a/tvix/utils.nix
+++ b/tvix/utils.nix
@@ -22,21 +22,23 @@
       (powerset features));
 
   # Filters the given source, only keeping files related to the build, preventing unnecessary rebuilds.
-  # Includes src in the root, all other .rs files, as well as Cargo.toml.
+  # Includes src in the root, all other .rs files and optionally Cargo specific files.
   # Additional files to be included can be specified in extraFileset.
   filterRustCrateSrc =
     { root # The original src
     , extraFileset ? null # Additional filesets to include (e.g. fileFilter for proto files)
+    , cargoSupport ? false
     }:
     lib.fileset.toSource {
       inherit root;
-      fileset = (lib.fileset.intersection
+      fileset = lib.fileset.intersection
         (lib.fileset.fromSource root) # We build our final fileset from the original src
         (lib.fileset.unions ([
           (root + "/src")
           (lib.fileset.fileFilter (f: f.hasExt "rs") root)
-          # We assume that every Rust crate will at a minimum have .rs files and a Cargo.toml
+        ] ++ lib.optionals cargoSupport [
           (lib.fileset.fileFilter (f: f.name == "Cargo.toml") root)
-        ] ++ lib.optional (extraFileset != null) extraFileset)));
+          (lib.fileset.maybeMissing (root + "/Cargo.lock"))
+        ] ++ lib.optional (extraFileset != null) extraFileset));
     };
 }
diff --git a/web/tvixbolt/default.nix b/web/tvixbolt/default.nix
index 9b6baa582fb0..d0dd8f37c4a7 100644
--- a/web/tvixbolt/default.nix
+++ b/web/tvixbolt/default.nix
@@ -46,7 +46,7 @@ let
 
      [dependencies.tvix-eval]
     -path = "../../tvix/eval"
-    +path = "${depot.tvix.crates.workspaceMembers.tvix-eval.build.src}"
+    +path = "${../../tvix/eval}"
      default-features = false
 
      [dependencies.serde]