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.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/tvix/store/protos/default.nix b/tvix/store/protos/default.nix
new file mode 100644
index 000000000000..0ffdcac0418a
--- /dev/null
+++ b/tvix/store/protos/default.nix
@@ -0,0 +1,12 @@
+# Target containing just the proto files.
+
+{ depot, lib, ... }:
+
+let
+  inherit (lib.strings) hasSuffix;
+  inherit (builtins) attrNames filter readDir;
+
+  protoFileNames = filter (hasSuffix ".proto") (attrNames (readDir ./.));
+  protoFiles = map (f: ./. + ("/" + f)) protoFileNames;
+in
+depot.nix.sparseTree depot.path.origSrc protoFiles