[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/19: gnu: node-acorn: Fix broken transpilation.
From: |
guix-commits |
Subject: |
04/19: gnu: node-acorn: Fix broken transpilation. |
Date: |
Sat, 6 May 2023 07:56:24 -0400 (EDT) |
jlicht pushed a commit to branch master
in repository guix.
commit 14821580f5ce9d1e060fa7364e52281c355233a5
Author: Jelle Licht <jlicht@fsfe.org>
AuthorDate: Wed Feb 8 22:05:18 2023 +0100
gnu: node-acorn: Fix broken transpilation.
* 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 e3d8c7ca19..d75ccc199a 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 @@
#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
- branch master updated (c229937c6a -> 40d6615ca2), guix-commits, 2023/05/06
- 01/19: build-system: node: Use `--install-links' with `npm install'., guix-commits, 2023/05/06
- 09/19: gnu: node-protocol-buffers-schema: Ignore development dependencies., guix-commits, 2023/05/06
- 14/19: gnu: node-serialport: Avoid gyp rebuilds., guix-commits, 2023/05/06
- 08/19: gnu: node-pbf: Ignore development dependencies., guix-commits, 2023/05/06
- 04/19: gnu: node-acorn: Fix broken transpilation.,
guix-commits <=
- 07/19: gnu: node-minimist: Ignore development dependencies., guix-commits, 2023/05/06
- 12/19: gnu: node-yazl: Ignore development dependencies., guix-commits, 2023/05/06
- 15/19: gnu: node-openzwave-shared: Fix compilation for new versions of node, guix-commits, 2023/05/06
- 05/19: gnu: node-buffer-crc32: Ignore development dependencies., guix-commits, 2023/05/06
- 13/19: gnu: node-uglify-js: Update to 3.14.2., guix-commits, 2023/05/06
- 06/19: gnu: node-crx3: Ignore development dependencies., guix-commits, 2023/05/06
- 11/19: gnu: node-ieee754: Ignore development dependencies., guix-commits, 2023/05/06
- 03/19: gnu: node-acorn: Remove lifecycle script., guix-commits, 2023/05/06
- 17/19: gnu: llhttp-bootstrap: Update to 6.0.10., guix-commits, 2023/05/06
- 02/19: gnu: node-acorn: Disable tests., guix-commits, 2023/05/06