From c432aae9b3a4924baa8b76cdc6f052f6fe70b730 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Fri, 11 Nov 2022 22:48:24 +0000 Subject: feat(tvix/store): init Change-Id: Id846647fa456ff8b187ed4f16d035ce030f11d25 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7264 Tested-by: BuildkiteCI Reviewed-by: sterni Reviewed-by: tazjin --- tvix/store/Cargo.lock | 7 +++++++ tvix/store/Cargo.toml | 6 ++++++ tvix/store/default.nix | 19 +++++++++++++++++++ tvix/store/src/main.rs | 3 +++ 4 files changed, 35 insertions(+) create mode 100644 tvix/store/Cargo.lock create mode 100644 tvix/store/Cargo.toml create mode 100644 tvix/store/default.nix create mode 100644 tvix/store/src/main.rs (limited to 'tvix/store') diff --git a/tvix/store/Cargo.lock b/tvix/store/Cargo.lock new file mode 100644 index 000000000000..dfe8db7839ca --- /dev/null +++ b/tvix/store/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "tvix-store" +version = "0.1.0" diff --git a/tvix/store/Cargo.toml b/tvix/store/Cargo.toml new file mode 100644 index 000000000000..83e2de8d4241 --- /dev/null +++ b/tvix/store/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "tvix-store" +version = "0.1.0" +edition = "2021" + +[dependencies] diff --git a/tvix/store/default.nix b/tvix/store/default.nix new file mode 100644 index 000000000000..4ec94cd90d9a --- /dev/null +++ b/tvix/store/default.nix @@ -0,0 +1,19 @@ +{ depot, pkgs, lib, ... }: + +let + protoRoot = depot.nix.sparseTree depot.path.origSrc [ + ./protos/castore.proto + ./protos/pathinfo.proto + ]; +in +depot.third_party.naersk.buildPackage { + src = depot.third_party.gitignoreSource ./.; + # see https://github.com/nix-community/naersk/issues/169 + root = depot.nix.sparseTree ./. [ ./Cargo.lock ./Cargo.toml ]; + + nativeBuildInputs = [ pkgs.protobuf ]; + + PROTO_ROOT = protoRoot; + + doCheck = true; +} diff --git a/tvix/store/src/main.rs b/tvix/store/src/main.rs new file mode 100644 index 000000000000..e7a11a969c03 --- /dev/null +++ b/tvix/store/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} -- cgit 1.4.1