about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/instant-messengers/nheko
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/applications/networking/instant-messengers/nheko
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/instant-messengers/nheko')
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/nheko/default.nix75
1 files changed, 75 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/nheko/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/nheko/default.nix
new file mode 100644
index 000000000000..6e78a9034aec
--- /dev/null
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/nheko/default.nix
@@ -0,0 +1,75 @@
+{ lib, stdenv, fetchFromGitHub, fetchurl
+, cmake, cmark, lmdb, qt5, qtmacextras, mtxclient
+, boost, spdlog, olm, pkgconfig
+}:
+
+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}";
+  version = "0.6.2";
+
+  src = fetchFromGitHub {
+    owner = "mujx";
+    repo = "nheko";
+    rev = "v${version}";
+    sha256 = "014k68mmw3ys7ldgj96kkr1i1lyv2nk89wndkqznsizcr3097fn5";
+  };
+
+  # 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
+  '';
+
+  cmakeFlags = [
+    "-DTWEENY_INCLUDE_DIR=.deps/include"
+    "-DLMDBXX_INCLUDE_DIR=${lmdbxx}"
+  ];
+
+  nativeBuildInputs = [ cmake pkgconfig ];
+
+  buildInputs = [
+    mtxclient olm boost lmdb spdlog cmark
+    qt5.qtbase qt5.qtmultimedia qt5.qttools
+  ] ++ lib.optional stdenv.isDarwin qtmacextras;
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "Desktop client for the Matrix protocol";
+    maintainers = with maintainers; [ ekleog fpletz ];
+    platforms = platforms.unix;
+    license = licenses.gpl3Plus;
+    knownVulnerabilities = [ "No longer maintained" ];
+  };
+}