Subject: [PATCH v2 11/33] gnu: Add node-nan.

From: Pierre Langlois <[email-masked]>
Date: Sun, 29 Aug 2021 11:45:46 +0100

---
 gnu/packages/node-xyz.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

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 <[email-masked]>
 ;;; Copyright © 2021 Noisytoot <[email-masked]>
 ;;; Copyright © 2021 Charles <[email-masked]>
+;;; Copyright © 2021 Pierre Langlois <[email-masked]>
 ;;;
 ;;; 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")
--
2.33.0