[PATCH] gnu: nheko: Update to 0.8.0.

  • Done
  • quality assurance status badge
Details
3 participants
  • Nicolò Balzarotti
  • Jonathan Brielmaier
  • Michael Rohleder
Owner
unassigned
Submitted by
Michael Rohleder
Severity
normal
M
M
Michael Rohleder wrote on 21 Jan 2021 02:03
(address . guix-patches@gnu.org)(name . Michael Rohleder)(address . mike@rohleder.de)
20210121010323.3172-1-mike@rohleder.de
* gnu/packages/messaging.scm (nheko): Update to 0.8.0.
[arguments]: Remove -fpermissive flag, remove remove-Werror phase, add phase wrap-program.
[inputs]: Add gst-plugins-base, gst-plugins-bad, libnice, qtkeychain.
[description]: Add items for new features.
(mtxclient): Update to 0.4.0.
[arguments]: Remove set-home phase.
---
This nheko needs a newer mtxclient (and current nheko doesn't build with new mtxclient),
so we need to update them together.

I tested voice calls (which seems to work), but couldn't get video calls to work:
"[ui] [error] Missing GStreamer plugins: opengl qmlgl" (at runtime)
Do we have these gstreamer plugins?

I think the new features and fixes are worth a push (voice over matrix is nice and
enough for me) and perhaps the video thing can be fixed later on (I leaved it out of the
description).

(Hint for people upgrading from current nheko: One needs to remove ~/.config/nheko
and ~/.cache/nheko or this version will segfault. This known upstream (and afaik won't
be fixed))

gnu/packages/messaging.scm | 38 ++++++++++++++++++++------------------
1 file changed, 20 insertions(+), 18 deletions(-)

Toggle diff (119 lines)
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 1820a146d1..b3a34fb4cb 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -2227,7 +2227,7 @@ QMatrixClient project.")
(define-public mtxclient
(package
(name "mtxclient")
- (version "0.3.1")
+ (version "0.4.0")
(source
(origin
(method git-fetch)
@@ -2236,7 +2236,7 @@ QMatrixClient project.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1dg4dq20g0ah62j5s3gpsxqq4ny7lxkxdxa9q6g54hdwkrb9ms7x"))))
+ (base32 "1x820rcfz5r203dc8a0rzavcjjx10fsv1dicqg65m6kxx1w95j5r"))))
(arguments
`(#:configure-flags
(list
@@ -2249,12 +2249,6 @@ QMatrixClient project.")
(substitute* "CMakeLists.txt"
(("add_test\\((BasicConnectivity|ClientAPI|MediaAPI|Encryption|Pushrules)")
"# add_test"))
- #t))
- (add-before 'configure 'set-home
- (lambda _
- ;; Tries to create package registry file
- ;; So, set HOME.
- (setenv "HOME" "/tmp")
#t)))))
(build-system cmake-build-system)
(inputs
@@ -2277,7 +2271,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,30 +2280,34 @@ 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"))))
(arguments
`(#:tests? #f ;no test target
#:configure-flags
(list
- "-DCMAKE_BUILD_TYPE=Release"
- "-DCMAKE_CXX_FLAGS=-fpermissive")
+ "-DCMAKE_BUILD_TYPE=Release")
#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'remove-Werror
- (lambda _
- (substitute* "CMakeLists.txt"
- (("-Werror") ""))
- #t))
(add-after 'unpack 'fix-determinism
(lambda _
;; Make Qt deterministic.
(setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1")
- #t)))))
+ #t))
+ (add-after 'install 'wrap-program
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH")))
+ (wrap-program (string-append out "/bin/nheko")
+ `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path)))
+ #t))))))
(build-system qt-build-system)
(inputs
`(("boost" ,boost)
("cmark" ,cmark)
+ ("gst-plugins-base" ,gst-plugins-base) ;for voip
+ ("gst-plugins-bad" ,gst-plugins-bad) ;for voip
("json-modern-cxx" ,json-modern-cxx)
+ ("libnice" ,libnice) ;for voip
("libolm" ,libolm)
("lmdb" ,lmdb)
("lmdbxx" ,lmdbxx)
@@ -2318,6 +2316,7 @@ for the Matrix protocol. It is built on to of @code{Boost.Asio}.")
("qtbase" ,qtbase)
("qtdeclarative" ,qtdeclarative)
("qtgraphicaleffects" ,qtgraphicaleffects)
+ ("qtkeychain" ,qtkeychain)
("qtmultimedia" ,qtmultimedia)
("qtquickcontrols2" ,qtquickcontrols2)
("qtsvg" ,qtsvg)
@@ -2336,10 +2335,12 @@ client.
There is support for:
@itemize
@item E2E encryption (text messages only: attachments are currently sent unencrypted).
+@item VoIP calls (voice).
@item User registration.
@item Creating, joining & leaving rooms.
@item Sending & receiving invites.
@item Sending & receiving files and emoji.
+@item Replies with text, images and other media.
@item Typing notifications.
@item Username auto-completion.
@item Message & mention notifications.
@@ -2348,6 +2349,7 @@ There is support for:
@item Basic communities support.
@item Room switcher (@key{ctrl-K}).
@item Light, Dark & System themes.
+@item Creating seperate profiles (command line only, use -p).
@end itemize")
(license license:gpl3+)))
--
2.30.0
J
J
Jonathan Brielmaier wrote on 21 Jan 2021 08:13
(address . guix-patches@gnu.org)
0debb35f-e005-d924-5561-1150ae4d4f12@web.de
On 21.01.21 02:03, Michael Rohleder wrote:
Toggle quote (7 lines)
> * gnu/packages/messaging.scm (nheko): Update to 0.8.0.
> [arguments]: Remove -fpermissive flag, remove remove-Werror phase, add phase wrap-program.
> [inputs]: Add gst-plugins-base, gst-plugins-bad, libnice, qtkeychain.
> [description]: Add items for new features.
> (mtxclient): Update to 0.4.0.
> [arguments]: Remove set-home phase.

Nicolo did almost the same in http://issues.guix.gnu.org/46012...
N
N
Nicolò Balzarotti wrote on 21 Jan 2021 09:38
871reeznv9.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me
Michael Rohleder <mike@rohleder.de> writes:

Toggle quote (2 lines)
> * gnu/packages/messaging.scm (nheko): Update to 0.8.0.
>
Hi! As Jonathan already noted, I did upgrade nheko too.

Toggle quote (4 lines)
> (Hint for people upgrading from current nheko: One needs to remove ~/.config/nheko
> and ~/.cache/nheko or this version will segfault. This known upstream (and afaik won't
> be fixed))
>
I reported an issue upstream [1], and it seems the problem is with disk
cache (as you noted, you are removing .cache/nheko) and the proper fix
is to add "-DCOMPILE_QML=ON".

Toggle quote (2 lines)
> + ("libnice" ,libnice) ;for voip

I found it in the readme, but not in the cmake file, is this needed?

Toggle quote (4 lines)
> +@item VoIP calls (voice).
> +@item Replies with text, images and other media.
> +@item Creating seperate profiles (command line only, use -p).

Ops, I forgot to add them. Maybe as we are doing with other packages,
this list should be converted into a simplier description.

Toggle quote (2 lines)
> (license license:gpl3+)))

During this upgrade, I noticed 3 bundled libraries (two of them released
under expat. So this should be changed. But if you want to take over
my patches and submit a new one integrating my changes (mainly
unvendoring the dependencies), this would be great.

Thanks, Nicolò

M
M
Michael Rohleder wrote on 21 Jan 2021 20:58
(name . Nicolò Balzarotti)(address . anothersms@gmail.com)(address . 46013@debbugs.gnu.org)
87r1me6p0e.fsf@rohleder.de
Hi Nicolo!

Nicolò Balzarotti <anothersms@gmail.com> writes:
Toggle quote (2 lines)
> Hi! As Jonathan already noted, I did upgrade nheko too.

Yes. Unfortunately, we "miss" each other only on some minutes ;)

Toggle quote (8 lines)
>> (Hint for people upgrading from current nheko: One needs to remove ~/.config/nheko
>> and ~/.cache/nheko or this version will segfault. This known upstream (and afaik won't
>> be fixed))
>>
> I reported an issue upstream [1], and it seems the problem is with disk
> cache (as you noted, you are removing .cache/nheko) and the proper fix
> is to add "-DCOMPILE_QML=ON".

Ok.
(Hard to test for me now ;)

Toggle quote (4 lines)
>> + ("libnice" ,libnice) ;for voip
>
> I found it in the readme, but not in the cmake file, is this needed?

Yes, otherwise voice calls don't work as the "nice" gst-plugin is loaded
at runtime.

Toggle quote (7 lines)
>> (license license:gpl3+)))
>
> During this upgrade, I noticed 3 bundled libraries (two of them released
> under expat. So this should be changed. But if you want to take over
> my patches and submit a new one integrating my changes (mainly
> unvendoring the dependencies), this would be great.

I think, it might be better to base on your patches to not complicate
things even more.

I think, the most important part missing in your patch is the wrapping
of the GST_PLUGIN variable. Otherwise gstreamer/voip doen't work at all.
(But this could also be added after bumping, I guess)

--
Imagination is more important than knowledge - Albert Einstein
-----BEGIN PGP SIGNATURE-----

iQFFBAEBCAAvFiEEdV4t5dDVhcUueCgwfHr/vv7yyyUFAmAJ3OERHG1pa2VAcm9o
bGVkZXIuZGUACgkQfHr/vv7yyyUXsggApUVFUz5pXxy1nCfL9pYgdhtb9cZ1DSEW
HQTEzHBQ1FR/p/KJy2BPOfnz/rd3nBK1SvCscl4AxRwsYntpoZ5LvPgNh+z3Sq+K
wZu1OplD7G3PWlDdrz1J6KKjVY5lg45cvykahCZWg2RH5abw5AT8s7sphO8fwruD
Sm1GAzgbJjWOn1LySbtWhN2hAhFwOUlY4PvIcIVirTlHTe6oUD6LrL6LoQPLERt4
Hixl0nZ6qpYU1PQVf1w6nCw8xgGGicUkHpxCmrvlVBlpvKM2U07Kot03I5Q/SAni
hJ7eQlhU+7dm5yaKQpK2r12Z4SbC73aGRk/zr+skBaXfQeX/1zaS6g==
=qaf/
-----END PGP SIGNATURE-----

M
M
Michael Rohleder wrote on 21 Jan 2021 20:59
Re: bug#46013: [PATCH] gnu: nheko: Update to 0.8.0.
(name . Jonathan Brielmaier)(address . jonathan.brielmaier@web.de)(address . 46013-close@debbugs.gnu.org)
87pn1y6oy8.fsf_-_@rohleder.de
Jonathan Brielmaier <jonathan.brielmaier@web.de> writes:

Toggle quote (11 lines)
> On 21.01.21 02:03, Michael Rohleder wrote:
>> * gnu/packages/messaging.scm (nheko): Update to 0.8.0.
>> [arguments]: Remove -fpermissive flag, remove remove-Werror phase, add phase wrap-program.
>> [inputs]: Add gst-plugins-base, gst-plugins-bad, libnice, qtkeychain.
>> [description]: Add items for new features.
>> (mtxclient): Update to 0.4.0.
>> [arguments]: Remove set-home phase.
>
> Nicolo did almost the same in http://issues.guix.gnu.org/46012 ...
>

I'm sorry!

I think, he did this patch very differently and to make it easier for
everyone, I close this.

--
Testing can show the presense of bugs, but not their absence.
-- Dijkstra
-----BEGIN PGP SIGNATURE-----

iQFFBAEBCAAvFiEEdV4t5dDVhcUueCgwfHr/vv7yyyUFAmAJ3TARHG1pa2VAcm9o
bGVkZXIuZGUACgkQfHr/vv7yyyX2lgf/WenSAtaHp2vAM5GCIt8LeLWAup057syH
jy80xNk21p+bP4qTteR1DPisS8j2Sodv1laxr6XwBUL0bgF/I5igd55fzV19Chn7
G885IObTDBvOg6R9rAEixBo3Km3ljS6CPMoUj36bIgN3ULALH4XT/OWvTLkznIBq
lX1vJhdo1Eekp2tb7JqKj2UKnDmKo2uNdU2El/0waXdpDJ953b/tRqZorH1dNINy
ov8+M2z2UCABOmQ+2aQTLAx9amDEd3R3SMj7inj9POQvRn6b1I8LaOsVx4XwIe+I
9TzdvqSjTYg8A3zfohwenEPK7jHcs0KLV4QmEYv6hKwkhwxglaD7XQ==
=3vOZ
-----END PGP SIGNATURE-----

N
N
Nicolò Balzarotti wrote on 21 Jan 2021 21:45
Re: [bug#46013] [PATCH] gnu: nheko: Update to 0.8.0.
(name . Michael Rohleder)(address . mike@rohleder.de)(address . 46013@debbugs.gnu.org)
87y2gmxbmq.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me
Michael Rohleder <mike@rohleder.de> writes:

Toggle quote (2 lines)
> Hi Nicolo!

Hi Michael & all,

Toggle quote (2 lines)
> I think, it might be better to base on your patches to not complicate
> things even more.
Done, I updated the copyright line for you, used your commit message
(updated accordingly).

Toggle quote (3 lines)
> I think, the most important part missing in your patch is the wrapping
> of the GST_PLUGIN variable. Otherwise gstreamer/voip doen't work at all.
> (But this could also be added after bumping, I guess)
With you wrapper phase (and adding gst-plugin-good) I got voip call
working!

For video calls, I get this:
Toggle quote (2 lines)
> Missing GStreamer plugins: opengl qmlgl

But qmlgl should be in -good, so we should take a look at gstreamer to
check why it is not included.
From 38be202dce880dd77a5ce774c0c8877bed84975e Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Wed, 20 Jan 2021 10:08:20 +0100
Subject: [PATCH v2 1/4] gnu: Add cpp-httplib.

* gnu/packages/cpp.scm (cpp-httplib): New variable.
---
gnu/packages/cpp.scm | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)

Toggle diff (67 lines)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 45d3faeafb..2a03ec58c5 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -16,6 +16,7 @@
;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
;;; Copyright © 2020 Greg Hogan <code@greghogan.com>
;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
+;;; Copyright © 2021 Nicolò Balzarotti <nicolo@nixo.xyz>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -57,6 +58,7 @@
#:use-module (gnu packages logging)
#:use-module (gnu packages maths)
#:use-module (gnu packages perl)
+ #:use-module (gnu packages python)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages popt)
#:use-module (gnu packages pretty-print)
@@ -475,6 +477,44 @@ tools:
@end itemize\n")
(license license:bsd-3)))
+(define-public cpp-httplib
+ (package
+ (name "cpp-httplib")
+ (version "0.8.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/yhirose/cpp-httplib")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32 "1l9n58ml7sygy723ws0z6brdbx4spc6fya6vgim11hpiy5b7zdkx"))
+ (file-name (git-file-name name version))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:configure-flags
+ '("-DBUILD_SHARED_LIBS=ON"
+ "-DHTTPLIB_COMPILE=ON")
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key source #:allow-other-keys)
+ ;; openssl genrsa wants to write a file in the git checkout
+ (copy-file (string-append source "/test") "test")
+ (chmod "test" #o744)
+ (invoke "make"))))))
+ (native-inputs
+ `(("python" ,python) ; required to build shared lib
+ ;; required for tests
+ ("openssl" ,openssl)
+ ("zlib" ,zlib)))
+ (home-page "https://github.com/yhirose/cpp-httplib")
+ (synopsis "C++ header-only HTTP/HTTPS server and client library")
+ (description "cpp-httplib is a C++11 single-file header-only cross
+platform blocking HTTP/HTTPS library, easy to setup. Just include the
+@file{httplib.h} file in your code!")
+ (license license:expat)))
+
(define-public cpplint
(package
(name "cpplint")
--
2.29.2
From 8fb37dd519fcc7038e54cdc858310983e29770f1 Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Wed, 20 Jan 2021 17:56:04 +0100
Subject: [PATCH v2 2/4] gnu: Add blurhash.

* gnu/packages/image.scm (blurhash): New variable.
---
gnu/packages/image.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (53 lines)
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 935333dee2..d633b2aeab 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -28,6 +28,7 @@
;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Zhu Zihao <all_but_last@163.com>
;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2021 Nicolò Balzarotti <nicolo@nixo.xyz>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -59,6 +60,7 @@
#:use-module (gnu packages fontutils)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages gettext)
+ #:use-module (gnu packages gcc)
#:use-module (gnu packages ghostscript)
#:use-module (gnu packages gimp)
#:use-module (gnu packages gl)
@@ -1996,6 +1998,30 @@ SNG is implemented by a compiler/decompiler called sng that
losslessly translates between SNG and PNG.")
(license license:zlib)))
+(define-public blurhash
+ (package
+ (name "blurhash")
+ (version "0.0.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Nheko-Reborn/blurhash")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0jy2iigarskwfhskyladbb6l92x1fb3i3vz4bvcks0za4w5hfxk5"))))
+ (build-system meson-build-system)
+ (native-inputs
+ `(("cmake" ,cmake)
+ ("doctest" ,doctest)
+ ("gcc" ,gcc-8)))
+ (home-page "https://github.com/Nheko-Reborn/blurhash")
+ (synopsis "C++ blurhash encoder/decoder")
+ (description "Simple encoder and decoder for blurhashes. Contains a
+command line program as well as a shared library.")
+ (license license:boost1.0)))
+
(define-public lodepng
;; There are no tags in the repository, so we take the version as defined in
;; lodepng.cpp.
--
2.29.2
From 4cb222f16727f74ecc1550d72c3d52b20ab0d20b Mon Sep 17 00:00:00 2001
From: nixo <nicolo@nixo.xyz>
Date: Wed, 20 Jan 2021 19:23:17 +0100
Subject: [PATCH v2 3/4] gnu: Add single-application-qt5.

* gnu/packages/qt.scm (single-application-qt5): New variable.
---
gnu/packages/qt.scm | 56 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)

