[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
11/13: gnu: node: Add node-llparse-bootstrap.
From: |
guix-commits |
Subject: |
11/13: gnu: node: Add node-llparse-bootstrap. |
Date: |
Fri, 23 Oct 2020 18:14:47 -0400 (EDT) |
jlicht pushed a commit to branch wip-node-14
in repository guix.
commit aa50d9ceb1251f7290e6635b89ff775fc990b9a4
Author: Jelle Licht <jlicht@fsfe.org>
AuthorDate: Fri Oct 23 22:56:03 2020 +0200
gnu: node: Add node-llparse-bootstrap.
* gnu/packages/node.scm (node-llparse-bootstrap): New package.
---
gnu/packages/node.scm | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)
diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm
index a74bd5d..5b88253 100644
--- a/gnu/packages/node.scm
+++ b/gnu/packages/node.scm
@@ -466,6 +466,70 @@ modelled after @code{Node.js} core's debugging technique.
It works in
compiler.")
(license license:expat)))
+(define-public node-llparse-bootstrap
+ (package
+ (name "node-llparse")
+ (version "7.1.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/indutny/llparse.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "10da273iy2if88hp79cwms6c8qpsl1fkgzll6gmqyx5yxv5mkyp6"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Fix incorrect import semantics
+ ;; https://github.com/evanw/esbuild/issues/477
+ (substitute* (list "src/compiler/index.ts"
+ "src/implementation/c/node/base.ts"
+ "src/implementation/c/node/table-lookup.ts"
+ "src/implementation/c/compilation.ts"
+ "src/implementation/c/helpers/match-sequence.ts"
+ "src/implementation/c/code/mul-add.ts")
+ (("\\* as assert") "assert")
+ (("\\* as debugAPI") "debugAPI"))
+ #t))))
+ (build-system node-build-system)
+ (arguments
+ `(#:node ,node-bootstrap
+ #:tests? #f
+ #:phases
+ (modify-phases
+ %standard-phases
+ (delete 'configure)
+ (replace 'build
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((esbuild (string-append
+ (assoc-ref inputs "esbuild")
+ "/bin/esbuild")))
+ (invoke esbuild
+ "--platform=node"
+ "--external:debug"
+ "--external:llparse-frontend"
+ "--outfile=lib/api.js"
+ "--bundle"
+ "src/api.ts")))))))
+ (inputs
+ `(("node-debug" ,node-debug-bootstrap)
+ ("node-llparse-frontend"
+ ,node-llparse-frontend-bootstrap)))
+ (native-inputs
+ `(("esbuild" ,esbuild)))
+ (home-page
+ "https://github.com/nodejs/llparse#readme")
+ (properties '((hidden? . #t)))
+ (synopsis
+ "Compile incremental parsers to C code")
+ (description
+ "This package offers an API for compiling an incremental parser
+definition into a C output.")
+ (license license:expat)))
+
(define-public libnode
(package
(inherit node)
- branch wip-node-14 created (now 916db33), guix-commits, 2020/10/23
- 01/13: build-system: Rewrite node build system., guix-commits, 2020/10/23
- 02/13: gnu: Add libuv-node, guix-commits, 2020/10/23
- 03/13: gnu: node: Use license prefix., guix-commits, 2020/10/23
- 05/13: gnu: node: Add node-semver-bootstrap., guix-commits, 2020/10/23
- 06/13: gnu: node: Add node-ms-bootstrap., guix-commits, 2020/10/23
- 08/13: gnu: node: Add node-debug-bootstrap., guix-commits, 2020/10/23
- 04/13: gnu: node: Add node-bootstrap., guix-commits, 2020/10/23
- 07/13: gnu: node: Add node-binary-search-bootstrap., guix-commits, 2020/10/23
- 12/13: gnu: node: Add llhttp-bootstrap., guix-commits, 2020/10/23
- 11/13: gnu: node: Add node-llparse-bootstrap.,
guix-commits <=
- 10/13: gnu: node: Add node-llparse-frontend-bootstrap., guix-commits, 2020/10/23
- 09/13: gnu: node: Add node-llparse-builder-bootstrap., guix-commits, 2020/10/23
- 13/13: gnu: node: Add node-14.14, guix-commits, 2020/10/23