about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tvix/default.nix23
-rw-r--r--tvix/proto/default.nix17
2 files changed, 17 insertions, 23 deletions
diff --git a/tvix/default.nix b/tvix/default.nix
index ac800ce6a1..342508c371 100644
--- a/tvix/default.nix
+++ b/tvix/default.nix
@@ -41,12 +41,12 @@ let
       };
 
       tvix-build = prev: {
-        PROTO_ROOT = depot.tvix.proto;
+        PROTO_ROOT = depot.tvix.build.protos.protos;
         nativeBuildInputs = protobufDep prev;
       };
 
       tvix-castore = prev: {
-        PROTO_ROOT = depot.tvix.proto;
+        PROTO_ROOT = depot.tvix.castore.protos.protos;
         nativeBuildInputs = protobufDep prev;
       };
 
@@ -55,7 +55,7 @@ let
       };
 
       tvix-store = prev: {
-        PROTO_ROOT = depot.tvix.proto;
+        PROTO_ROOT = depot.tvix.store.protos.protos;
         nativeBuildInputs = protobufDep prev;
         # fuse-backend-rs uses DiskArbitration framework to handle mount/unmount on Darwin
         buildInputs = prev.buildInputs or [ ]
@@ -101,9 +101,20 @@ let
     ${depot.tools.depotfmt}/bin/depotfmt Cargo.nix
   '';
 
+  # Target containing *all* tvix proto files.
+  # Useful for workspace-wide cargo invocations (doc, clippy)
+  protos = pkgs.symlinkJoin {
+    name = "tvix-all-protos";
+    paths = [
+      depot.tvix.build.protos.protos
+      depot.tvix.castore.protos.protos
+      depot.tvix.store.protos.protos
+    ];
+  };
+
 in
 {
-  inherit crates crate2nix-generate;
+  inherit crates crate2nix-generate protos;
 
   # Run crate2nix generate, ensure the output doesn't differ afterwards
   # (and doesn't fail).
@@ -179,7 +190,7 @@ in
   rust-docs = pkgs.stdenv.mkDerivation {
     inherit cargoDeps src;
     name = "tvix-rust-docs";
-    PROTO_ROOT = depot.tvix.proto;
+    PROTO_ROOT = protos;
 
     nativeBuildInputs = with pkgs; [
       cargo
@@ -204,7 +215,7 @@ in
   clippy = pkgs.stdenv.mkDerivation {
     inherit cargoDeps src;
     name = "tvix-clippy";
-    PROTO_ROOT = depot.tvix.proto;
+    PROTO_ROOT = protos;
 
     buildInputs = [
       pkgs.fuse
diff --git a/tvix/proto/default.nix b/tvix/proto/default.nix
deleted file mode 100644
index 934a73fe33..0000000000
--- a/tvix/proto/default.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-# Target containing just the proto files used in tvix
-
-{ depot, lib, ... }:
-
-depot.nix.sparseTree {
-  name = "tvix-protos";
-  root = depot.path.origSrc;
-  paths = [
-    ../build/protos/build.proto
-    ../build/protos/rpc_build.proto
-    ../castore/protos/castore.proto
-    ../castore/protos/rpc_blobstore.proto
-    ../castore/protos/rpc_directory.proto
-    ../store/protos/pathinfo.proto
-    ../store/protos/rpc_pathinfo.proto
-  ];
-}