[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#67019] [PATCH 10/16] gnu: Add node-flow-parser.
From: |
Philip McGrath |
Subject: |
[bug#67019] [PATCH 10/16] gnu: Add node-flow-parser. |
Date: |
Thu, 9 Nov 2023 11:26:32 -0500 |
* gnu/packages/web.scm (node-flow-parser): New variable.
(ocaml-flow-parser)[description]: Mention it.
---
gnu/packages/web.scm | 45 +++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 44 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 82923786f2..0ade9e46e3 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -2029,9 +2029,52 @@ (define-public ocaml-flow-parser
(synopsis "Parser for the Flow JavaScript type system")
(description "Flow is a gradual type system for JavaScript. This package
provides the Flow parser, which is an OCaml library that can also be compiled
-to JavaScript.")
+to JavaScript. To use the compiled parser with Node.js or NPM, see the Guix
+package @code{node-flow-parser}.")
(license license:expat)))
+(define-public node-flow-parser
+ (package
+ (inherit ocaml-flow-parser)
+ (name "node-flow-parser")
+ (properties '())
+ (outputs '("out"))
+ (propagated-inputs '())
+ (native-inputs '())
+ (inputs (list `(,ocaml-flow-parser "js")))
+ (build-system node-build-system)
+ (arguments
+ (list
+ #:tests? #f ; need unpackaged dependencies
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'delete-workspace-file
+ (lambda args
+ ;; this workspace file causes NPM to try to install dependencies
+ ;; of other packages developed in this source repository
+ (delete-file "package.json")))
+ (add-after 'delete-workspace-file 'chdir
+ (lambda args
+ (chdir "packages/flow-parser")))
+ (add-after 'chdir 'unpack-generated-js
+ (lambda* (#:key inputs #:allow-other-keys)
+ (install-file
+ (search-input-file inputs
+ "share/javascript/flow/flow_parser.js")
+ ".")
+ (delete-file "Makefile")))
+ (add-after 'patch-dependencies 'delete-dependencies
+ (lambda args
+ (delete-dependencies
+ '("ast-types"
+ "colors"
+ "esprima-fb"
+ "minimist")))))))
+ (synopsis "Parser for the Flow JavaScript type system")
+ (description "Flow is a gradual type system for JavaScript. This package
+provides the Flow parser in its compiled-to-JavaScript form for use with
+Node.js and NPM.")))
+
(define-public tinyproxy
(package
(name "tinyproxy")
--
2.41.0
[bug#67019] [PATCH 05/16] gnu: Add ocaml-visitors., Philip McGrath, 2023/11/09
[bug#67019] [PATCH 06/16] gnu: Add ocaml-ppx-gen-rec., Philip McGrath, 2023/11/09
[bug#67019] [PATCH 11/16] gnu: Add flow-remove-types., Philip McGrath, 2023/11/09
[bug#67019] [PATCH 10/16] gnu: Add node-flow-parser.,
Philip McGrath <=
[bug#67019] [PATCH 12/16] gnu: js-commander: Update to 11.1.0., Philip McGrath, 2023/11/09
[bug#67019] [PATCH 04/16] gnu: Add ocaml-wtf8., Philip McGrath, 2023/11/09
[bug#67019] [PATCH 08/16] gnu: Add node-vlq., Philip McGrath, 2023/11/09
[bug#67019] [PATCH 07/16] gnu: Add ocaml-dtoa., Philip McGrath, 2023/11/09
[bug#67019] [PATCH 14/16] gnu: Add mftrace., Philip McGrath, 2023/11/09
[bug#67019] [PATCH 09/16] gnu: Add ocaml-flow-parser., Philip McGrath, 2023/11/09
[bug#67019] [PATCH 13/16] gnu: js-commander: Install as a node module., Philip McGrath, 2023/11/09
[bug#67019] [PATCH 15/16] gnu: Add font-katex., Philip McGrath, 2023/11/09
[bug#67019] [PATCH 16/16] gnu: Add katex., Philip McGrath, 2023/11/09