2020-04-30 00:08:47 -07:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2020-04-24 16:05:38 -07:00
|
|
|
, fetchpatch
|
2020-04-30 00:08:47 -07:00
|
|
|
, cmake
|
|
|
|
, cmark
|
|
|
|
, lmdb
|
2020-04-17 03:19:45 -07:00
|
|
|
, lmdbxx
|
2021-01-21 07:59:05 -08:00
|
|
|
, libsecret
|
2020-04-17 03:19:45 -07:00
|
|
|
, tweeny
|
2020-04-30 00:08:47 -07:00
|
|
|
, mkDerivation
|
|
|
|
, qtbase
|
2021-01-21 07:59:05 -08:00
|
|
|
, qtkeychain
|
2020-04-30 00:08:47 -07:00
|
|
|
, qtmacextras
|
|
|
|
, qtmultimedia
|
|
|
|
, qttools
|
2020-04-24 01:07:28 -07:00
|
|
|
, qtquickcontrols2
|
|
|
|
, qtgraphicaleffects
|
2020-04-30 00:08:47 -07:00
|
|
|
, mtxclient
|
2020-04-24 01:07:28 -07:00
|
|
|
, boost17x
|
2020-04-30 00:08:47 -07:00
|
|
|
, spdlog
|
2020-12-09 11:53:17 -08:00
|
|
|
, fmt
|
2020-04-30 00:08:47 -07:00
|
|
|
, olm
|
2021-01-16 18:09:27 -08:00
|
|
|
, pkg-config
|
2019-08-02 05:18:57 -07:00
|
|
|
, nlohmann_json
|
2021-01-23 05:27:23 -08:00
|
|
|
, voipSupport ? true
|
|
|
|
, gst_all_1
|
|
|
|
, libnice
|
2018-05-24 10:00:40 -07:00
|
|
|
}:
|
2018-04-06 19:05:11 -07:00
|
|
|
|
2019-08-02 05:18:57 -07:00
|
|
|
mkDerivation rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "nheko";
|
2021-01-28 13:29:50 -08:00
|
|
|
version = "0.8.1";
|
2018-04-06 19:05:11 -07:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2019-02-11 13:40:50 -08:00
|
|
|
owner = "Nheko-Reborn";
|
2018-04-06 19:05:11 -07:00
|
|
|
repo = "nheko";
|
|
|
|
rev = "v${version}";
|
2021-01-28 13:29:50 -08:00
|
|
|
sha256 = "1v7k3ifzi05fdr06hmws1wkfl1bmhrnam3dbwahp086vkj0r8524";
|
2018-04-06 19:05:11 -07:00
|
|
|
};
|
|
|
|
|
2020-04-30 00:08:47 -07:00
|
|
|
nativeBuildInputs = [
|
2020-04-17 03:19:45 -07:00
|
|
|
lmdbxx
|
2020-04-30 00:08:47 -07:00
|
|
|
cmake
|
2021-01-16 18:09:27 -08:00
|
|
|
pkg-config
|
2020-04-30 00:08:47 -07:00
|
|
|
];
|
2018-04-06 19:05:11 -07:00
|
|
|
|
|
|
|
buildInputs = [
|
2020-04-17 03:19:45 -07:00
|
|
|
nlohmann_json
|
|
|
|
tweeny
|
2020-04-30 00:08:47 -07:00
|
|
|
mtxclient
|
|
|
|
olm
|
2020-04-24 01:07:28 -07:00
|
|
|
boost17x
|
2021-01-21 07:59:05 -08:00
|
|
|
libsecret
|
2020-04-30 00:08:47 -07:00
|
|
|
lmdb
|
|
|
|
spdlog
|
2020-12-09 11:53:17 -08:00
|
|
|
fmt
|
2020-04-30 00:08:47 -07:00
|
|
|
cmark
|
|
|
|
qtbase
|
|
|
|
qtmultimedia
|
|
|
|
qttools
|
2020-04-24 01:07:28 -07:00
|
|
|
qtquickcontrols2
|
|
|
|
qtgraphicaleffects
|
2021-01-21 07:59:05 -08:00
|
|
|
qtkeychain
|
2021-01-23 05:27:23 -08:00
|
|
|
] ++ lib.optional stdenv.isDarwin qtmacextras
|
|
|
|
++ lib.optionals voipSupport (with gst_all_1; [
|
|
|
|
gstreamer
|
|
|
|
gst-plugins-base
|
|
|
|
(gst-plugins-good.override { qt5Support = true; })
|
|
|
|
gst-plugins-bad
|
|
|
|
libnice
|
|
|
|
]);
|
2018-04-06 19:05:11 -07:00
|
|
|
|
2021-01-20 12:56:10 -08:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DCOMPILE_QML=ON" # see https://github.com/Nheko-Reborn/nheko/issues/389
|
|
|
|
];
|
|
|
|
|
2021-01-23 05:27:23 -08:00
|
|
|
preFixup = lib.optionalString voipSupport ''
|
|
|
|
# add gstreamer plugins path to the wrapper
|
|
|
|
qtWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0")
|
|
|
|
'';
|
|
|
|
|
2021-01-10 23:54:33 -08:00
|
|
|
meta = with lib; {
|
2018-04-06 19:05:11 -07:00
|
|
|
description = "Desktop client for the Matrix protocol";
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://github.com/Nheko-Reborn/nheko";
|
2018-09-09 13:14:27 -07:00
|
|
|
maintainers = with maintainers; [ ekleog fpletz ];
|
2020-04-30 00:25:38 -07:00
|
|
|
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-08-09 03:59:52 -07:00
|
|
|
license = licenses.gpl3Plus;
|
2018-04-06 19:05:11 -07:00
|
|
|
};
|
|
|
|
}
|