about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2022-11-11T22·48+0000
committerflokli <flokli@flokli.de>2022-12-04T10·41+0000
commitc432aae9b3a4924baa8b76cdc6f052f6fe70b730 (patch)
tree51ce02a8caa241eaf857d872136e0b3064be3c58
parent12413a669f96311cd83fe855c5e14e45abbe6754 (diff)
feat(tvix/store): init r/5384
Change-Id: Id846647fa456ff8b187ed4f16d035ce030f11d25
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7264
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: tazjin <tazjin@tvl.su>
-rw-r--r--tvix/store/Cargo.lock7
-rw-r--r--tvix/store/Cargo.toml6
-rw-r--r--tvix/store/default.nix19
-rw-r--r--tvix/store/src/main.rs3
4 files changed, 35 insertions, 0 deletions
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!");
+}