[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#51838] [PATCH 10/11] gnu: Add node-addon-api.
From: |
Philip McGrath |
Subject: |
[bug#51838] [PATCH 10/11] gnu: Add node-addon-api. |
Date: |
Sun, 14 Nov 2021 08:04:08 -0500 |
* gnu/packages/node-xyz.scm (node-addon-api): New variable.
---
gnu/packages/node-xyz.scm | 46 +++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 29ad14f810..8aa93122df 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -590,3 +590,49 @@ (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"))))
+ (build-system node-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ;; Ignore numerous missing devDependencies:
+ (delete 'configure)
+ (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 v2 26/26] gnu: Add node-sqlite3., (continued)
- [bug#51838] [PATCH 05/11] gnu: Add node-safe-buffer., Philip McGrath, 2021/11/14
- [bug#51838] [PATCH 07/11] gnu: Add node-readable-stream., Philip McGrath, 2021/11/14
- [bug#51838] [PATCH 04/11] gnu: Add node-inherits., Philip McGrath, 2021/11/14
- [bug#51838] [PATCH 09/11] gnu: Add node-openzwave-shared., Philip McGrath, 2021/11/14
- [bug#51838] [PATCH 06/11] gnu: Add node-string-decoder., Philip McGrath, 2021/11/14
- [bug#51838] [PATCH 08/11] gnu: Add node-nan., Philip McGrath, 2021/11/14
- [bug#51838] [PATCH 10/11] gnu: Add node-addon-api.,
Philip McGrath <=
- [bug#51838] [PATCH 11/11] gnu: Add node-sqlite3., Philip McGrath, 2021/11/14
[bug#51838] [PATCH 00/11] guix: node-build-system: Support compiling add-ons with node-gyp., Timothy Sample, 2021/11/20
[bug#51838] [PATCH 00/11] guix: node-build-system: Support compiling add-ons with node-gyp., Timothy Sample, 2021/11/20
[bug#51838] [PATCH 00/11] guix: node-build-system: Support compiling add-ons with node-gyp., Timothy Sample, 2021/11/20
[bug#51838] [PATCH v2 04/26] gnu: node: Add an npmrc file to set nodedir., Timothy Sample, 2021/11/20