diff --git a/pkgs/servers/matrix-conduit/default.nix b/pkgs/servers/matrix-conduit/default.nix index 20de61bbc834b..503d81a045a71 100644 --- a/pkgs/servers/matrix-conduit/default.nix +++ b/pkgs/servers/matrix-conduit/default.nix @@ -1,17 +1,29 @@ -{ lib, rustPlatform, fetchFromGitLab, stdenv, darwin, nixosTests }: +{ lib, rustPlatform, fetchFromGitLab, stdenv, darwin, nixosTests, rocksdb_6_23 }: rustPlatform.buildRustPackage rec { pname = "matrix-conduit"; - version = "0.4.0"; + version = "0.5.0"; src = fetchFromGitLab { owner = "famedly"; repo = "conduit"; rev = "v${version}"; - sha256 = "sha256-QTXDIvGz12ZxsWmPiMiJ8mBUWoJ2wnaeTZdXcwBh35o="; + sha256 = "sha256-GSCpmn6XRbmnfH31R9c6QW3/pez9KHPjI99dR+ln0P4="; }; - cargoSha256 = "sha256-vE44I8lQ5VAfZB4WKLRv/xudoZJaFJGTT/UuumTePBU="; + # https://github.com/rust-lang/cargo/issues/11192 + # https://github.com/ruma/ruma/issues/1441 + postPatch = '' + pushd $cargoDepsCopy + sed -i ruma*/Cargo.toml \ + -e 's/serde = { workspace = true/serde = { features = [ "derive" ], version = "*"/g' \ + -e 's/tracing = { workspace = true.*/tracing = { version = "*" }/g' \ + -e 's/workspace = true/version = "*"/g' + for p in ruma*; do echo '{"files":{},"package":null}' > $p/.cargo-checksum.json; done + popd + ''; + + cargoSha256 = "sha256-WFoupcuaG7f7KYBn/uzbOzlHHLurOyvm5e1lEcinxC8="; nativeBuildInputs = [ rustPlatform.bindgenHook @@ -21,6 +33,9 @@ rustPlatform.buildRustPackage rec { darwin.apple_sdk.frameworks.Security ]; + 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);