Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

66 lines
1.4 KiB
Nix

{
lib,
rustPlatform,
fetchFromGitLab,
pkg-config,
sqlite,
stdenv,
nixosTests,
rocksdb,
rust-jemalloc-sys,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "matrix-conduit";
version = "0.10.9";
src = fetchFromGitLab {
owner = "famedly";
repo = "conduit";
tag = "v${finalAttrs.version}";
hash = "sha256-rJyuR8Ie/JiNKNjQL21+Q1PWliEAm+lwGraGeDxEHyY=";
};
cargoHash = "sha256-4ZA+3f8Kt+1JAm9KXnMRxAF+X9z8HSJoJe6Ny63SlnA=";
# Conduit enables rusqlite's bundled feature by default, but we'd rather use our copy of SQLite.
preBuild = ''
substituteInPlace Cargo.toml --replace-fail "features = [\"bundled\"]" "features = []"
cargo update --offline -p rusqlite
'';
nativeBuildInputs = [
rustPlatform.bindgenHook
pkg-config
];
buildInputs = [
sqlite
rust-jemalloc-sys
rocksdb
];
env = {
ROCKSDB_INCLUDE_DIR = "${rocksdb}/include";
ROCKSDB_LIB_DIR = "${rocksdb}/lib";
};
# tests failed on x86_64-darwin with SIGILL: illegal instruction
doCheck = !(stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isDarwin);
passthru.tests = {
inherit (nixosTests) matrix-conduit;
};
meta = {
description = "Matrix homeserver written in Rust";
homepage = "https://conduit.rs/";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
pstn
SchweGELBin
];
mainProgram = "conduit";
};
})