tvl-depot/tvix/store/protos/default.nix
Vincent Ambo 3e03e59893 refactor(tvix/store): move protobuf build config one level up
This embeds the build config directly at the point where `Cargo.nix`
is imported, making it transparent to library consumers.

Change-Id: I5586e12f02ed14587c32d9ef7d93f079366fb127
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7780
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2023-01-06 17:57:06 +00:00

12 lines
336 B
Nix

# 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