diff mbox series

[bug#68941,v2,11/44] gnu: Add node-for-each.

Message ID 20240208002527.27165-11-ngraves@ngraves.fr
State New
Headers show
Series [bug#68941,v2,01/44] guix: build-system: node: Add trivial-node-package helper. | expand

Commit Message

Nicolas Graves Feb. 8, 2024, 12:24 a.m. UTC
* gnu/packages/node-xyz.scm (node-for-each): New variable.
---
 gnu/packages/node-xyz.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 34bdc83d0a..fbd3cdcd67 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -459,6 +459,39 @@  (define-public node-file-uri-to-path
 suitable for use with the @code{fs} module functions.")
     (license license:expat)))
 
+(define-public node-for-each
+  (package
+    (name "node-for-each")
+    (version "0.3.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/Raynos/for-each")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0c28lq995xr3anf407zizdh8z18pag6ww8fm95yxl8m1sdfljya7"))))
+    (build-system node-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'patch-dependencies 'delete-dependencies
+           (lambda args
+             (delete-dependencies
+              '("@ljharb/eslint-config"
+		"eslint"
+		"nsp"
+                "tape")))))
+       #:tests? #f))  ; FIXME tests depend on node-tape.
+    (inputs (list node-is-callable))
+    (home-page "https://github.com/Raynos/for-each")
+    (synopsis "Alternative implementation of the forEach Javascript function")
+    (description "This package provides an alternative implementation of the
+forEach Javascript function, which works not only on
+@code{Array.prototype.forEach} but also on objects.")
+    (license license:expat)))
+
 (define-public node-function-bind
   (package
     (name "node-function-bind")