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