2020-04-30 08:08:47 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2020-04-25 00:05:38 +01:00
|
|
|
, fetchpatch
|
2020-04-30 08:08:47 +01:00
|
|
|
, cmake
|
2022-03-10 19:24:14 +00:00
|
|
|
, asciidoc
|
2020-04-30 08:08:47 +01:00
|
|
|
, cmark
|
|
|
|
, lmdb
|
2020-04-17 11:19:45 +01:00
|
|
|
, lmdbxx
|
2021-01-21 15:59:05 +00:00
|
|
|
, libsecret
|
2020-04-30 08:08:47 +01:00
|
|
|
, mkDerivation
|
|
|
|
, qtbase
|
2021-01-21 15:59:05 +00:00
|
|
|
, qtkeychain
|
2020-04-30 08:08:47 +01:00
|
|
|
, qtmacextras
|
|
|
|
, qtmultimedia
|
2021-12-12 14:57:26 +00:00
|
|
|
, qtimageformats
|
2020-04-30 08:08:47 +01:00
|
|
|
, qttools
|
2020-04-24 09:07:28 +01:00
|
|
|
, qtquickcontrols2
|
|
|
|
, qtgraphicaleffects
|
2020-04-30 08:08:47 +01:00
|
|
|
, mtxclient
|
2020-04-24 09:07:28 +01:00
|
|
|
, boost17x
|
2020-04-30 08:08:47 +01:00
|
|
|
, spdlog
|
|
|
|
, olm
|
2021-01-17 02:09:27 +00:00
|
|
|
, pkg-config
|
2019-08-02 13:18:57 +01:00
|
|
|
, nlohmann_json
|
2021-11-19 10:27:27 +00:00
|
|
|
, coeurl
|
|
|
|
, libevent
|
|
|
|
, curl
|
2021-01-23 13:27:23 +00:00
|
|
|
, voipSupport ? true
|
|
|
|
, gst_all_1
|
|
|
|
, libnice
|
2018-05-24 18:00:40 +01:00
|
|
|
}:
|
2018-04-07 03:05:11 +01:00
|
|
|
|
2019-08-02 13:18:57 +01:00
|
|
|
mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "nheko";
|
2022-03-10 19:24:14 +00:00
|
|
|
version = "0.9.2";
|
2018-04-07 03:05:11 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2019-02-11 21:40:50 +00:00
|
|
|
owner = "Nheko-Reborn";
|
2018-04-07 03:05:11 +01:00
|
|
|
repo = "nheko";
|
|
|
|
rev = "v${version}";
|
2022-03-10 19:24:14 +00:00
|
|
|
sha256 = "sha256-roC1OIq0Vmj5rABNtH4IOMHX9aSlOMFC7ZHueuj/PmE=";
|
2018-04-07 03:05:11 +01:00
|
|
|
};
|
|
|
|
|
2020-04-30 08:08:47 +01:00
|
|
|
nativeBuildInputs = [
|
2020-04-17 11:19:45 +01:00
|
|
|
lmdbxx
|
2020-04-30 08:08:47 +01:00
|
|
|
cmake
|
2021-01-17 02:09:27 +00:00
|
|
|
pkg-config
|
2022-03-10 19:24:14 +00:00
|
|
|
asciidoc
|
2020-04-30 08:08:47 +01:00
|
|
|
];
|
2018-04-07 03:05:11 +01:00
|
|
|
|
|
|
|
buildInputs = [
|
2020-04-17 11:19:45 +01:00
|
|
|
nlohmann_json
|
2020-04-30 08:08:47 +01:00
|
|
|
mtxclient
|
|
|
|
olm
|
2020-04-24 09:07:28 +01:00
|
|
|
boost17x
|
2021-01-21 15:59:05 +00:00
|
|
|
libsecret
|
2020-04-30 08:08:47 +01:00
|
|
|
lmdb
|
|
|
|
spdlog
|
|
|
|
cmark
|
|
|
|
qtbase
|
|
|
|
qtmultimedia
|
2021-12-12 14:57:26 +00:00
|
|
|
qtimageformats
|
2020-04-30 08:08:47 +01:00
|
|
|
qttools
|
2020-04-24 09:07:28 +01:00
|
|
|
qtquickcontrols2
|
|
|
|
qtgraphicaleffects
|
2021-01-21 15:59:05 +00:00
|
|
|
qtkeychain
|
2021-11-19 10:27:27 +00:00
|
|
|
coeurl
|
|
|
|
libevent
|
|
|
|
curl
|
2021-01-23 13:27:23 +00: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-07 03:05:11 +01:00
|
|
|
|
2021-01-20 20:56:10 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DCOMPILE_QML=ON" # see https://github.com/Nheko-Reborn/nheko/issues/389
|
|
|
|
];
|
|
|
|
|
2021-01-23 13:27:23 +00: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-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-04-07 03:05:11 +01:00
|
|
|
description = "Desktop client for the Matrix protocol";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/Nheko-Reborn/nheko";
|
2018-09-09 21:14:27 +01:00
|
|
|
maintainers = with maintainers; [ ekleog fpletz ];
|
2020-04-30 08:25:38 +01: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 11:59:52 +01:00
|
|
|
license = licenses.gpl3Plus;
|
2018-04-07 03:05:11 +01:00
|
|
|
};
|
|
|
|
}
|