about summary refs log tree commit diff
path: root/tvix/tools/crunch-v2/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/tools/crunch-v2/default.nix')
-rw-r--r--tvix/tools/crunch-v2/default.nix20
1 files changed, 9 insertions, 11 deletions
diff --git a/tvix/tools/crunch-v2/default.nix b/tvix/tools/crunch-v2/default.nix
index 689e86be6559..a3eb25eb9ad6 100644
--- a/tvix/tools/crunch-v2/default.nix
+++ b/tvix/tools/crunch-v2/default.nix
@@ -1,15 +1,13 @@
-{ pkgs, ... }:
+{ pkgs, depot, lib, ... }:
 
-let
-  crates = import ./Cargo.nix {
-    inherit pkgs;
-    nixpkgs = pkgs.path;
-
-    defaultCrateOverrides = pkgs.defaultCrateOverrides // {
-      crunch-v2 = prev: {
-        nativeBuildInputs = (prev.nativeBuildInputs or [ ]) ++ [ pkgs.buildPackages.protobuf ];
+(pkgs.callPackage ./Cargo.nix {
+  defaultCrateOverrides = (depot.tvix.utils.defaultCrateOverridesForPkgs pkgs) // {
+    crunch-v2 = prev: {
+      src = depot.tvix.utils.filterRustCrateSrc rec {
+        root = prev.src.origSrc;
+        extraFileset = lib.fileset.fileFilter (f: f.hasExt "proto") root;
       };
+      nativeBuildInputs = [ pkgs.protobuf ];
     };
   };
-in
-crates.rootCrate.build
+}).rootCrate.build