2022-01-07 04:07:37 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, lib
|
|
|
|
, rustPlatform
|
|
|
|
, rustfmt
|
2022-04-15 01:41:22 +00:00
|
|
|
, protobuf
|
2022-01-07 04:07:37 +00:00
|
|
|
}:
|
|
|
|
let
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "indradb";
|
|
|
|
repo = "indradb";
|
|
|
|
rev = "06134dde5bb53eb1d2aaa52afdaf9ff3bf1aa674";
|
|
|
|
sha256 = "sha256-g4Jam7yxMc+piYQzgMvVsNTF+ce1U3thzYl/M9rKG4o=";
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Graph database written in rust ";
|
2022-01-07 04:07:37 +00:00
|
|
|
homepage = "https://github.com/indradb/indradb";
|
2022-11-04 12:27:35 +00:00
|
|
|
license = licenses.mpl20;
|
2022-01-07 04:07:37 +00:00
|
|
|
maintainers = with maintainers; [ happysalada ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
indradb-server = rustPlatform.buildRustPackage {
|
|
|
|
pname = "indradb-server";
|
|
|
|
version = "unstable-2021-01-05";
|
2022-11-04 12:27:35 +00:00
|
|
|
inherit src meta;
|
2022-01-07 04:07:37 +00:00
|
|
|
|
|
|
|
cargoSha256 = "sha256-3WtiW31AkyNX7HiT/zqfNo2VSKR7Q57/wCigST066Js=";
|
|
|
|
|
|
|
|
buildAndTestSubdir = "server";
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
PROTOC = "${protobuf}/bin/protoc";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ rustfmt rustPlatform.bindgenHook ];
|
2022-01-07 04:07:37 +00:00
|
|
|
|
|
|
|
# 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";
|
2022-11-04 12:27:35 +00:00
|
|
|
inherit src meta;
|
2022-01-07 04:07:37 +00:00
|
|
|
|
|
|
|
cargoSha256 = "sha256-pxan6W/CEsOxv8DbbytEBuIqxWn/C4qT4ze/RnvESOM=";
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
PROTOC = "${protobuf}/bin/protoc";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ rustfmt rustPlatform.bindgenHook ];
|
2022-01-07 04:07:37 +00:00
|
|
|
|
|
|
|
buildAndTestSubdir = "client";
|
|
|
|
};
|
|
|
|
}
|