2023-04-28 07:48:27 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, cmake, olm, openssl, qtbase, qtmultimedia, qtkeychain }:
|
2020-04-10 01:38:20 +00:00
|
|
|
|
2023-04-28 07:48:27 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-10 01:38:20 +00:00
|
|
|
pname = "libquotient";
|
2023-09-17 22:51:04 +00:00
|
|
|
version = "0.8.1.2";
|
2020-04-10 01:38:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "quotient-im";
|
|
|
|
repo = "libQuotient";
|
|
|
|
rev = version;
|
2023-09-17 22:51:04 +00:00
|
|
|
hash = "sha256-qJTikc42sFUlb4g0sAEg6v9d4k1lhbn3MZPvghm56E8=";
|
2020-04-10 01:38:20 +00:00
|
|
|
};
|
|
|
|
|
2023-04-28 07:48:27 +00:00
|
|
|
buildInputs = [ olm openssl qtbase qtmultimedia qtkeychain ];
|
2020-04-10 01:38:20 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2023-01-21 01:26:04 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DQuotient_ENABLE_E2EE=ON"
|
|
|
|
];
|
|
|
|
|
2022-05-17 12:37:24 +00:00
|
|
|
# https://github.com/quotient-im/libQuotient/issues/551
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Quotient.pc.in \
|
|
|
|
--replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
|
|
|
|
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
|
|
|
|
'';
|
|
|
|
|
2023-04-28 07:48:27 +00:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2020-04-10 01:38:20 +00:00
|
|
|
meta = with lib; {
|
2023-01-21 01:26:04 +00:00
|
|
|
description = "A Qt5/Qt6 library to write cross-platform clients for Matrix";
|
2020-04-10 01:38:20 +00:00
|
|
|
homepage = "https://matrix.org/docs/projects/sdk/quotient";
|
|
|
|
license = licenses.lgpl21;
|
2023-08-08 20:47:27 +00:00
|
|
|
maintainers = with maintainers; [ colemickens matthiasbeyer ];
|
2020-04-10 01:38:20 +00:00
|
|
|
};
|
|
|
|
}
|