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
|
|
|
|
, cmark
|
|
|
|
, lmdb
|
2020-04-17 11:19:45 +01:00
|
|
|
, lmdbxx
|
|
|
|
, tweeny
|
2020-04-30 08:08:47 +01:00
|
|
|
, mkDerivation
|
|
|
|
, qtbase
|
|
|
|
, qtmacextras
|
|
|
|
, qtmultimedia
|
|
|
|
, 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
|
|
|
|
, pkgconfig
|
2019-08-02 13:18:57 +01:00
|
|
|
, nlohmann_json
|
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";
|
2020-04-24 09:07:28 +01:00
|
|
|
version = "0.7.1";
|
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}";
|
2020-04-24 09:07:28 +01:00
|
|
|
sha256 = "12sxibbrn79sxkf9jrm7jrlj7l5vz15claxrrll7pkv9mv44wady";
|
2018-04-07 03:05:11 +01:00
|
|
|
};
|
|
|
|
|
2018-05-24 18:00:40 +01:00
|
|
|
# If, on Darwin, you encounter the error
|
|
|
|
# error: must specify at least one argument for '...' parameter of variadic
|
|
|
|
# macro [-Werror,-Wgnu-zero-variadic-macro-arguments]
|
|
|
|
# Then adding this parameter is likely the fix you want.
|
|
|
|
#
|
|
|
|
# However, it looks like either cmake doesn't honor this CFLAGS variable, or
|
|
|
|
# darwin's compiler doesn't have the same syntax as gcc for turning off
|
|
|
|
# -Werror selectively.
|
|
|
|
#
|
|
|
|
# Anyway, this is something that will have to be debugged with access to a
|
|
|
|
# darwin-based OS. Sorry about that!
|
|
|
|
#
|
|
|
|
#preConfigure = lib.optionalString stdenv.isDarwin ''
|
|
|
|
# export CFLAGS=-Wno-error=gnu-zero-variadic-macro-arguments
|
|
|
|
#'';
|
|
|
|
|
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
|
|
|
|
pkgconfig
|
|
|
|
];
|
2020-04-24 23:37:22 +01:00
|
|
|
cmakeFlags = [
|
|
|
|
# Can be removed once either https://github.com/NixOS/nixpkgs/pull/85254 or
|
|
|
|
# https://github.com/NixOS/nixpkgs/pull/73940 are merged
|
|
|
|
"-DBoost_NO_BOOST_CMAKE=TRUE"
|
|
|
|
];
|
2020-04-25 00:05:38 +01:00
|
|
|
# commit missing from latest release and recommended by upstream:
|
|
|
|
# https://github.com/NixOS/nixpkgs/pull/85922#issuecomment-619263903
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "room-ids-escape-patch";
|
|
|
|
url = "https://github.com/Nheko-Reborn/nheko/commit/d94ac86816f9f325cba11f71344a3ca99591130d.patch";
|
|
|
|
sha256 = "1p0kj4a60l3jf0rfakc88adld7ccg3vfjhzia5rf2i03h35cxw8c";
|
|
|
|
})
|
|
|
|
];
|
2018-04-07 03:05:11 +01:00
|
|
|
|
|
|
|
buildInputs = [
|
2020-04-17 11:19:45 +01:00
|
|
|
nlohmann_json
|
|
|
|
tweeny
|
2020-04-30 08:08:47 +01:00
|
|
|
mtxclient
|
|
|
|
olm
|
2020-04-24 09:07:28 +01:00
|
|
|
boost17x
|
2020-04-30 08:08:47 +01:00
|
|
|
lmdb
|
|
|
|
spdlog
|
|
|
|
cmark
|
|
|
|
qtbase
|
|
|
|
qtmultimedia
|
|
|
|
qttools
|
2020-04-24 09:07:28 +01:00
|
|
|
qtquickcontrols2
|
|
|
|
qtgraphicaleffects
|
2018-05-24 18:00:40 +01:00
|
|
|
] ++ lib.optional stdenv.isDarwin qtmacextras;
|
2018-04-07 03:05:11 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
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 ];
|
|
|
|
platforms = platforms.unix;
|
2018-08-09 11:59:52 +01:00
|
|
|
license = licenses.gpl3Plus;
|
2018-04-07 03:05:11 +01:00
|
|
|
};
|
|
|
|
}
|