Toggle diff (76 lines)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 79d41b3e73..205d99c017 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -20,6 +20,7 @@
;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Nicolò Balzarotti <nicolo@nixo.xyz>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1947,6 +1948,61 @@ using the Chromium browser project. The Chromium source code has Google service
and binaries removed, and adds modular support for using system libraries.")
(license license:lgpl2.1+)))
+(define-public single-application-qt5
+ ;; Change in function signature, nheko requires at least this commit
+ (let ((commit "dc8042b5db58f36e06ba54f16f38b16c5eea9053"))
+ (package
+ (name "single-application-qt5")
+ (version (string-append "3.2.0-" (string-take commit 7)))
+ (source
+ (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://github.com/itay-grudev/SingleApplication")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "163aa2x2qb0h8w26si5ql833ilj427jjbdwlz1p2p8iaq6dh0vq1"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:tests? #f ; no check target
+ ;; Projects can decide how to build this library. You might need to
+ ;; override this flag (QApplication, QGuiApplication or
+ ;; QCoreApplication).
+ #:configure-flags '("-DQAPPLICATION_CLASS=QApplication")
+ #:phases
+ (modify-phases %standard-phases
+ ;; No install target, install things manually
+ (replace 'install
+ (lambda* (#:key inputs outputs source #:allow-other-keys)
+ (let* ((qt (assoc-ref inputs "qtbase"))
+ (qt-version ,(version-major (package-version qt)))
+ (out (assoc-ref outputs "out")))
+ (install-file
+ "libSingleApplication.a" (string-append out "/lib"))
+ (for-each
+ (lambda (file)
+ (install-file
+ (string-append source "/" file)
+ (string-append out "/include")))
+ '("SingleApplication"
+ "singleapplication.h" "singleapplication_p.h"))
+ #t))))))
+ (inputs
+ `(("qtbase" ,qtbase)))
+ (home-page "https://github.com/itay-grudev/SingleApplication")
+ (synopsis "Replacement of QtSingleApplication for Qt5 and Qt6")
+ (description
+ "SingleApplication is a replacement of the QtSingleApplication for Qt5 and Qt6.
+
+nKeeps the Primary Instance of your Application and kills each subsequent
+instances. It can (if enabled) spawn secondary (non-related to the primary)
+instances and can send data to the primary instance from secondary
+instances.")
+ (license license:expat))))
+
(define-public python-sip
(package
(name "python-sip")
--
2.29.2
?
Your comment

This issue is archived.

To comment on this conversation send an email to 46013@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 46013
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch