GNU bug report logs - #47282
[PATCH 00/13] node going forward

Previous Next

Package: guix-patches;

Reported by: Jelle Licht <jlicht <at> fsfe.org>

Date: Sat, 20 Mar 2021 14:58:02 UTC

Severity: normal

Tags: patch

Done: Jelle Licht <jlicht <at> fsfe.org>

Bug is archived. No further changes may be made.

Full log


Message #38 received at 47282 <at> debbugs.gnu.org (full text, mbox):

From: Jelle Licht <jlicht <at> fsfe.org>
To: 47282 <at> debbugs.gnu.org
Subject: [PATCH 11/13] gnu: node: Add node-llparse-bootstrap.
Date: Sat, 20 Mar 2021 15:59:23 +0100
* gnu/packages/node.scm (node-llparse-bootstrap): New package.
---
 gnu/packages/node.scm | 62 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm
index 41c50e209e..380e959a58 100644
--- a/gnu/packages/node.scm
+++ b/gnu/packages/node.scm
@@ -477,6 +477,68 @@ 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"
+                       "--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
     (name "libnode")
-- 
2.31.0





This bug report was last modified 4 years and 48 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.