[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#59188] [PATCH v3 03/16] gnu: node-acorn: Fix broken transpilation.
From: |
jlicht |
Subject: |
[bug#59188] [PATCH v3 03/16] gnu: node-acorn: Fix broken transpilation. |
Date: |
Wed, 8 Feb 2023 22:05:18 +0100 |
From: Jelle Licht <jlicht@fsfe.org>
* gnu/packages/node-xyz.scm (node-acorn)[native-inputs]: Add `esbuild'.
[arguments]<phases>: Replace build phase by custom `esbuild' invocations.
---
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 5e7e6ae4d9..c9a853616e 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2021 Charles <charles.b.jackson@protonmail.com>
;;; Copyright © 2021 Philip McGrath <philip@philipmcgrath.com>
;;; Copyright © 2022 Nicolas Graves <ngraves@ngraves.fr>
+;;; Copyright © 2023 Jelle Licht <jlicht@fsfe.org>
;;;
;;; 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
--
2.39.1
- [bug#59188] [PATCH v3 00/16] Updating node-lts to 18.X, jlicht, 2023/02/08
- [bug#59188] [PATCH v3 02/16] gnu: node-acorn: Remove lifecycle script., jlicht, 2023/02/08
- [bug#59188] [PATCH v3 01/16] gnu: node-acorn: Disable tests., jlicht, 2023/02/08
- [bug#59188] [PATCH v3 05/16] gnu: node-crx3: Ignore development dependencies., jlicht, 2023/02/08
- [bug#59188] [PATCH v3 03/16] gnu: node-acorn: Fix broken transpilation.,
jlicht <=
- [bug#59188] [PATCH v3 07/16] gnu: node-pbf: Ignore development dependencies., jlicht, 2023/02/08
- [bug#59188] [PATCH v3 09/16] gnu: node-resolve-protobuf-schema: Ignore development dependencies., jlicht, 2023/02/08
- [bug#59188] [PATCH v3 10/16] gnu: node-ieee754: Ignore development dependencies., jlicht, 2023/02/08
- [bug#59188] [PATCH v3 11/16] gnu: node-yazl: Ignore development dependencies., jlicht, 2023/02/08
- [bug#59188] [PATCH v3 06/16] gnu: node-minimist: Ignore development dependencies., jlicht, 2023/02/08
- [bug#59188] [PATCH v3 08/16] gnu: node-protocol-buffers-schema: Ignore development dependencies., jlicht, 2023/02/08
- [bug#59188] [PATCH v3 15/16] gnu: node-lts: Update to 18.14.0., jlicht, 2023/02/08
- [bug#59188] [PATCH v3 04/16] gnu: node-buffer-crc32: Ignore development dependencies., jlicht, 2023/02/08
- [bug#59188] [PATCH v3 12/16] gnu: node-uglify-js: Update to 3.14.2., jlicht, 2023/02/08
- [bug#59188] [PATCH v3 13/16] gnu: libuv-for-node: Update to 1.44.2., jlicht, 2023/02/08