nixpkgs/pkgs/servers/matrix-conduit/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
1.4 KiB
Nix
Raw Normal View History

{ lib, rustPlatform, fetchFromGitLab, stdenv, darwin, nixosTests, rocksdb_6_23 }:
2021-09-02 09:23:48 +00:00
rustPlatform.buildRustPackage rec {
pname = "matrix-conduit";
2023-01-20 00:40:29 +00:00
version = "0.5.0";
2021-09-02 09:23:48 +00:00
src = fetchFromGitLab {
owner = "famedly";
repo = "conduit";
rev = "v${version}";
2023-01-20 00:40:29 +00:00
sha256 = "sha256-GSCpmn6XRbmnfH31R9c6QW3/pez9KHPjI99dR+ln0P4=";
2021-09-02 09:23:48 +00:00
};
2023-01-20 00:40:29 +00:00
# https://github.com/rust-lang/cargo/issues/11192
# https://github.com/ruma/ruma/issues/1441
postPatch = ''
pushd $cargoDepsCopy
patch -p0 < ${./cargo-11192-workaround.patch}
for p in ruma*; do echo '{"files":{},"package":null}' > $p/.cargo-checksum.json; done
popd
'';
cargoSha256 = "sha256-WFoupcuaG7f7KYBn/uzbOzlHHLurOyvm5e1lEcinxC8=";
2022-02-04 20:04:21 +00:00
nativeBuildInputs = [
rustPlatform.bindgenHook
2022-02-04 20:04:21 +00:00
];
buildInputs = lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
2022-02-04 20:04:21 +00:00
];
ROCKSDB_INCLUDE_DIR = "${rocksdb_6_23}/include";
ROCKSDB_LIB_DIR = "${rocksdb_6_23}/lib";
# tests failed on x86_64-darwin with SIGILL: illegal instruction
doCheck = !(stdenv.isx86_64 && stdenv.isDarwin);
2021-09-02 09:23:48 +00:00
passthru.tests = {
inherit (nixosTests) matrix-conduit;
};
2021-09-02 09:23:48 +00:00
meta = with lib; {
description = "A Matrix homeserver written in Rust";
homepage = "https://conduit.rs/";
license = licenses.asl20;
maintainers = with maintainers; [ pstn piegames pimeys ];
mainProgram = "conduit";
2021-09-02 09:23:48 +00:00
};
}