mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
nheko: 0.4.3 -> 0.5.5
This commit is contained in:
parent
4d11a37c69
commit
ff8fc5c46c
3 changed files with 17 additions and 161 deletions
|
@ -1,39 +1,9 @@
|
|||
{
|
||||
lib, stdenv, fetchFromGitHub, fetchurl,
|
||||
cmake, doxygen, lmdb, qt5, qtmacextras
|
||||
{ lib, stdenv, fetchFromGitHub, fetchurl
|
||||
, cmake, lmdb, qt5, qtmacextras, mtxclient
|
||||
, boost, spdlog, olm, pkgconfig
|
||||
}:
|
||||
|
||||
let
|
||||
json_hpp = fetchurl {
|
||||
url = https://github.com/nlohmann/json/releases/download/v3.1.2/json.hpp;
|
||||
sha256 = "fbdfec4b4cf63b3b565d09f87e6c3c183bdd45c5be1864d3fcb338f6f02c1733";
|
||||
};
|
||||
|
||||
variant_hpp = fetchurl {
|
||||
url = https://github.com/mpark/variant/releases/download/v1.3.0/variant.hpp;
|
||||
sha256 = "1vjiz1x5l8ynqqyb5l9mlrzgps526v45hbmwjilv4brgyi5445fq";
|
||||
};
|
||||
|
||||
matrix-structs = stdenv.mkDerivation rec {
|
||||
name = "matrix-structs-git";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mujx";
|
||||
repo = "matrix-structs";
|
||||
rev = "5e57c2385a79b6629d1998fec4a7c0baee23555e";
|
||||
sha256 = "112b7gnvr04g1ak7fnc7ch7w2n825j4qkw0jb49xx06ag93nb6m6";
|
||||
};
|
||||
|
||||
postUnpack = ''
|
||||
cp ${json_hpp} "$sourceRoot/include/json.hpp"
|
||||
cp ${variant_hpp} "$sourceRoot/include/variant.hpp"
|
||||
'';
|
||||
|
||||
patches = [ ./fetchurls.patch ];
|
||||
|
||||
nativeBuildInputs = [ cmake doxygen ];
|
||||
};
|
||||
|
||||
tweeny = fetchFromGitHub {
|
||||
owner = "mobius3";
|
||||
repo = "tweeny";
|
||||
|
@ -50,19 +20,15 @@ let
|
|||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "nheko-${version}";
|
||||
version = "0.4.3";
|
||||
version = "0.5.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mujx";
|
||||
repo = "nheko";
|
||||
rev = "v${version}";
|
||||
sha256 = "0qjia42nam3hj835k2jb5b6j6n56rdkb8rn67yqf45xdz8ypmbmv";
|
||||
sha256 = "0k5gmfwmisfavliyz0nfsmwy317ps8a4r3l1d831giqp9pvqvi0i";
|
||||
};
|
||||
|
||||
# This patch is likely not strictly speaking needed, but will help detect when
|
||||
# a dependency is updated, so that the fetches up there can be updated too
|
||||
patches = [ ./external-deps.patch ];
|
||||
|
||||
# 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]
|
||||
|
@ -79,25 +45,30 @@ stdenv.mkDerivation rec {
|
|||
# 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 = [
|
||||
"-DMATRIX_STRUCTS_LIBRARY=${matrix-structs}/lib/static/libmatrix_structs.a"
|
||||
"-DMATRIX_STRUCTS_INCLUDE_DIR=${matrix-structs}/include/matrix_structs"
|
||||
"-DTWEENY_INCLUDE_DIR=${tweeny}/include"
|
||||
"-DTWEENY_INCLUDE_DIR=.deps/include"
|
||||
"-DLMDBXX_INCLUDE_DIR=${lmdbxx}"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
nativeBuildInputs = [ cmake pkgconfig ];
|
||||
|
||||
buildInputs = [
|
||||
lmdb lmdbxx matrix-structs qt5.qtbase qt5.qtmultimedia qt5.qttools tweeny
|
||||
mtxclient olm boost lmdb spdlog
|
||||
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 ];
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ ekleog fpletz ];
|
||||
platforms = platforms.unix;
|
||||
license = licenses.gpl3Plus;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,94 +0,0 @@
|
|||
diff --git a/cmake/LMDBXX.cmake b/cmake/LMDBXX.cmake
|
||||
index 3b9817d..e69de29 100644
|
||||
--- a/cmake/LMDBXX.cmake
|
||||
+++ b/cmake/LMDBXX.cmake
|
||||
@@ -1,23 +0,0 @@
|
||||
-include(ExternalProject)
|
||||
-
|
||||
-#
|
||||
-# Build lmdbxx.
|
||||
-#
|
||||
-
|
||||
-set(THIRD_PARTY_ROOT ${CMAKE_SOURCE_DIR}/.third-party)
|
||||
-set(LMDBXX_ROOT ${THIRD_PARTY_ROOT}/lmdbxx)
|
||||
-
|
||||
-set(LMDBXX_INCLUDE_DIR ${LMDBXX_ROOT})
|
||||
-
|
||||
-ExternalProject_Add(
|
||||
- lmdbxx
|
||||
-
|
||||
- GIT_REPOSITORY https://github.com/bendiken/lmdbxx
|
||||
- GIT_TAG 0b43ca87d8cfabba392dfe884eb1edb83874de02
|
||||
-
|
||||
- BUILD_IN_SOURCE 1
|
||||
- SOURCE_DIR ${LMDBXX_ROOT}
|
||||
- CONFIGURE_COMMAND ""
|
||||
- BUILD_COMMAND ""
|
||||
- INSTALL_COMMAND ""
|
||||
-)
|
||||
diff --git a/cmake/MatrixStructs.cmake b/cmake/MatrixStructs.cmake
|
||||
index cef00f6..e69de29 100644
|
||||
--- a/cmake/MatrixStructs.cmake
|
||||
+++ b/cmake/MatrixStructs.cmake
|
||||
@@ -1,33 +0,0 @@
|
||||
-include(ExternalProject)
|
||||
-
|
||||
-#
|
||||
-# Build matrix-structs.
|
||||
-#
|
||||
-
|
||||
-set(THIRD_PARTY_ROOT ${CMAKE_SOURCE_DIR}/.third-party)
|
||||
-set(MATRIX_STRUCTS_ROOT ${THIRD_PARTY_ROOT}/matrix_structs)
|
||||
-set(MATRIX_STRUCTS_INCLUDE_DIR ${MATRIX_STRUCTS_ROOT}/include)
|
||||
-set(MATRIX_STRUCTS_LIBRARY matrix_structs)
|
||||
-
|
||||
-link_directories(${MATRIX_STRUCTS_ROOT})
|
||||
-
|
||||
-set(WINDOWS_FLAGS "")
|
||||
-
|
||||
-if(MSVC)
|
||||
- set(WINDOWS_FLAGS "-DCMAKE_GENERATOR_PLATFORM=x64")
|
||||
-endif()
|
||||
-
|
||||
-ExternalProject_Add(
|
||||
- MatrixStructs
|
||||
-
|
||||
- GIT_REPOSITORY https://github.com/mujx/matrix-structs
|
||||
- GIT_TAG 5e57c2385a79b6629d1998fec4a7c0baee23555e
|
||||
-
|
||||
- BUILD_IN_SOURCE 1
|
||||
- SOURCE_DIR ${MATRIX_STRUCTS_ROOT}
|
||||
- CONFIGURE_COMMAND ${CMAKE_COMMAND}
|
||||
- -DCMAKE_BUILD_TYPE=Release ${MATRIX_STRUCTS_ROOT}
|
||||
- ${WINDOWS_FLAGS}
|
||||
- BUILD_COMMAND ${CMAKE_COMMAND} --build ${MATRIX_STRUCTS_ROOT} --config Release
|
||||
- INSTALL_COMMAND ""
|
||||
-)
|
||||
diff --git a/cmake/Tweeny.cmake b/cmake/Tweeny.cmake
|
||||
index 537ac92..e69de29 100644
|
||||
--- a/cmake/Tweeny.cmake
|
||||
+++ b/cmake/Tweeny.cmake
|
||||
@@ -1,23 +0,0 @@
|
||||
-include(ExternalProject)
|
||||
-
|
||||
-#
|
||||
-# Build tweeny
|
||||
-#
|
||||
-
|
||||
-set(THIRD_PARTY_ROOT ${CMAKE_SOURCE_DIR}/.third-party)
|
||||
-set(TWEENY_ROOT ${THIRD_PARTY_ROOT}/tweeny)
|
||||
-
|
||||
-set(TWEENY_INCLUDE_DIR ${TWEENY_ROOT}/include)
|
||||
-
|
||||
-ExternalProject_Add(
|
||||
- Tweeny
|
||||
-
|
||||
- GIT_REPOSITORY https://github.com/mobius3/tweeny
|
||||
- GIT_TAG b94ce07cfb02a0eb8ac8aaf66137dabdaea857cf
|
||||
-
|
||||
- BUILD_IN_SOURCE 1
|
||||
- SOURCE_DIR ${TWEENY_ROOT}
|
||||
- CONFIGURE_COMMAND ""
|
||||
- BUILD_COMMAND ""
|
||||
- INSTALL_COMMAND ""
|
||||
-)
|
|
@ -1,21 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 077ac37..c639d71 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
|
Loading…
Reference in a new issue