diff mbox series

[bug#49946,10/31] gnu: Add node-nan.

Message ID 20210808233354.6745-10-pierre.langlois@gmx.com
State New
Headers show
Series Tree-sitter, node-gyp addon support and emacs-tree-sitter | expand

Commit Message

Pierre Langlois Aug. 8, 2021, 11:33 p.m. UTC
---
 gnu/packages/node-xyz.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

--
2.32.0
diff mbox series

Patch

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index cbb68f77d6..eb4b59d1ab 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -3,6 +3,7 @@ 
 ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
 ;;; Copyright © 2021 Noisytoot <noisytoot@disroot.org>
 ;;; Copyright © 2021 Charles <charles.b.jackson@protonmail.com>
+;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -171,6 +172,35 @@  user-land JavaScript.")
 random number generator.")
     (license license:bsd-3)))

+(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
+     '(#:tests? #f                      ; FIXME: tests depend on node-tap
+       #:phases
+       (modify-phases %standard-phases
+         ;; The default configure phase fails due to tap being missing, as we do
+         ;; not have tap packaged yet.  It is used only for tests.  This package
+         ;; still works as a dependency of node-glob and node-inflight.
+         (delete 'configure))))
+    (home-page "https://github.com/nodejs/nan")
+    (synopsis "Native Abstractions for Node.js")
+    (description "This package provides header files filled with macros and
+utilities for making add-on development for Node.js easier across versions.")
+    (license license:bsd-3)))
+
 (define-public node-oop
   ;; No releases, last commit was February 2013.
   (let ((commit "f9d87cda0958886955c14a0a716e57021ed295dc")