13 rustPlatform.buildRustPackage rec {
14 pname = "matrix-conduit";
17 src = fetchFromGitLab {
21 hash = "sha256-/qKPeE2Ptweaf+rHOvdW0TUDLwN9D93MMgDoU4fTzEA=";
24 # We have to use importCargoLock here because `cargo vendor` currently doesn't support workspace
25 # inheritance within Git dependencies, but importCargoLock does.
27 lockFile = ./Cargo.lock;
29 "ruma-0.10.1" = "sha256-I1mTeJLo+pgIqFkn1D2De/oACQPkUELjGdyGf3MVuLQ=";
33 # Conduit enables rusqlite's bundled feature by default, but we'd rather use our copy of SQLite.
35 substituteInPlace Cargo.toml --replace "features = [\"bundled\"]" "features = []"
36 cargo update --offline -p rusqlite
40 rustPlatform.bindgenHook
47 ] ++ lib.optionals stdenv.isDarwin [
48 darwin.apple_sdk.frameworks.Security
49 darwin.apple_sdk.frameworks.SystemConfiguration
53 ROCKSDB_INCLUDE_DIR = "${rocksdb}/include";
54 ROCKSDB_LIB_DIR = "${rocksdb}/lib";
57 # tests failed on x86_64-darwin with SIGILL: illegal instruction
58 doCheck = !(stdenv.isx86_64 && stdenv.isDarwin);
61 inherit (nixosTests) matrix-conduit;
65 description = "Matrix homeserver written in Rust";
66 homepage = "https://conduit.rs/";
67 license = licenses.asl20;
68 maintainers = with maintainers; [ pstn pimeys ];
69 mainProgram = "conduit";