about summary refs log tree commit diff
path: root/users/Profpatsch/git-db/default.nix
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2021-04-19T20·49+0200
committerProfpatsch <mail@profpatsch.de>2021-12-26T16·34+0000
commitc1d7714a212e80756e8f1b83cbc7f077dedb7abd (patch)
treef1d9c25ba9734f06be29fbe2265756180f43f879 /users/Profpatsch/git-db/default.nix
parent38b3cdebef59f3eebf9ded815631db8cb6ee5b98 (diff)
feat(users/Profpatsch): add git-db r/3423
WIP: currently just a simple setup that creates an empty git repo if
it doesn’t exist yet, and writes a commit to it.

A simple database backed by a bare git repository.

WIP: Will speak a simple interactive protocol to query files and
update them atomically.

It could be made atomic on the git repo level, if a lock is taken
between reading the current commit ref and creating the commit.

Change-Id: I1fd30a046ac977063c3e08c36d96e835b35ff07d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3046
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Diffstat (limited to 'users/Profpatsch/git-db/default.nix')
-rw-r--r--users/Profpatsch/git-db/default.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/users/Profpatsch/git-db/default.nix b/users/Profpatsch/git-db/default.nix
new file mode 100644
index 000000000000..7c6f1aee7c5c
--- /dev/null
+++ b/users/Profpatsch/git-db/default.nix
@@ -0,0 +1,8 @@
+{ depot, pkgs, lib, ... }:
+
+depot.nix.writers.rustSimple {
+  name = "git-db";
+  dependencies = [
+    depot.third_party.rust-crates.git2
+  ];
+} (builtins.readFile ./git-db.rs)