diff mbox series

[bug#51838,v5,26/45] gnu: Add node-nan.

Message ID 20211217020325.520821-27-philip@philipmcgrath.com
State Accepted
Headers show
Series guix: node-build-system: Support compiling add-ons with node-gyp. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Philip McGrath Dec. 17, 2021, 2:03 a.m. UTC
* gnu/packages/node-xyz.scm (node-nan): New variable.
---
 gnu/packages/node-xyz.scm | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 87694c7d00..d8ce7248f8 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -549,3 +549,42 @@  (define-public node-irc
     (description "@code{node-irc} is an IRC client library for Node.js.
 It has functions for joining, parting, talking, and many other IRC commands.")
     (license license:gpl3+)))
+
+(define-public node-nan
+  (package
+    (name "node-nan")
+    (version "2.15.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/nodejs/nan")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "18xslh9va5ld872scrp5y4251ax9s3c6qh0lnl1200lpzbsxy7yd"))))
+    (build-system node-build-system)
+    (arguments
+     `(#:absent-dependencies
+       '("bindings"
+         "commander"
+         "glob"
+         "request"
+         "node-gyp" ;; would be needed for tests
+         "tap"
+         "xtend")
+       ;; tests need tap and other dependencies
+       #:tests? #f))
+    (inputs
+     (list node-readable-stream))
+    (home-page "https://github.com/nodejs/nan")
+    (synopsis "Native Abstractions for Node.js")
+    (description "Native Abstractions for Node.js (``NaN'') provides a header
+file filled with macro and utility goodness for making add-on development for
+Node.js easier across versions.  The goal of this project is to store all logic
+necessary to develop native Node.js addons without having to inspect
+@code{NODE_MODULE_VERSION} and get yourself into a macro-tangle.
+
+This project also contains some helper utilities that make addon development a
+bit more pleasant.")
+    (license license:expat)))