From 5308eda5d0210beb1edfb0cdf44530a13673af41 Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Wed, 20 Jan 2021 18:00:51 +0100
Subject: [PATCH 5/5] gnu: nheko: Update to 0.8.0.
* gnu/packages/messaging.scm (nheko): Update to 0.8.0.
---
gnu/packages/messaging.scm | 50 +++++++++++++++++++++++++++++---------
1 file changed, 39 insertions(+), 11 deletions(-)
@@ -2277,7 +2277,7 @@ for the Matrix protocol. It is built on to of @code{Boost.Asio}.")
(define-public nheko
(package
(name "nheko")
- (version "0.7.2")
+ (version "0.8.0")
(source
(origin
(method git-fetch)
@@ -2286,19 +2286,40 @@ for the Matrix protocol. It is built on to of @code{Boost.Asio}.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1cbhgaf9klgxdirrxj571fqwspm0byl75c1xc40l727a6qswvp7s"))))
+ (base32 "00d6wx3lcgbks74jkdyifqxf8nlravqh88fyljd0sy7kzbah9msf"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (delete-file-recursively "third_party")
+ #t))))
(arguments
`(#:tests? #f ;no test target
#:configure-flags
- (list
- "-DCMAKE_BUILD_TYPE=Release"
- "-DCMAKE_CXX_FLAGS=-fpermissive")
+ '("-DCMAKE_BUILD_TYPE=Release"
+ "-DBUILD_DOCS=ON"
+ ;; Fix required because we are using a static SingleApplication
+ "-DCMAKE_CXX_FLAGS= \"-DQAPPLICATION_CLASS=QApplication\" "
+ ;; Compile Qml will make Nheko faster, but you will need to recompile
+ ;; it, when you update Qt. That's fine for us.
+ "-DCOMPILE_QML=ON")
#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'remove-Werror
- (lambda _
- (substitute* "CMakeLists.txt"
- (("-Werror") ""))
+ (add-after 'unpack 'unbundle-dependencies
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((single-app (assoc-ref inputs "single-application")))
+ (substitute* "CMakeLists.txt"
+ ;; Remove include and source dirs,replace with the correct one
+ (("third_party/blurhash/blurhash.cpp") "")
+ (("third_party/cpp-httplib-0.5.12")
+ (string-append "\"" single-app "/include\""))
+ (("add_subdirectory.*third_party/SingleApplication.*") "")
+ ;; Link using the correct static/shared libs
+ (("SingleApplication::SingleApplication")
+ (string-append
+ ;; Dynamic libraries
+ "httplib" "\n" "blurhash" "\n"
+ ;; Static library
+ single-app "/lib/libSingleApplication.a"))))
#t))
(add-after 'unpack 'fix-determinism
(lambda _
@@ -2308,7 +2329,10 @@ for the Matrix protocol. It is built on to of @code{Boost.Asio}.")
(build-system qt-build-system)
(inputs
`(("boost" ,boost)
+ ("blurhash" ,blurhash)
+ ("cpp-httplib" ,cpp-httplib)
("cmark" ,cmark)
+ ("gst-plugins-bad" ,gst-plugins-bad) ; sdp & webrtc for calls
("json-modern-cxx" ,json-modern-cxx)
("libolm" ,libolm)
("lmdb" ,lmdb)
@@ -2317,6 +2341,7 @@ for the Matrix protocol. It is built on to of @code{Boost.Asio}.")
("openssl" ,openssl)
("qtbase" ,qtbase)
("qtdeclarative" ,qtdeclarative)
+ ("qtkeychain" ,qtkeychain)
("qtgraphicaleffects" ,qtgraphicaleffects)
("qtmultimedia" ,qtmultimedia)
("qtquickcontrols2" ,qtquickcontrols2)
@@ -2325,8 +2350,11 @@ for the Matrix protocol. It is built on to of @code{Boost.Asio}.")
("tweeny" ,tweeny)
("zlib" ,zlib)))
(native-inputs
- `(("pkg-config" ,pkg-config)
- ("qtlinguist" ,qttools)))
+ `(("doxygen" ,doxygen)
+ ("graphviz" ,graphviz)
+ ("pkg-config" ,pkg-config)
+ ("qtlinguist" ,qttools)
+ ("single-application" ,single-application-qt5)))
(home-page "https://github.com/Nheko-Reborn/nheko")
(synopsis "Desktop client for Matrix using Qt and C++14")
(description "@code{Nheko} want to provide a native desktop app for the
--
2.29.2