From 8473168bef1dfe142d12189366eef85fc59ba585 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sun, 9 Sep 2018 22:12:52 +0200 Subject: [PATCH] mtxclient: init at 0.1.0 --- .../libraries/mtxclient/default.nix | 31 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/development/libraries/mtxclient/default.nix diff --git a/pkgs/development/libraries/mtxclient/default.nix b/pkgs/development/libraries/mtxclient/default.nix new file mode 100644 index 000000000000..465a70576356 --- /dev/null +++ b/pkgs/development/libraries/mtxclient/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchFromGitHub, cmake, pkgconfig +, boost, openssl, zlib, libsodium, olm, gtest, spdlog, nlohmann_json }: + +stdenv.mkDerivation rec { + name = "mtxclient-${version}"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "mujx"; + repo = "mtxclient"; + rev = "v${version}"; + sha256 = "0i58y45diysayjzy5ick15356972z67dfxm0w41ay88nm42x1imp"; + }; + + postPatch = '' + ln -s ${nlohmann_json}/include/nlohmann/json.hpp include/json.hpp + ''; + + cmakeFlags = [ "-DBUILD_LIB_TESTS=OFF" "-DBUILD_LIB_EXAMPLES=OFF" ]; + + nativeBuildInputs = [ cmake pkgconfig ]; + buildInputs = [ boost openssl zlib libsodium olm ]; + + meta = with stdenv.lib; { + description = "Client API library for Matrix, built on top of Boost.Asio"; + homepage = https://github.com/mujx/mtxclient; + license = licenses.mit; + maintainers = with maintainers; [ fpletz ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cc71d5ec6892..a7f3f7b05679 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11244,6 +11244,8 @@ with pkgs; mtpfs = callPackage ../tools/filesystems/mtpfs { }; + mtxclient = callPackage ../development/libraries/mtxclient { }; + mu = callPackage ../tools/networking/mu { texinfo = texinfo4; };