Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 cmake, 6 olm, 7 openssl, 8 qtbase, 9 qtmultimedia, 10 qtkeychain, 11}: 12 13stdenv.mkDerivation rec { 14 pname = "libquotient"; 15 version = "0.9.1"; 16 17 outputs = [ 18 "out" 19 "dev" 20 ]; 21 22 src = fetchFromGitHub { 23 owner = "quotient-im"; 24 repo = "libQuotient"; 25 rev = version; 26 hash = "sha256-R9ms3sYGdHaYKUMnZyBjw5KCik05k93vlvXMRtAXh5Y="; 27 }; 28 29 nativeBuildInputs = [ cmake ]; 30 31 propagatedBuildInputs = [ 32 qtbase 33 qtkeychain 34 olm 35 openssl 36 qtmultimedia 37 ]; 38 39 cmakeFlags = [ 40 "-DQuotient_ENABLE_E2EE=ON" 41 ]; 42 43 # https://github.com/quotient-im/libQuotient/issues/551 44 postPatch = '' 45 substituteInPlace Quotient.pc.in \ 46 --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \ 47 --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@ 48 ''; 49 50 dontWrapQtApps = true; 51 52 postInstall = '' 53 # causes cyclic dependency but is not used 54 rm $out/share/ndk-modules/Android.mk 55 ''; 56 57 meta = with lib; { 58 description = "Qt5/Qt6 library to write cross-platform clients for Matrix"; 59 homepage = "https://quotient-im.github.io/libQuotient/"; 60 license = licenses.lgpl21; 61 maintainers = with maintainers; [ 62 matthiasbeyer 63 ]; 64 }; 65}