Skip to content
Permalink
Browse files

nheko: init at 0.3.0

  • Loading branch information
peterhoeg committed Apr 12, 2018
1 parent cc4677c commit a22d35c781b5ed8523cec510d9357d90ecc9efc7
@@ -0,0 +1,96 @@
{ stdenv, lib, fetchFromGitHub, cmake, git
, lmdb, nlohmann_json
, qtbase, qtmultimedia, qttranslations, qttools }:

let
# The dependencies here are quite ugly - hopefully nheko cleans things up in
# future versions
lmdbxx = fetchFromGitHub {
owner = "bendiken";
repo = "lmdbxx";
rev = "0b43ca87d8cfabba392dfe884eb1edb83874de02";
sha256 = "1whsc5cybf9rmgyaj6qjji03fv5jbgcgygp956s3835b9f9cjg1n";
};

tweeny = stdenv.mkDerivation {
name = "tweeny";

src = fetchFromGitHub {
owner = "mobius3";
repo = "tweeny";
rev = "b94ce07cfb02a0eb8ac8aaf66137dabdaea857cf";
sha256 = "1wyyq0j7dhjd6qgvnh3knr70li47hmf5394yznkv9b1indqjx4mi";
};

nativeBuildInputs = [ cmake ];
};

variant = stdenv.mkDerivation rec {
name = "variant-${version}";
version = "1.3.0";

src = fetchFromGitHub {
owner = "mpark";
repo = "variant";
rev = "v${version}";
sha256 = "1naz3gvc3pbflv7nn7imcysd7ilir9v86324ab6lsyrxlhsr9ym4";
};

nativeBuildInputs = [ cmake ];
};

structs = stdenv.mkDerivation rec {
name = "nheko-matrix-structs";

src = fetchFromGitHub {
owner = "mujx";
repo = "matrix-structs";
rev = "91bb2b85a75d664007ef81aeb500d35268425922";
sha256 = "1v544pv18sd91gdrhbk0nm54fggprsvwwrkjmxa59jrvhwdk7rsx";
};

patches = [ ./structs-no-download.patch ];

postPatch = ''
cp ${nlohmann_json}/include/nlohmann/json.hpp include/
cp ${variant}/include/mpark/{config,in_place,lib,variant}.hpp include/
'';

buildInputs = [ nlohmann_json variant ];

nativeBuildInputs = [ cmake ];
};

in stdenv.mkDerivation rec {
name = "nheko-${version}";
version = "0.3.0";

src = fetchFromGitHub {
owner = "mujx";
repo = "nheko";
rev = "v${version}";
sha256 = "178z64vkl7nmr1amgsgvdcwipj8czp7vbvidxllxiwal21yvqpky";
};

buildInputs = [
lmdb structs tweeny
qtbase qtmultimedia qttranslations
];

nativeBuildInputs = [ cmake qttools ];

cmakeFlags = [
"-DLMDBXX_INCLUDE_DIR=${lmdbxx}"
"-DMATRIX_STRUCTS_ROOT=${structs}"
"-DMATRIX_STRUCTS_INCLUDE_DIR=${structs}/include/matrix_structs"
"-DTWEENY_INCLUDE_DIR=${tweeny}/include/tweeny"
];

meta = with lib; {
description = "Desktop client for the Matrix protocol";
homepage = https://matrix.org/docs/projects/client/nheko.html;
license = licenses.gpl3;
maintainers = with maintainers; [ peterhoeg ];
inherit (qtbase.meta) platforms;
};
}
@@ -0,0 +1,21 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e4a480d..635e662 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,16 +18,6 @@ include(Doxygen)
#
include(CompilerFlags)

-file(DOWNLOAD
- "https://github.com/nlohmann/json/releases/download/v3.1.2/json.hpp"
- ${PROJECT_SOURCE_DIR}/include/json.hpp
- EXPECTED_HASH SHA256=fbdfec4b4cf63b3b565d09f87e6c3c183bdd45c5be1864d3fcb338f6f02c1733)
-
-file(DOWNLOAD
- "https://github.com/mpark/variant/releases/download/v1.3.0/variant.hpp"
- ${PROJECT_SOURCE_DIR}/include/variant.hpp
- EXPECTED_MD5 "be0ce322cdd408e1b347b9f1d59ea67a")
-
include_directories(include)

set(SRC
@@ -824,6 +824,8 @@ with pkgs;

libqmatrixclient = libsForQt5.callPackage ../development/libraries/libqmatrixclient { };

nheko = libsForQt5.callPackage ../applications/networking/instant-messengers/nheko { };

quaternion = libsForQt5.callPackage ../applications/networking/instant-messengers/quaternion { };

tensor = libsForQt5.callPackage ../applications/networking/instant-messengers/tensor { };

0 comments on commit a22d35c

Please sign in to comment.
You can’t perform that action at this time.