Subject: [bug#51838] [PATCH v9 33/41] gnu: Add node-serialport-parser-readline.

From: Philip McGrath <[email-masked]>
Date: Sat, 8 Jan 2022 03:42:21 -0500

* gnu/packages/node-xyz.scm (node-serialport-parser-readline): New
variable.
---
 gnu/packages/node-xyz.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index d35e4c6ba6..8e70afb71c 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1086,3 +1086,26 @@ (define-public node-serialport-parser-delimiter
 Parsers are used to take raw binary data and transform them into usable
 messages.  This package provides @code{Delimiter}, a parser that emits data
 each time a specified byte sequence is received.")))
+
+(define-public node-serialport-parser-readline
+  (package
+    (inherit node-serialport-binding-abstract)
+    (name "node-serialport-parser-readline")
+    (version "9.2.4")
+    (inputs
+     (list node-serialport-parser-delimiter))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'chdir
+           (lambda args
+             (chdir "packages/parser-readline"))))
+       #:tests? #f))
+    (synopsis "Node SerialPort parser to split data on newlines")
+    (description "Node SerialPort is a modular suite of Node.js packages for
+accessing serial ports.  The Guix package @code{node-serialport} provides the
+recommended high-level interface.
+
+Parsers are used to take raw binary data and transform them into usable
+messages.  This package provides @code{Readline}, a parser that emits data
+after a (configurable) newline delimiter is received.")))
-- 
2.32.0