about summary refs log tree commit diff
path: root/pkgs/development/tools/database/indradb/default.nix
diff options
context:
space:
mode:
authorRaphael Megzari <raphael@megzari.com>2022-01-06 11:13:57 -0500
committerGitHub <noreply@github.com>2022-01-07 01:13:57 +0900
commit9a4b481cdcb88c8717c7f9a9471b5987af488f02 (patch)
treea13451da05adafc6e84dca1cbf1bf728e1af3d57 /pkgs/development/tools/database/indradb/default.nix
parent6bd037655765bebd759f78fb9e209b7eb98303a4 (diff)
indradb: init at unstable-2021-01-05 (#153637)
Diffstat (limited to 'pkgs/development/tools/database/indradb/default.nix')
-rw-r--r--pkgs/development/tools/database/indradb/default.nix51
1 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/development/tools/database/indradb/default.nix b/pkgs/development/tools/database/indradb/default.nix
new file mode 100644
index 0000000000000..f577963e8f4b8
--- /dev/null
+++ b/pkgs/development/tools/database/indradb/default.nix
@@ -0,0 +1,51 @@
+{ stdenv
+, fetchFromGitHub
+, lib
+, rustPlatform
+, rustfmt
+}:
+let
+  src = fetchFromGitHub {
+    owner = "indradb";
+    repo = "indradb";
+    rev = "06134dde5bb53eb1d2aaa52afdaf9ff3bf1aa674";
+    sha256 = "sha256-g4Jam7yxMc+piYQzgMvVsNTF+ce1U3thzYl/M9rKG4o=";
+  };
+
+  meta = with lib; {
+    description = "A graph database written in rust ";
+    homepage = "https://github.com/indradb/indradb";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ happysalada ];
+    platforms = platforms.unix;
+  };
+in
+{
+  indradb-server = rustPlatform.buildRustPackage {
+    pname = "indradb-server";
+    version = "unstable-2021-01-05";
+    inherit src;
+
+    cargoSha256 = "sha256-3WtiW31AkyNX7HiT/zqfNo2VSKR7Q57/wCigST066Js=";
+
+    buildAndTestSubdir = "server";
+
+    nativeBuildInputs = [ rustfmt ];
+
+    # test rely on libindradb and it can't be found
+    # failure at https://github.com/indradb/indradb/blob/master/server/tests/plugins.rs#L63
+    # `let _server = Server::start(&format!("../target/debug/libindradb_plugin_*.{}", LIBRARY_EXTENSION)).unwrap();`
+    doCheck = false;
+  };
+  indradb-client = rustPlatform.buildRustPackage {
+    pname = "indradb-client";
+    version = "unstable-2021-01-05";
+    inherit src;
+
+    cargoSha256 = "sha256-pxan6W/CEsOxv8DbbytEBuIqxWn/C4qT4ze/RnvESOM=";
+
+    nativeBuildInputs = [ rustfmt ];
+
+    buildAndTestSubdir = "client";
+  };
+}