nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6 pkg-config,
7 coeurl,
8 curl,
9 libevent,
10 nlohmann_json,
11 olm,
12 openssl,
13 re2,
14 spdlog,
15 gtest,
16}:
17
18stdenv.mkDerivation (finalAttrs: {
19 pname = "mtxclient";
20 version = "0.10.1";
21
22 src = fetchFromGitHub {
23 owner = "Nheko-Reborn";
24 repo = "mtxclient";
25 rev = "v${finalAttrs.version}";
26 hash = "sha256-Y0FMCq4crSbm0tJtYq04ZFwWw+vlfxXKXBo0XUgf7hw=";
27 };
28
29 patches = [
30 ./remove-network-tests.patch
31 ];
32
33 cmakeFlags = [
34 (lib.cmakeBool "BUILD_LIB_TESTS" finalAttrs.finalPackage.doCheck)
35 (lib.cmakeBool "BUILD_LIB_EXAMPLES" false)
36 ];
37
38 nativeBuildInputs = [
39 cmake
40 pkg-config
41 ];
42
43 buildInputs = [
44 coeurl
45 curl
46 libevent
47 nlohmann_json
48 olm
49 openssl
50 re2
51 spdlog
52 ];
53
54 checkInputs = [ gtest ];
55
56 doCheck = true;
57
58 meta = {
59 description = "Client API library for the Matrix protocol";
60 homepage = "https://github.com/Nheko-Reborn/mtxclient";
61 license = lib.licenses.mit;
62 maintainers = with lib.maintainers; [
63 fpletz
64 pstn
65 rebmit
66 rnhmjoj
67 ];
68 platforms = lib.platforms.all;
69 };
70})