3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #85922 from doronbehar/update-nheko

nheko: 0.6.4 -> 0.7.1
This commit is contained in:
Dmitry Kalinkin 2020-05-01 15:44:59 -04:00 committed by GitHub
commit 35e674f6a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 125 additions and 65 deletions

View file

@ -1,79 +1,82 @@
{ lib, stdenv, fetchFromGitHub
, cmake, cmark, lmdb, mkDerivation, qtbase, qtmacextras
, qtmultimedia, qttools, mtxclient, boost, spdlog, olm, pkgconfig
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, cmark
, lmdb
, lmdbxx
, tweeny
, mkDerivation
, qtbase
, qtmacextras
, qtmultimedia
, qttools
, qtquickcontrols2
, qtgraphicaleffects
, mtxclient
, boost17x
, spdlog
, olm
, pkgconfig
, nlohmann_json
}:
# These hashes and revisions are based on those from here:
# https://github.com/Nheko-Reborn/nheko/blob/v0.6.4/deps/CMakeLists.txt#L52
let
tweeny = fetchFromGitHub {
owner = "mobius3";
repo = "tweeny";
rev = "b94ce07cfb02a0eb8ac8aaf66137dabdaea857cf";
sha256 = "1wyyq0j7dhjd6qgvnh3knr70li47hmf5394yznkv9b1indqjx4mi";
};
lmdbxx = fetchFromGitHub {
owner = "bendiken";
repo = "lmdbxx";
rev = "0b43ca87d8cfabba392dfe884eb1edb83874de02";
sha256 = "1whsc5cybf9rmgyaj6qjji03fv5jbgcgygp956s3835b9f9cjg1n";
};
in
mkDerivation rec {
pname = "nheko";
version = "0.6.4";
version = "0.7.1";
src = fetchFromGitHub {
owner = "Nheko-Reborn";
repo = "nheko";
rev = "v${version}";
sha256 = "19dkc98l1q4070v6mli4ybqn0ip0za607w39hjf0x8rqdxq45iwm";
sha256 = "12sxibbrn79sxkf9jrm7jrlj7l5vz15claxrrll7pkv9mv44wady";
};
# 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
#'';
postPatch = ''
mkdir -p .deps/include/
ln -s ${tweeny}/include .deps/include/tweeny
ln -s ${spdlog} .deps/spdlog
'';
nativeBuildInputs = [
lmdbxx
cmake
pkgconfig
];
cmakeFlags = [
"-DTWEENY_INCLUDE_DIR=.deps/include"
"-DLMDBXX_INCLUDE_DIR=${lmdbxx}"
"-Dnlohmann_json_DIR=${nlohmann_json}/lib/cmake/nlohmann_json"
# 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"
];
# 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";
})
];
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [
mtxclient olm boost lmdb spdlog cmark
qtbase qtmultimedia qttools
nlohmann_json
tweeny
mtxclient
olm
boost17x
lmdb
spdlog
cmark
qtbase
qtmultimedia
qttools
qtquickcontrols2
qtgraphicaleffects
] ++ lib.optional stdenv.isDarwin qtmacextras;
enableParallelBuilding = true;
meta = with stdenv.lib; {
description = "Desktop client for the Matrix protocol";
homepage = "https://github.com/Nheko-Reborn/nheko";
maintainers = with maintainers; [ ekleog fpletz ];
platforms = platforms.unix;
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;
license = licenses.gpl3Plus;
};
}

View file

@ -1,35 +1,60 @@
{ stdenv, fetchFromGitHub, fetchpatch, cmake, pkgconfig
, boost, openssl, zlib, libsodium, olm, nlohmann_json }:
{ stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, pkgconfig
, boost17x
, openssl
, zlib
, libsodium
, olm
, spdlog
, nlohmann_json
}:
stdenv.mkDerivation rec {
pname = "mtxclient";
version = "0.2.1";
version = "0.3.0";
src = fetchFromGitHub {
owner = "Nheko-Reborn";
repo = "mtxclient";
rev = "v${version}";
sha256 = "0pycznrvj57ff6gbwfn1xj943d2dr4vadl79hii1z16gn0nzxpmj";
sha256 = "0vf5xmn6yfi5lvskfgrdmnalvclzrapcrml92bj9qaa8vq8mfsf2";
};
cmakeFlags = [
# Network requiring tests can't be disabled individually:
# https://github.com/Nheko-Reborn/mtxclient/issues/22
"-DBUILD_LIB_TESTS=OFF"
"-DBUILD_LIB_EXAMPLES=OFF"
"-Dnlohmann_json_DIR=${nlohmann_json}/lib/cmake/nlohmann_json"
# 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"
];
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [ boost openssl zlib libsodium olm ];
nativeBuildInputs = [
cmake
pkgconfig
];
buildInputs = [
spdlog
boost17x
openssl
zlib
libsodium
olm
];
meta = with stdenv.lib; {
description = "Client API library for Matrix, built on top of Boost.Asio";
homepage = "https://github.com/Nheko-Reborn/mtxclient";
license = licenses.mit;
maintainers = with maintainers; [ fpletz ];
platforms = platforms.unix;
# As of 2019-06-30, all of the dependencies are available on macOS but the
# package itself does not build.
broken = stdenv.isDarwin;
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;
};
}

View file

@ -0,0 +1,30 @@
{ stdenv
, fetchFromGitHub
, cmake
}:
stdenv.mkDerivation rec {
pname = "tweeny";
version = "3.1.0";
src = fetchFromGitHub {
owner = "mobius3";
repo = "tweeny";
rev = "v${version}";
sha256 = "0qvby57g9a2m4afd1mgard3k7nm4ynbvali7nzm1qn3ygdmqid7n";
};
nativeBuildInputs = [
cmake
];
doCheck = true;
meta = with stdenv.lib; {
description = "A modern C++ tweening library";
license = licenses.mit;
homepage = "http://mobius3.github.io/tweeny";
maintainers = [ maintainers.doronbehar ];
platforms = with platforms; darwin ++ linux;
};
}

View file

@ -7419,6 +7419,8 @@ in
tweet-hs = haskell.lib.justStaticExecutables haskellPackages.tweet-hs;
tweeny = callPackage ../development/libraries/tweeny { };
qfsm = callPackage ../applications/science/electronics/qfsm { };
tkgate = callPackage ../applications/science/electronics/tkgate/1.x.nix { };