nixpkgs-suyu/pkgs/applications/networking/instant-messengers/nheko/default.nix

90 lines
1.8 KiB
Nix
Raw Normal View History

2020-04-30 09:08:47 +02:00
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
2020-04-30 09:08:47 +02:00
, cmake
, cmark
, lmdb
, lmdbxx
2021-01-21 16:59:05 +01:00
, libsecret
2020-04-30 09:08:47 +02:00
, mkDerivation
, qtbase
2021-01-21 16:59:05 +01:00
, qtkeychain
2020-04-30 09:08:47 +02:00
, qtmacextras
, qtmultimedia
, qttools
2020-04-24 10:07:28 +02:00
, qtquickcontrols2
, qtgraphicaleffects
2020-04-30 09:08:47 +02:00
, mtxclient
2020-04-24 10:07:28 +02:00
, boost17x
2020-04-30 09:08:47 +02:00
, spdlog
, olm
, pkg-config
, nlohmann_json
2021-01-23 14:27:23 +01:00
, voipSupport ? true
, gst_all_1
, libnice
2018-05-24 19:00:40 +02:00
}:
2018-04-07 04:05:11 +02:00
mkDerivation rec {
pname = "nheko";
2021-04-20 18:22:14 +02:00
version = "0.8.2";
2018-04-07 04:05:11 +02:00
src = fetchFromGitHub {
2019-02-11 22:40:50 +01:00
owner = "Nheko-Reborn";
2018-04-07 04:05:11 +02:00
repo = "nheko";
rev = "v${version}";
2021-04-20 18:22:14 +02:00
sha256 = "sha256-w4l91/W6F1FL+Q37qWSjYRHv4vad/10fxdKwfNeEwgw=";
2018-04-07 04:05:11 +02:00
};
2020-04-30 09:08:47 +02:00
nativeBuildInputs = [
lmdbxx
2020-04-30 09:08:47 +02:00
cmake
pkg-config
2020-04-30 09:08:47 +02:00
];
2018-04-07 04:05:11 +02:00
buildInputs = [
nlohmann_json
2020-04-30 09:08:47 +02:00
mtxclient
olm
2020-04-24 10:07:28 +02:00
boost17x
2021-01-21 16:59:05 +01:00
libsecret
2020-04-30 09:08:47 +02:00
lmdb
spdlog
cmark
qtbase
qtmultimedia
qttools
2020-04-24 10:07:28 +02:00
qtquickcontrols2
qtgraphicaleffects
2021-01-21 16:59:05 +01:00
qtkeychain
2021-01-23 14:27:23 +01: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 04:05:11 +02:00
cmakeFlags = [
"-DCOMPILE_QML=ON" # see https://github.com/Nheko-Reborn/nheko/issues/389
];
2021-01-23 14:27:23 +01: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")
'';
meta = with lib; {
2018-04-07 04:05:11 +02:00
description = "Desktop client for the Matrix protocol";
homepage = "https://github.com/Nheko-Reborn/nheko";
2018-09-09 22:14:27 +02:00
maintainers = with maintainers; [ ekleog fpletz ];
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 12:59:52 +02:00
license = licenses.gpl3Plus;
2018-04-07 04:05:11 +02:00
};
}