3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/instant-messengers/nheko/default.nix

75 lines
2.1 KiB
Nix
Raw Normal View History

2018-09-09 21:14:27 +01:00
{ lib, stdenv, fetchFromGitHub, fetchurl
, cmake, lmdb, qt5, qtmacextras, mtxclient
, boost, spdlog, olm, pkgconfig
2018-05-24 18:00:40 +01:00
}:
2018-04-07 03:05:11 +01:00
let
tweeny = fetchFromGitHub {
owner = "mobius3";
repo = "tweeny";
rev = "b94ce07cfb02a0eb8ac8aaf66137dabdaea857cf";
sha256 = "1wyyq0j7dhjd6qgvnh3knr70li47hmf5394yznkv9b1indqjx4mi";
};
lmdbxx = fetchFromGitHub {
owner = "bendiken";
repo = "lmdbxx";
rev = "0b43ca87d8cfabba392dfe884eb1edb83874de02";
sha256 = "1whsc5cybf9rmgyaj6qjji03fv5jbgcgygp956s3835b9f9cjg1n";
};
in
stdenv.mkDerivation rec {
name = "nheko-${version}";
2018-09-09 21:14:27 +01:00
version = "0.5.5";
2018-04-07 03:05:11 +01:00
src = fetchFromGitHub {
owner = "mujx";
repo = "nheko";
rev = "v${version}";
2018-09-09 21:14:27 +01:00
sha256 = "0k5gmfwmisfavliyz0nfsmwy317ps8a4r3l1d831giqp9pvqvi0i";
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
#'';
2018-09-09 21:14:27 +01:00
postPatch = ''
mkdir -p .deps/include/
ln -s ${tweeny}/include .deps/include/tweeny
ln -s ${spdlog} .deps/spdlog
'';
2018-04-07 03:05:11 +01:00
cmakeFlags = [
2018-09-09 21:14:27 +01:00
"-DTWEENY_INCLUDE_DIR=.deps/include"
2018-04-07 03:05:11 +01:00
"-DLMDBXX_INCLUDE_DIR=${lmdbxx}"
];
2018-09-09 21:14:27 +01:00
nativeBuildInputs = [ cmake pkgconfig ];
2018-04-07 03:05:11 +01:00
buildInputs = [
2018-09-09 21:14:27 +01:00
mtxclient olm boost lmdb spdlog
qt5.qtbase qt5.qtmultimedia qt5.qttools
2018-05-24 18:00:40 +01:00
] ++ lib.optional stdenv.isDarwin qtmacextras;
2018-04-07 03:05:11 +01:00
enableParallelBuilding = true;
meta = with stdenv.lib; {
description = "Desktop client for the Matrix protocol";
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
};
}