[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#51838] [PATCH v4 28/45] gnu: Add node-addon-api.
From: |
Philip McGrath |
Subject: |
[bug#51838] [PATCH v4 28/45] gnu: Add node-addon-api. |
Date: |
Mon, 13 Dec 2021 01:00:50 -0500 |
* gnu/packages/node-xyz.scm (node-addon-api): New variable.
---
gnu/packages/node-xyz.scm | 63 +++++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 43cf9fe660..c7bc660134 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -22,6 +22,9 @@
(define-module (gnu packages node-xyz)
#:use-module ((guix licenses) #:prefix license:)
+ #:use-module (gnu packages sqlite)
+ #:use-module (gnu packages python)
+ #:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix git-download)
#:use-module (guix build-system node))
@@ -592,3 +595,63 @@ (define-public node-nan
This project also contains some helper utilities that make addon development a
bit more pleasant.")
(license license:expat)))
+
+(define-public node-addon-api
+ (package
+ (name "node-addon-api")
+ (version "4.2.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/nodejs/node-addon-api")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1bhvfi2m9nxfz418s619914vmidcnrzbjv6l9nid476c3zlpazch"))))
+ (inputs
+ `(("python" ,python)
+ ("node-safe-buffer" ,node-safe-buffer)))
+ (build-system node-build-system)
+ (arguments
+ `(#:absent-dependencies
+ `("benchmark"
+ "bindings"
+ "clang-format"
+ "eslint"
+ "eslint-config-semistandard"
+ "eslint-config-standard"
+ "eslint-plugin-import"
+ "eslint-plugin-node"
+ "eslint-plugin-promise"
+ "fs-extra"
+ "path"
+ "pre-commit")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'skip-js-tests
+ ;; We can't run the js-based tests,
+ ;; but we can still do the C++ parts
+ (lambda args
+ (substitute* "package.json"
+ (("\"test\": \"node test\"")
+ "\"test\": \"echo stopping after pretest on Guix\"")))))))
+ (home-page "https://github.com/nodejs/node-addon-api")
+ (synopsis "Node.js API (Node-API) header-only C++ wrappers")
+ (description "This module contains header-only C++ wrapper classes which
+simplify the use of the C based Node-API provided by Node.js when using C++.
+It provides a C++ object model and exception handling semantics with low
+overhead.
+
+Node-API is an ABI stable C interface provided by Node.js for building native
+addons. It is intended to insulate native addons from changes in the
+underlying JavaScript engine and allow modules compiled for one version to run
+on later versions of Node.js without recompilation. The @code{node-addon-api}
+module, which is not part of Node.js, preserves the benefits of the Node-API
+as it consists only of inline code that depends only on the stable API
+provided by Node-API.
+
+It is important to remember that @emph{other} Node.js interfaces such as
+@code{libuv} (included in a project via @code{#include <uv.h>}) are not
+ABI-stable across Node.js major versions.")
+ (license license:expat)))
--
2.32.0
- [bug#51838] [PATCH v4 12/45] gnu: node-llparse-builder-bootstrap: Use #:absent-dependencies., (continued)
- [bug#51838] [PATCH v4 12/45] gnu: node-llparse-builder-bootstrap: Use #:absent-dependencies., Philip McGrath, 2021/12/13
- [bug#51838] [PATCH v4 13/45] gnu: node-llparse-frontend-bootstrap: Use #:absent-dependencies., Philip McGrath, 2021/12/13
- [bug#51838] [PATCH v4 14/45] gnu: node-llparse-bootstrap: Use #:absent-dependencies., Philip McGrath, 2021/12/13
- [bug#51838] [PATCH v4 15/45] gnu: node-semver: Use #:absent-dependencies., Philip McGrath, 2021/12/13
- [bug#51838] [PATCH v4 16/45] gnu: node-wrappy: Use #:absent-dependencies., Philip McGrath, 2021/12/13
- [bug#51838] [PATCH v4 19/45] gnu: node-irc: Use #:absent-dependencies., Philip McGrath, 2021/12/13
- [bug#51838] [PATCH v4 20/45] guix: node-build-system: Add implicit libuv input., Philip McGrath, 2021/12/13
- [bug#51838] [PATCH v4 17/45] gnu: node-once: Use #:absent-dependencies., Philip McGrath, 2021/12/13
- [bug#51838] [PATCH v4 18/45] gnu: node-irc-colors: Use #:absent-dependencies., Philip McGrath, 2021/12/13
- [bug#51838] [PATCH v4 21/45] guix: node-build-system: Add avoid-node-gyp-rebuild phase., Philip McGrath, 2021/12/13
- [bug#51838] [PATCH v4 28/45] gnu: Add node-addon-api.,
Philip McGrath <=
- [bug#51838] [PATCH v4 22/45] gnu: Add node-inherits., Philip McGrath, 2021/12/13
- [bug#51838] [PATCH v4 30/45] gnu: Add node-file-uri-to-path., Philip McGrath, 2021/12/13
- [bug#51838] [PATCH v4 31/45] gnu: Add node-bindings., Philip McGrath, 2021/12/13
- [bug#51838] [PATCH v4 37/45] gnu: Add node-serialport-parser-readling., Philip McGrath, 2021/12/13
- [bug#51838] [PATCH v4 25/45] gnu: Add node-readable-stream., Philip McGrath, 2021/12/13
- [bug#51838] [PATCH v4 27/45] gnu: Add node-openzwave-shared., Philip McGrath, 2021/12/13
- [bug#51838] [PATCH v4 23/45] gnu: Add node-safe-buffer., Philip McGrath, 2021/12/13
- [bug#51838] [PATCH v4 26/45] gnu: Add node-nan., Philip McGrath, 2021/12/13
- [bug#51838] [PATCH v4 32/45] gnu: Add node-segfault-handler., Philip McGrath, 2021/12/13
- [bug#51838] [PATCH v4 29/45] gnu: Add node-sqlite3., Philip McGrath, 2021/12/13