forked from mirrors/nixpkgs
Merge pull request #85922 from doronbehar/update-nheko
nheko: 0.6.4 -> 0.7.1
This commit is contained in:
commit
35e674f6a5
|
@ -1,79 +1,82 @@
|
||||||
{ lib, stdenv, fetchFromGitHub
|
{ lib
|
||||||
, cmake, cmark, lmdb, mkDerivation, qtbase, qtmacextras
|
, stdenv
|
||||||
, qtmultimedia, qttools, mtxclient, boost, spdlog, olm, pkgconfig
|
, fetchFromGitHub
|
||||||
|
, fetchpatch
|
||||||
|
, cmake
|
||||||
|
, cmark
|
||||||
|
, lmdb
|
||||||
|
, lmdbxx
|
||||||
|
, tweeny
|
||||||
|
, mkDerivation
|
||||||
|
, qtbase
|
||||||
|
, qtmacextras
|
||||||
|
, qtmultimedia
|
||||||
|
, qttools
|
||||||
|
, qtquickcontrols2
|
||||||
|
, qtgraphicaleffects
|
||||||
|
, mtxclient
|
||||||
|
, boost17x
|
||||||
|
, spdlog
|
||||||
|
, olm
|
||||||
|
, pkgconfig
|
||||||
, nlohmann_json
|
, 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 {
|
mkDerivation rec {
|
||||||
pname = "nheko";
|
pname = "nheko";
|
||||||
version = "0.6.4";
|
version = "0.7.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "Nheko-Reborn";
|
owner = "Nheko-Reborn";
|
||||||
repo = "nheko";
|
repo = "nheko";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "19dkc98l1q4070v6mli4ybqn0ip0za607w39hjf0x8rqdxq45iwm";
|
sha256 = "12sxibbrn79sxkf9jrm7jrlj7l5vz15claxrrll7pkv9mv44wady";
|
||||||
};
|
};
|
||||||
|
|
||||||
# If, on Darwin, you encounter the error
|
nativeBuildInputs = [
|
||||||
# error: must specify at least one argument for '...' parameter of variadic
|
lmdbxx
|
||||||
# macro [-Werror,-Wgnu-zero-variadic-macro-arguments]
|
cmake
|
||||||
# Then adding this parameter is likely the fix you want.
|
pkgconfig
|
||||||
#
|
];
|
||||||
# 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
|
|
||||||
'';
|
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DTWEENY_INCLUDE_DIR=.deps/include"
|
# Can be removed once either https://github.com/NixOS/nixpkgs/pull/85254 or
|
||||||
"-DLMDBXX_INCLUDE_DIR=${lmdbxx}"
|
# https://github.com/NixOS/nixpkgs/pull/73940 are merged
|
||||||
"-Dnlohmann_json_DIR=${nlohmann_json}/lib/cmake/nlohmann_json"
|
"-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 = [
|
buildInputs = [
|
||||||
mtxclient olm boost lmdb spdlog cmark
|
nlohmann_json
|
||||||
qtbase qtmultimedia qttools
|
tweeny
|
||||||
|
mtxclient
|
||||||
|
olm
|
||||||
|
boost17x
|
||||||
|
lmdb
|
||||||
|
spdlog
|
||||||
|
cmark
|
||||||
|
qtbase
|
||||||
|
qtmultimedia
|
||||||
|
qttools
|
||||||
|
qtquickcontrols2
|
||||||
|
qtgraphicaleffects
|
||||||
] ++ lib.optional stdenv.isDarwin qtmacextras;
|
] ++ lib.optional stdenv.isDarwin qtmacextras;
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Desktop client for the Matrix protocol";
|
description = "Desktop client for the Matrix protocol";
|
||||||
homepage = "https://github.com/Nheko-Reborn/nheko";
|
homepage = "https://github.com/Nheko-Reborn/nheko";
|
||||||
maintainers = with maintainers; [ ekleog fpletz ];
|
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;
|
license = licenses.gpl3Plus;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,35 +1,60 @@
|
||||||
{ stdenv, fetchFromGitHub, fetchpatch, cmake, pkgconfig
|
{ stdenv
|
||||||
, boost, openssl, zlib, libsodium, olm, nlohmann_json }:
|
, fetchFromGitHub
|
||||||
|
, fetchpatch
|
||||||
|
, cmake
|
||||||
|
, pkgconfig
|
||||||
|
, boost17x
|
||||||
|
, openssl
|
||||||
|
, zlib
|
||||||
|
, libsodium
|
||||||
|
, olm
|
||||||
|
, spdlog
|
||||||
|
, nlohmann_json
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "mtxclient";
|
pname = "mtxclient";
|
||||||
version = "0.2.1";
|
version = "0.3.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "Nheko-Reborn";
|
owner = "Nheko-Reborn";
|
||||||
repo = "mtxclient";
|
repo = "mtxclient";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0pycznrvj57ff6gbwfn1xj943d2dr4vadl79hii1z16gn0nzxpmj";
|
sha256 = "0vf5xmn6yfi5lvskfgrdmnalvclzrapcrml92bj9qaa8vq8mfsf2";
|
||||||
};
|
};
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
|
# Network requiring tests can't be disabled individually:
|
||||||
|
# https://github.com/Nheko-Reborn/mtxclient/issues/22
|
||||||
"-DBUILD_LIB_TESTS=OFF"
|
"-DBUILD_LIB_TESTS=OFF"
|
||||||
"-DBUILD_LIB_EXAMPLES=OFF"
|
"-DBUILD_LIB_EXAMPLES=OFF"
|
||||||
"-Dnlohmann_json_DIR=${nlohmann_json}/lib/cmake/nlohmann_json"
|
"-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 ];
|
nativeBuildInputs = [
|
||||||
buildInputs = [ boost openssl zlib libsodium olm ];
|
cmake
|
||||||
|
pkgconfig
|
||||||
|
];
|
||||||
|
buildInputs = [
|
||||||
|
spdlog
|
||||||
|
boost17x
|
||||||
|
openssl
|
||||||
|
zlib
|
||||||
|
libsodium
|
||||||
|
olm
|
||||||
|
];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Client API library for Matrix, built on top of Boost.Asio";
|
description = "Client API library for Matrix, built on top of Boost.Asio";
|
||||||
homepage = "https://github.com/Nheko-Reborn/mtxclient";
|
homepage = "https://github.com/Nheko-Reborn/mtxclient";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [ fpletz ];
|
maintainers = with maintainers; [ fpletz ];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.all;
|
||||||
|
# Should be fixable if a higher clang version is used, see:
|
||||||
# As of 2019-06-30, all of the dependencies are available on macOS but the
|
# https://github.com/NixOS/nixpkgs/pull/85922#issuecomment-619287177
|
||||||
# package itself does not build.
|
broken = stdenv.targetPlatform.isDarwin;
|
||||||
broken = stdenv.isDarwin;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
30
pkgs/development/libraries/tweeny/default.nix
Normal file
30
pkgs/development/libraries/tweeny/default.nix
Normal 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;
|
||||||
|
};
|
||||||
|
}
|
|
@ -7419,6 +7419,8 @@ in
|
||||||
|
|
||||||
tweet-hs = haskell.lib.justStaticExecutables haskellPackages.tweet-hs;
|
tweet-hs = haskell.lib.justStaticExecutables haskellPackages.tweet-hs;
|
||||||
|
|
||||||
|
tweeny = callPackage ../development/libraries/tweeny { };
|
||||||
|
|
||||||
qfsm = callPackage ../applications/science/electronics/qfsm { };
|
qfsm = callPackage ../applications/science/electronics/qfsm { };
|
||||||
|
|
||||||
tkgate = callPackage ../applications/science/electronics/tkgate/1.x.nix { };
|
tkgate = callPackage ../applications/science/electronics/tkgate/1.x.nix { };
|
||||||
|
|
Loading…
Reference in a new issue