From patchwork Mon Apr 17 14:51:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jelle Licht X-Patchwork-Id: 49244 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 BC0E617923; Mon, 17 Apr 2023 15:53:32 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 2CEE21791C for ; Mon, 17 Apr 2023 15:53:30 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1poQDE-0003ak-4F; Mon, 17 Apr 2023 10:52:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1poQD7-0003XA-2x for guix-patches@gnu.org; Mon, 17 Apr 2023 10:52:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1poQD6-0005RL-Pe for guix-patches@gnu.org; Mon, 17 Apr 2023 10:52:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1poQD6-000059-Lm for guix-patches@gnu.org; Mon, 17 Apr 2023 10:52:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#59188] [PATCH v7 04/20] gnu: node-acorn: Fix broken transpilation. Resent-From: jlicht@fsfe.org Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Apr 2023 14:52:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59188 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59188@debbugs.gnu.org Cc: Jelle Licht Received: via spool by 59188-submit@debbugs.gnu.org id=B59188.168174309732546 (code B ref 59188); Mon, 17 Apr 2023 14:52:04 +0000 Received: (at 59188) by debbugs.gnu.org; 17 Apr 2023 14:51:37 +0000 Received: from localhost ([127.0.0.1]:55644 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1poQCd-0008SV-30 for submit@debbugs.gnu.org; Mon, 17 Apr 2023 10:51:37 -0400 Received: from mail1.fsfe.org ([217.69.89.151]:40826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1poQCX-0008RT-7w for 59188@debbugs.gnu.org; Mon, 17 Apr 2023 10:51:29 -0400 From: jlicht@fsfe.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fsfe.org; s=2021100501; t=1681743088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fNEZ4yUkBc5yP13Ko72GbnmGkJL6+YrT/j+sVsnm+7A=; b=h7DaydHZOSGe6rPGGqFN9HhTX2cWWxVHygEZcT0SfrUGKs8pFeq6ya8eJ1n0j6lOFf+OFO 2iy+xgWz/1NMzkRkA7qnBOQSVnkcefITOnQw4ijh1qTE9w6BDTAwHNdahCuiHXxurRKstL TYr9KlkyXNisZ7fPSDklOvW7uhKhPAM= Date: Mon, 17 Apr 2023 16:51:06 +0200 Message-Id: <2ad99c459741e202b1e7f17e99b6725189b9a0dc.1681742871.git.jlicht@fsfe.org> In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: Jelle Licht * gnu/packages/node-xyz.scm (node-acorn)[native-inputs]: Add `esbuild'. [arguments]: Replace build phase by custom `esbuild' invocations. --- (no changes since v1) gnu/packages/node-xyz.scm | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm index e3d8c7ca19..d75ccc199a 100644 --- a/gnu/packages/node-xyz.scm +++ b/gnu/packages/node-xyz.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2021 Charles ;;; Copyright © 2021 Philip McGrath ;;; Copyright © 2022 Nicolas Graves +;;; Copyright © 2023 Jelle Licht ;;; ;;; This file is part of GNU Guix. ;;; @@ -75,7 +76,30 @@ (define-public node-acorn #t)) scripts-alist))) (other other)) - pkg-meta-alist)))))))))) + pkg-meta-alist))))))) + (replace 'build + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (let ((esbuild (search-input-file (or native-inputs inputs) + "/bin/esbuild"))) + (invoke esbuild + "src/index.js" + "--outfile=dist/acorn.js" + "--format=cjs" + "--bundle" + "--platform=node") + (invoke esbuild + "src/index.js" + "--outfile=dist/acorn.mjs" + "--format=esm" + "--bundle" + "--platform=node") + (invoke esbuild + "src/bin/acorn.js" + "--outfile=dist/bin.js" + "--format=cjs" + "--platform=node"))))))) + (native-inputs + (list esbuild)) (home-page "https://github.com/acornjs/acorn/tree/master/acorn") (synopsis "Javascript-based Javascript parser") (description "Acornjs is a Javascript parser with many options and an