about summary refs log tree commit diff
path: root/tvix/store/protos/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/store/protos/default.nix')
-rw-r--r--tvix/store/protos/default.nix21
1 files changed, 8 insertions, 13 deletions
diff --git a/tvix/store/protos/default.nix b/tvix/store/protos/default.nix
index 56345d9338b2..005a2697e5e9 100644
--- a/tvix/store/protos/default.nix
+++ b/tvix/store/protos/default.nix
@@ -1,17 +1,12 @@
-{ depot, pkgs, ... }:
+{ depot, pkgs, lib, ... }:
 let
-  protos = depot.nix.sparseTree {
-    name = "store-protos";
-    root = depot.path.origSrc;
-    paths = [
-      # We need to include castore.proto (only), as it's referred.
-      ../../castore/protos/castore.proto
-      ./pathinfo.proto
-      ./rpc_pathinfo.proto
-      ../../../buf.yaml
-      ../../../buf.gen.yaml
-    ];
-  };
+  protos = lib.sourceByRegex depot.path.origSrc [
+    "buf.yaml"
+    "buf.gen.yaml"
+    # We need to include castore.proto (only), as it's referred.
+    "^tvix(/castore(/protos(/castore\.proto)?)?)?$"
+    "^tvix(/store(/protos(/.*\.proto)?)?)?$"
+  ];
 in
 depot.nix.readTree.drvTargets {
   inherit protos;