nixpkgs/pkgs/development/libraries/mtxclient/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

63 lines
1.3 KiB
Nix
Raw Normal View History

{ lib, stdenv
2020-04-30 06:57:48 +00:00
, fetchFromGitHub
, fetchpatch
, cmake
, pkg-config
2020-04-30 06:57:48 +00:00
, openssl
, olm
2020-04-24 08:09:33 +00:00
, spdlog
2020-04-30 06:57:48 +00:00
, nlohmann_json
2021-11-19 10:27:11 +00:00
, coeurl
, libevent
, curl
2020-04-30 06:57:48 +00:00
}:
2018-09-09 20:12:52 +00:00
stdenv.mkDerivation rec {
pname = "mtxclient";
2022-09-10 01:14:29 +00:00
version = "0.8.2";
2018-09-09 20:12:52 +00:00
src = fetchFromGitHub {
owner = "Nheko-Reborn";
2018-09-09 20:12:52 +00:00
repo = "mtxclient";
rev = "v${version}";
2022-09-10 01:14:29 +00:00
sha256 = "sha256-x2c+wZWAWYoKxSqEezoInw3SwcGo9dQNDvuq7racLBA=";
2018-09-09 20:12:52 +00:00
};
2021-11-19 10:27:11 +00:00
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"
];
2020-04-30 06:57:48 +00:00
nativeBuildInputs = [
cmake
pkg-config
2020-04-30 06:57:48 +00:00
];
buildInputs = [
2020-04-24 08:09:33 +00:00
spdlog
2021-11-19 10:27:11 +00:00
nlohmann_json
2020-04-30 06:57:48 +00:00
openssl
olm
2021-11-19 10:27:11 +00:00
coeurl
libevent
curl
2020-04-30 06:57:48 +00:00
];
2018-09-09 20:12:52 +00:00
meta = with lib; {
2021-11-19 10:27:11 +00:00
description = "Client API library for the Matrix protocol.";
homepage = "https://github.com/Nheko-Reborn/mtxclient";
2018-09-09 20:12:52 +00:00
license = licenses.mit;
maintainers = with maintainers; [ fpletz pstn ];
platforms = platforms.all;
# Should be fixable if a higher clang version is used, see:
# https://github.com/NixOS/nixpkgs/pull/85922#issuecomment-619287177
broken = stdenv.targetPlatform.isDarwin;
2018-09-09 20:12:52 +00:00
};
}