Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

matrix-conduit: 0.4.0 -> 0.5.0 #211309

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions pkgs/servers/matrix-conduit/default.nix
Original file line number Diff line number Diff line change
@@ -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'
Comment on lines +19 to +21
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather use a patch here to make the change more obvious and fail if some part does not apply with the next update.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a very good point. I'm with @SuperSandro2000 on this.

for p in ruma*; do echo '{"files":{},"package":null}' > $p/.cargo-checksum.json; done
popd
'';

cargoSha256 = "sha256-WFoupcuaG7f7KYBn/uzbOzlHHLurOyvm5e1lEcinxC8=";

nativeBuildInputs = [
rustPlatform.bindgenHook
Expand All @@ -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);

Expand Down