about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/mtxclient
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-01-03 23:55:00 +0000
committerAlyssa Ross <hi@alyssa.is>2022-02-19 11:03:39 +0000
commitf4cf97a04cd5d0b86aa46baec9fb228a8f671c03 (patch)
tree28192415ff39a661d0001563bf81cc93fa25d16d /nixpkgs/pkgs/development/libraries/mtxclient
parentf8422837c9bde058e8f2de37702e7e94b2226040 (diff)
parent18c84ea816348e2a098390101b92d1e39a9dbd45 (diff)
downloadnixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar
nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar.gz
nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar.bz2
nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar.lz
nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar.xz
nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.tar.zst
nixlib-f4cf97a04cd5d0b86aa46baec9fb228a8f671c03.zip
Merge commit '18c84ea816348e2a098390101b92d1e39a9dbd45'
Conflicts:
	nixpkgs/nixos/modules/misc/documentation.nix
	nixpkgs/pkgs/applications/networking/browsers/firefox/packages.nix
	nixpkgs/pkgs/applications/window-managers/sway/default.nix
	nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
	nixpkgs/pkgs/development/go-modules/generic/default.nix
	nixpkgs/pkgs/development/interpreters/ruby/default.nix
	nixpkgs/pkgs/development/interpreters/ruby/patchsets.nix
	nixpkgs/pkgs/development/libraries/boehm-gc/7.6.6.nix
	nixpkgs/pkgs/development/python-modules/django-mailman3/default.nix
	nixpkgs/pkgs/servers/mail/mailman/web.nix
	nixpkgs/pkgs/top-level/aliases.nix
	nixpkgs/pkgs/top-level/all-packages.nix
	nixpkgs/pkgs/top-level/impure.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/mtxclient')
-rw-r--r--nixpkgs/pkgs/development/libraries/mtxclient/default.nix24
-rw-r--r--nixpkgs/pkgs/development/libraries/mtxclient/fix-compilation-with-olm-3.2.5.patch22
2 files changed, 37 insertions, 9 deletions
diff --git a/nixpkgs/pkgs/development/libraries/mtxclient/default.nix b/nixpkgs/pkgs/development/libraries/mtxclient/default.nix
index 05950bc68654..4e5eed1e4391 100644
--- a/nixpkgs/pkgs/development/libraries/mtxclient/default.nix
+++ b/nixpkgs/pkgs/development/libraries/mtxclient/default.nix
@@ -3,33 +3,36 @@
 , fetchpatch
 , cmake
 , pkg-config
-, boost17x
 , openssl
 , olm
 , spdlog
 , nlohmann_json
+, coeurl
+, libevent
+, curl
 }:
 
 stdenv.mkDerivation rec {
   pname = "mtxclient";
-  version = "0.5.1";
+  version = "0.6.1";
 
   src = fetchFromGitHub {
     owner = "Nheko-Reborn";
     repo = "mtxclient";
     rev = "v${version}";
-    sha256 = "sha256-UKroV1p7jYuNzCAFMsuUsYC/C9AZ1D4rhwpwuER39vc=";
+    sha256 = "sha256-hTB0a5KXcQb0MCEX9YonDJOGlTmRkrOIP9UFlwuJc6g=";
   };
 
+  postPatch = ''
+    # See https://github.com/gabime/spdlog/issues/1897
+    sed -i '1a add_compile_definitions(SPDLOG_FMT_EXTERNAL)' CMakeLists.txt
+  '';
+
   cmakeFlags = [
     # Network requiring tests can't be disabled individually:
     # https://github.com/Nheko-Reborn/mtxclient/issues/22
     "-DBUILD_LIB_TESTS=OFF"
     "-DBUILD_LIB_EXAMPLES=OFF"
-    "-Dnlohmann_json_DIR=${nlohmann_json}/lib/cmake/nlohmann_json"
-    # Can be removed once either https://github.com/NixOS/nixpkgs/pull/85254 or
-    # https://github.com/NixOS/nixpkgs/pull/73940 are merged
-    "-DBoost_NO_BOOST_CMAKE=TRUE"
   ];
 
   nativeBuildInputs = [
@@ -38,13 +41,16 @@ stdenv.mkDerivation rec {
   ];
   buildInputs = [
     spdlog
-    boost17x
+    nlohmann_json
     openssl
     olm
+    coeurl
+    libevent
+    curl
   ];
 
   meta = with lib; {
-    description = "Client API library for Matrix, built on top of Boost.Asio";
+    description = "Client API library for the Matrix protocol.";
     homepage = "https://github.com/Nheko-Reborn/mtxclient";
     license = licenses.mit;
     maintainers = with maintainers; [ fpletz pstn ];
diff --git a/nixpkgs/pkgs/development/libraries/mtxclient/fix-compilation-with-olm-3.2.5.patch b/nixpkgs/pkgs/development/libraries/mtxclient/fix-compilation-with-olm-3.2.5.patch
new file mode 100644
index 000000000000..02337d56f1ff
--- /dev/null
+++ b/nixpkgs/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<OlmErrorCode>(i);
++			return static_cast<mtx::crypto::OlmErrorCode>(i);
+         }
+ 
+-        return OlmErrorCode::UNKNOWN_ERROR;
++        return mtx::crypto::OlmErrorCode::UNKNOWN_ERROR;
+ }
+ 
+ void