[PATCH] gnu: Add nanomq.

  • Open
  • quality assurance status badge
Details
3 participants
  • Christopher Baines
  • Mathieu Othacehe
  • Nikolay Korotkiy
Owner
unassigned
Submitted by
Nikolay Korotkiy
Severity
normal

Debbugs page

N
N
Nikolay Korotkiy wrote on 7 Jan 2023 03:51
(address . guix-patches@gnu.org)(name . Nikolay Korotkiy)(address . sikmir@disroot.org)
ce59f92df743d81b193de451d5e45614502042c8.1673092288.git.sikmir@disroot.org
* gnu/packages/networking.scm (nanomq): New variable.
---
gnu/packages/networking.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)

Toggle diff (50 lines)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index a7b51ed1ff..588f657c00 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -871,6 +871,41 @@ (define-public nanomsg
(home-page "https://nanomsg.org/")
(license (license:non-copyleft "file:///COPYING"))))
+(define-public nanomq
+ (package
+ (name "nanomq")
+ (version "0.14.8")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/emqx/nanomq")
+ (commit version)
+ (recursive? #t)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1min3xrdiyzj8yal02hx3axh4hfr930qi3jwa9zx67jp9lgyqqmd"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:tests? #f
+ #:configure-flags (list "-DNNG_ENABLE_TLS=ON" "-DNNG_ENABLE_SQLITE=ON")
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'fix-etc-destination
+ (lambda _
+ (let* ((out (assoc-ref %outputs "out"))
+ (etc (string-append out "/etc")))
+ (substitute* "CMakeLists.txt"
+ (("DESTINATION /etc")
+ (string-append "DESTINATION " etc)))) #t)))))
+ (inputs (list mbedtls-apache sqlite))
+ (synopsis "An ultra-lightweight and blazing-fast MQTT broker for IoT edge")
+ (description
+ "NanoMQ bases on NNG's asynchronous I/O threading model, with an
+extension of MQTT support in the protocol layer and reworked transport layer,
+plus an enhanced asynchronous IO mechanism maximizing the overall capacity.")
+ (home-page "https://nanomq.io/")
+ (license license:expat)))
+
(define-public blueman
(package
(name "blueman")

base-commit: d16edd03cfa84f6d5fed979fd7283966cd3e4934
--
2.37.2
M
M
Mathieu Othacehe wrote on 8 Jan 2023 05:31
(name . Nikolay Korotkiy)(address . sikmir@disroot.org)(address . 60622@debbugs.gnu.org)
87tu11up9j.fsf@gnu.org
Hey,

Toggle quote (5 lines)
> + (uri (git-reference
> + (url "https://github.com/emqx/nanomq")
> + (commit version)
> + (recursive? #t)))

It looks like nng is packaged by Guix, can it be used?

Toggle quote (3 lines)
> + (arguments
> + `(#:tests? #f

You need to justify why the tests are disabled. Is it because there are
no tests, because some do not pass?

Toggle quote (6 lines)
> + #:configure-flags (list "-DNNG_ENABLE_TLS=ON" "-DNNG_ENABLE_SQLITE=ON")
> + #:phases (modify-phases %standard-phases
> + (add-after 'unpack 'fix-etc-destination
> + (lambda _
> + (let* ((out (assoc-ref %outputs "out"))

It would be better to use the new gexp based style. You can have a look
to the lldpd package above for an example.


Toggle quote (5 lines)
> + (etc (string-append out "/etc")))
> + (substitute* "CMakeLists.txt"
> + (("DESTINATION /etc")
> + (string-append "DESTINATION " etc)))) #t)))))

You can omit the trailing #t.

Toggle quote (3 lines)
> + (inputs (list mbedtls-apache sqlite))
> + (synopsis "An ultra-lightweight and blazing-fast MQTT broker for IoT edge")

This a commercial description. Something like: "Lightweight MQTT broker"
would be enough.

Toggle quote (5 lines)
> + (description
> + "NanoMQ bases on NNG's asynchronous I/O threading model, with an
> +extension of MQTT support in the protocol layer and reworked transport layer,
> +plus an enhanced asynchronous IO mechanism maximizing the overall capacity.")

It does not really tell what this package does, what is a broker for
instance?

Could you please send an updated version :)? Don't hesitate to ask for
guidance if my comments are unclear.

Thanks,

Mathieu
C
C
Christopher Baines wrote on 17 Feb 2023 06:52
tag 60622 moreinfo
(address . control@debbugs.gnu.org)
873574s5s2.fsf@cbaines.net
tags 60622 + moreinfo
quit
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 60622@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 60622
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