Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
119 additions
and
0 deletions.
There are no files selected for viewing
96 changes: 96 additions & 0 deletions
96
pkgs/applications/networking/instant-messengers/nheko/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}; | ||
} |
21 changes: 21 additions & 0 deletions
21
pkgs/applications/networking/instant-messengers/nheko/structs-no-download.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters