diff --git a/pkgs/development/libraries/mtxclient/default.nix b/pkgs/development/libraries/mtxclient/default.nix index 05950bc68654..0c373604e46e 100644 --- a/pkgs/development/libraries/mtxclient/default.nix +++ b/pkgs/development/libraries/mtxclient/default.nix @@ -21,6 +21,9 @@ stdenv.mkDerivation rec { sha256 = "sha256-UKroV1p7jYuNzCAFMsuUsYC/C9AZ1D4rhwpwuER39vc="; }; + # This patch should be obsolete and should stop applying the in next release. + patches = [ ./fix-compilation-with-olm-3.2.5.patch ]; + cmakeFlags = [ # Network requiring tests can't be disabled individually: # https://github.com/Nheko-Reborn/mtxclient/issues/22 diff --git a/pkgs/development/libraries/mtxclient/fix-compilation-with-olm-3.2.5.patch b/pkgs/development/libraries/mtxclient/fix-compilation-with-olm-3.2.5.patch new file mode 100644 index 000000000000..02337d56f1ff --- /dev/null +++ b/pkgs/development/libraries/mtxclient/fix-compilation-with-olm-3.2.5.patch @@ -0,0 +1,22 @@ +diff -Naur old/lib/crypto/client.cpp c5pf6ygk9v9rdwwr3dyd24wghflp0vmx-source/lib/crypto/client.cpp +--- old/lib/crypto/client.cpp 2021-10-22 19:31:52.159836190 +0300 ++++ c5pf6ygk9v9rdwwr3dyd24wghflp0vmx-source/lib/crypto/client.cpp 2021-10-22 19:30:42.882010441 +0300 +@@ -37,15 +37,15 @@ + + }; + +-OlmErrorCode ++mtx::crypto::OlmErrorCode + olm_exception::ec_from_string(std::string_view error) + { + for (size_t i = 0; i < olmErrorStrings.size(); i++) { + if (olmErrorStrings[i] == error) +- return static_cast(i); ++ return static_cast(i); + } + +- return OlmErrorCode::UNKNOWN_ERROR; ++ return mtx::crypto::OlmErrorCode::UNKNOWN_ERROR; + } + + void