at 23.11-beta 56 lines 1.5 kB view raw
1{ stdenv 2, fetchFromGitHub 3, lib 4, rustPlatform 5, rustfmt 6, protobuf 7}: 8let 9 src = fetchFromGitHub { 10 owner = "indradb"; 11 repo = "indradb"; 12 rev = "06134dde5bb53eb1d2aaa52afdaf9ff3bf1aa674"; 13 sha256 = "sha256-g4Jam7yxMc+piYQzgMvVsNTF+ce1U3thzYl/M9rKG4o="; 14 }; 15 16 meta = with lib; { 17 description = "A graph database written in rust "; 18 homepage = "https://github.com/indradb/indradb"; 19 license = licenses.mpl20; 20 maintainers = with maintainers; [ happysalada ]; 21 platforms = platforms.unix; 22 }; 23in 24{ 25 indradb-server = rustPlatform.buildRustPackage { 26 pname = "indradb-server"; 27 version = "unstable-2021-01-05"; 28 inherit src meta; 29 30 cargoSha256 = "sha256-3WtiW31AkyNX7HiT/zqfNo2VSKR7Q57/wCigST066Js="; 31 32 buildAndTestSubdir = "server"; 33 34 PROTOC = "${protobuf}/bin/protoc"; 35 36 nativeBuildInputs = [ rustfmt rustPlatform.bindgenHook ]; 37 38 # test rely on libindradb and it can't be found 39 # failure at https://github.com/indradb/indradb/blob/master/server/tests/plugins.rs#L63 40 # `let _server = Server::start(&format!("../target/debug/libindradb_plugin_*.{}", LIBRARY_EXTENSION)).unwrap();` 41 doCheck = false; 42 }; 43 indradb-client = rustPlatform.buildRustPackage { 44 pname = "indradb-client"; 45 version = "unstable-2021-01-05"; 46 inherit src meta; 47 48 cargoSha256 = "sha256-pxan6W/CEsOxv8DbbytEBuIqxWn/C4qT4ze/RnvESOM="; 49 50 PROTOC = "${protobuf}/bin/protoc"; 51 52 nativeBuildInputs = [ rustfmt rustPlatform.bindgenHook ]; 53 54 buildAndTestSubdir = "client"; 55 }; 56}