python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / libraries / mtxclient / default.nix
blob7f4585c640e1a5ec68039190afe14074488910f9
1 { lib, stdenv
2 , fetchFromGitHub
3 , fetchpatch
4 , cmake
5 , pkg-config
6 , openssl
7 , olm
8 , spdlog
9 , nlohmann_json
10 , coeurl
11 , libevent
12 , curl
15 stdenv.mkDerivation rec {
16   pname = "mtxclient";
17   version = "0.8.2";
19   src = fetchFromGitHub {
20     owner = "Nheko-Reborn";
21     repo = "mtxclient";
22     rev = "v${version}";
23     sha256 = "sha256-x2c+wZWAWYoKxSqEezoInw3SwcGo9dQNDvuq7racLBA=";
24   };
26   postPatch = ''
27     # See https://github.com/gabime/spdlog/issues/1897
28     sed -i '1a add_compile_definitions(SPDLOG_FMT_EXTERNAL)' CMakeLists.txt
29   '';
31   cmakeFlags = [
32     # Network requiring tests can't be disabled individually:
33     # https://github.com/Nheko-Reborn/mtxclient/issues/22
34     "-DBUILD_LIB_TESTS=OFF"
35     "-DBUILD_LIB_EXAMPLES=OFF"
36   ];
38   nativeBuildInputs = [
39     cmake
40     pkg-config
41   ];
42   buildInputs = [
43     spdlog
44     nlohmann_json
45     openssl
46     olm
47     coeurl
48     libevent
49     curl
50   ];
52   meta = with lib; {
53     description = "Client API library for the Matrix protocol.";
54     homepage = "https://github.com/Nheko-Reborn/mtxclient";
55     license = licenses.mit;
56     maintainers = with maintainers; [ fpletz pstn ];
57     platforms = platforms.all;
58     # Should be fixable if a higher clang version is used, see:
59     # https://github.com/NixOS/nixpkgs/pull/85922#issuecomment-619287177
60     broken = stdenv.targetPlatform.isDarwin;
61   };