From patchwork Sat Mar 20 14:59:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jelle Licht X-Patchwork-Id: 27989 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D8A3E27BC58; Sat, 20 Mar 2021 15:01:52 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A288F27BC57 for ; Sat, 20 Mar 2021 15:01:52 +0000 (GMT) Received: from localhost ([::1]:53686 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNd6t-0001I4-RU for patchwork@mira.cbaines.net; Sat, 20 Mar 2021 11:01:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42798) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNd5E-0008Su-7i for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41475) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lNd5D-0001cd-KV for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lNd5D-0000OT-Ib for guix-patches@gnu.org; Sat, 20 Mar 2021 11:00:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47282] [PATCH 10/13] gnu: node: Add node-llparse-frontend-bootstrap. Resent-From: Jelle Licht Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 20 Mar 2021 15:00:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47282 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47282@debbugs.gnu.org Received: via spool by 47282-submit@debbugs.gnu.org id=B47282.16162523801365 (code B ref 47282); Sat, 20 Mar 2021 15:00:07 +0000 Received: (at 47282) by debbugs.gnu.org; 20 Mar 2021 14:59:40 +0000 Received: from localhost ([127.0.0.1]:53006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd4l-0000Lr-LS for submit@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:39 -0400 Received: from mail1.fsfe.org ([217.69.89.151]:47266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lNd4h-0000Kh-LX for 47282@debbugs.gnu.org; Sat, 20 Mar 2021 10:59:35 -0400 From: Jelle Licht Date: Sat, 20 Mar 2021 15:59:22 +0100 Message-Id: <20210320145925.12500-10-jlicht@fsfe.org> In-Reply-To: <20210320145925.12500-1-jlicht@fsfe.org> References: <20210320145925.12500-1-jlicht@fsfe.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/node.scm (node-llparse-frontend-bootstrap): New package. --- gnu/packages/node.scm | 60 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index 85e57f5f2d..41c50e209e 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm @@ -417,6 +417,66 @@ modelled after @code{Node.js} core's debugging technique. It works in "This package builds graphs for consumption by @code{llparse}.") (license license:expat))) +(define-public node-llparse-frontend-bootstrap + (package + (name "node-llparse-frontend") + (version "3.0.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/indutny/llparse-frontend.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1rm9g4ifyip30svm5cgnf0gx7d45jgh4mpf2hkd092xhngmfvicc")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Fix incorrect import semantics + ;; https://github.com/evanw/esbuild/issues/477 + (substitute* (list "src/frontend.ts" + "src/code/field-value.ts" + "src/container/index.ts" + "src/container/wrap.ts" + "src/node/sequence.ts" + "src/node/single.ts" + "src/node/table-lookup.ts" + "src/trie/index.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/frontend.js" + "--bundle" + "src/frontend.ts"))))))) + (inputs + `(("node-debug" ,node-debug-bootstrap) + ("node-llparse-builder" ,node-llparse-builder-bootstrap))) + (native-inputs + `(("esbuild" ,esbuild))) + (home-page + "https://github.com/indutny/llparse-frontend#readme") + (properties '((hidden? . #t))) + (synopsis "Frontend for @code{llparse} compiler") + (description "This package is a frontend for the @code{llparse} +compiler.") + (license license:expat))) + (define-public libnode (package/inherit node (name "libnode")