2023-05-24 13:37:59 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, cmake, olm, openssl, qtbase, qtmultimedia, qtkeychain }:
|
2020-05-03 17:38:23 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
let
|
|
|
|
isQt6 = lib.versions.major qtbase.version == "6";
|
|
|
|
in stdenv.mkDerivation rec {
|
2020-05-03 17:38:23 +00:00
|
|
|
pname = "libquotient";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.8.1.2";
|
2020-05-03 17:38:23 +00:00
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "quotient-im";
|
|
|
|
repo = "libQuotient";
|
|
|
|
rev = version;
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-qJTikc42sFUlb4g0sAEg6v9d4k1lhbn3MZPvghm56E8=";
|
2020-05-03 17:38:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
propagatedBuildInputs = [ qtbase qtkeychain olm openssl qtmultimedia ];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DQuotient_ENABLE_E2EE=ON"
|
2024-01-13 08:15:51 +00:00
|
|
|
(lib.cmakeBool "BUILD_WITH_QT6" isQt6)
|
2023-02-02 18:25:31 +00:00
|
|
|
];
|
|
|
|
|
2022-09-30 11:47:45 +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-05-24 13:37:59 +00:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
postInstall = ''
|
|
|
|
# causes cyclic dependency but is not used
|
|
|
|
rm $out/share/ndk-modules/Android.mk
|
|
|
|
'';
|
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
meta = with lib; {
|
2023-02-02 18:25:31 +00:00
|
|
|
description = "A Qt5/Qt6 library to write cross-platform clients for Matrix";
|
2023-10-19 13:55:26 +00:00
|
|
|
homepage = "https://quotient-im.github.io/libQuotient/";
|
2020-05-03 17:38:23 +00:00
|
|
|
license = licenses.lgpl21;
|
2023-08-10 07:59:29 +00:00
|
|
|
maintainers = with maintainers; [ colemickens matthiasbeyer ];
|
2020-05-03 17:38:23 +00:00
|
|
|
};
|
|
|
|
}
|