tvl-depot/tvix/store/default.nix
Florian Klink 2e04f68df8 feat(tvix/proto): add rpc_directory.proto
This provides an interface to retrieve and upload single Directory
messages, or a DAG of them.

Change-Id: Id9e7084bd697d843649a122da2c992a3e36d808c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7137
Tested-by: BuildkiteCI
Reviewed-by: Adam Joseph <adam@westernsemico.com>
2022-12-22 14:35:32 +00:00

30 lines
750 B
Nix

{ depot, pkgs, ... }:
let
protoRoot = depot.nix.sparseTree depot.path.origSrc [
./protos/castore.proto
./protos/pathinfo.proto
./protos/rpc_blobstore.proto
./protos/rpc_directory.proto
./protos/rpc_pathinfo.proto
];
protobufDep = prev: (prev.nativeBuildInputs or [ ]) ++ [ pkgs.protobuf ];
in
depot.tvix.crates.workspaceMembers.tvix-store.build.override {
# Ensure protobuf dependencies are available.
# TODO: figure out a way to embed this directly in the //tvix
# crate2nix config.
crateOverrides = {
prost-build = prev: {
nativeBuildInputs = protobufDep prev;
};
tvix-store = prev: {
PROTO_ROOT = protoRoot;
nativeBuildInputs = protobufDep prev;
};
};
runTests = true;
}