[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#51838] [PATCH v5 38/45] gnu: Add node-serialport-bindings.
From: |
Philip McGrath |
Subject: |
[bug#51838] [PATCH v5 38/45] gnu: Add node-serialport-bindings. |
Date: |
Thu, 16 Dec 2021 21:03:18 -0500 |
* gnu/packages/node-xyz.scm (node-serialport-bindings): New variable.
---
gnu/packages/node-xyz.scm | 53 +++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index d117df1e81..e56bccb895 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1054,3 +1054,56 @@ (define-public node-serialport-parser-readline
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.")))
+
+(define-public node-serialport-bindings
+ (package
+ (inherit node-serialport-binding-abstract)
+ (name "node-serialport-bindings")
+ (version "9.2.7")
+ (native-inputs
+ (list python))
+ (inputs
+ (list node-nan node-bindings node-serialport-binding-abstract
+ node-serialport-parser-readline node-debug))
+ (arguments
+ `(#:absent-dependencies
+ `("prebuild-install"
+ ;; devDependencies
+ "@serialport/binding-mock"
+ "node-abi")
+ #:modules
+ ((guix build node-build-system)
+ (guix build json)
+ (srfi srfi-1)
+ (ice-9 match)
+ (guix build utils))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda args
+ (chdir "packages/bindings")))
+ (add-after 'chdir 'avoid-prebuild-install
+ (lambda args
+ (with-atomic-file-replacement "package.json"
+ (lambda (in out)
+ (match (read-json in)
+ (('@ . meta-alist)
+ (match (assoc-ref meta-alist "scripts")
+ (('@ . scripts-alist)
+ (write-json
+ (cons '@ (assoc-set!
+ meta-alist
+ "scripts"
+ (cons '@ (assoc-remove! scripts-alist
+ "install"))))
+ out))))))))))
+ #:tests? #f))
+ (synopsis "Abstract base class for Node SerialPort bindings")
+ (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.
+
+This package provides the @code{Binding} class, which uses a native addon to
+talk to the underlying system. You never have to use @code{Binding} objects
+directly. There is also a @code{MockBinding} available (but not yet packaged
+for Guix) to assist with testing.")))
--
2.32.0
- [bug#51838] [PATCH v5 28/45] gnu: Add node-addon-api., (continued)
- [bug#51838] [PATCH v5 28/45] gnu: Add node-addon-api., Philip McGrath, 2021/12/16
- [bug#51838] [PATCH v5 29/45] gnu: Add node-sqlite3., Philip McGrath, 2021/12/16
- [bug#51838] [PATCH v5 30/45] gnu: Add node-file-uri-to-path., Philip McGrath, 2021/12/16
- [bug#51838] [PATCH v5 31/45] gnu: Add node-bindings., Philip McGrath, 2021/12/16
- [bug#51838] [PATCH v5 33/45] gnu: Add node-ms., Philip McGrath, 2021/12/16
- [bug#51838] [PATCH v5 32/45] gnu: Add node-segfault-handler., Philip McGrath, 2021/12/16
- [bug#51838] [PATCH v5 37/45] gnu: Add node-serialport-parser-readline., Philip McGrath, 2021/12/16
- [bug#51838] [PATCH v5 34/45] gnu: Add node-debug., Philip McGrath, 2021/12/16
- [bug#51838] [PATCH v5 35/45] gnu: Add node-serialport-binding-abstract., Philip McGrath, 2021/12/16
- [bug#51838] [PATCH v5 36/45] gnu: Add node-serialport-parser-delimiter., Philip McGrath, 2021/12/16
- [bug#51838] [PATCH v5 38/45] gnu: Add node-serialport-bindings.,
Philip McGrath <=
- [bug#51838] [PATCH v5 39/45] gnu: Add node-serialport-parser-regex., Philip McGrath, 2021/12/16
- [bug#51838] [PATCH v5 40/45] gnu: Add node-serialport-parser-ready., Philip McGrath, 2021/12/16
- [bug#51838] [PATCH v5 42/45] gnu: Add node-serialport-parser-cctalk., Philip McGrath, 2021/12/16
- [bug#51838] [PATCH v5 41/45] gnu: Add node-serialport-parser-inter-byte-timeout., Philip McGrath, 2021/12/16
- [bug#51838] [PATCH v5 44/45] gnu: Add node-serialport-stream., Philip McGrath, 2021/12/16
- [bug#51838] [PATCH v5 45/45] gnu: Add node-serialport., Philip McGrath, 2021/12/16
- [bug#51838] [PATCH v5 43/45] gnu: Add node-serialport-parser-byte-length., Philip McGrath, 2021/12/16
- [bug#51838] [PATCH v3 03/43] gnu: node: Patch shebangs in node_modules., Philip McGrath, 2021/12/08
- [bug#51838] [PATCH v3 05/43] guix: node-build-system: Refactor patch-dependencies phase., Philip McGrath, 2021/12/08
- [bug#51838] [PATCH v3 06/43] guix: node-build-system: Add #:absent-dependencies argument., Philip McGrath, 2021/12/08