[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#59188] [PATCH v5 03/17] gnu: node-acorn: Remove lifecycle script.
From: |
jlicht |
Subject: |
[bug#59188] [PATCH v5 03/17] gnu: node-acorn: Remove lifecycle script. |
Date: |
Wed, 15 Mar 2023 01:55:18 +0100 |
From: Jelle Licht <jlicht@fsfe.org>
* gnu/packages/node-xyz.scm (node-acorn)[arguments]<modules>: New argument.
<phases>: Patch out unused 'prepare' script that breaks dependents.
---
(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 e89117beca..e3d8c7ca19 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -47,11 +47,35 @@ (define-public node-acorn
(build-system node-build-system)
(arguments
'(#:tests? #f
+ #:modules
+ ((guix build node-build-system)
+ (srfi srfi-1)
+ (ice-9 match)
+ (guix build utils))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'change-directory
(lambda _
- (chdir "acorn"))))))
+ (chdir "acorn")))
+ (add-before 'configure 'avoid-prepare-scripts
+ (lambda _
+ ;; We need to remove the prepare script from "package.json", as
+ ;; it would try to use the build environment and would block the
+ ;; automatic building by other packages making use of node-acorn.
+ ;; TODO: Add utility function
+ (with-atomic-json-file-replacement "package.json"
+ (match-lambda
+ (('@ . pkg-meta-alist)
+ (cons '@ (map (match-lambda
+ (("scripts" @ . scripts-alist)
+ `("scripts" @ ,@(filter (match-lambda
+ (("prepare" . _)
+ #f)
+ (_
+ #t))
+ scripts-alist)))
+ (other other))
+ pkg-meta-alist))))))))))
(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.2
- [bug#59188] [PATCH v5 00/17] Updating node-lts to 18.X, jlicht, 2023/03/14
- [bug#59188] [PATCH v5 01/17] build-system: node: Use `--install-links' with `npm install'., jlicht, 2023/03/14
- [bug#59188] [PATCH v5 06/17] gnu: node-crx3: Ignore development dependencies., jlicht, 2023/03/14
- [bug#59188] [PATCH v5 04/17] gnu: node-acorn: Fix broken transpilation., jlicht, 2023/03/14
- [bug#59188] [PATCH v5 08/17] gnu: node-pbf: Ignore development dependencies., jlicht, 2023/03/14
- [bug#59188] [PATCH v5 05/17] gnu: node-buffer-crc32: Ignore development dependencies., jlicht, 2023/03/14
- [bug#59188] [PATCH v5 14/17] gnu: libuv-for-node: Update to 1.44.2., jlicht, 2023/03/14
- [bug#59188] [PATCH v5 02/17] gnu: node-acorn: Disable tests., jlicht, 2023/03/14
- [bug#59188] [PATCH v5 03/17] gnu: node-acorn: Remove lifecycle script.,
jlicht <=
- [bug#59188] [PATCH v5 07/17] gnu: node-minimist: Ignore development dependencies., jlicht, 2023/03/14
- [bug#59188] [PATCH v5 09/17] gnu: node-protocol-buffers-schema: Ignore development dependencies., jlicht, 2023/03/14
- [bug#59188] [PATCH v5 10/17] gnu: node-resolve-protobuf-schema: Ignore development dependencies., jlicht, 2023/03/14
- [bug#59188] [PATCH v5 11/17] gnu: node-ieee754: Ignore development dependencies., jlicht, 2023/03/14
- [bug#59188] [PATCH v5 12/17] gnu: node-yazl: Ignore development dependencies., jlicht, 2023/03/14
- [bug#59188] [PATCH v5 13/17] gnu: node-uglify-js: Update to 3.14.2., jlicht, 2023/03/14
- [bug#59188] [PATCH v5 15/17] gnu: llhttp-bootstrap: Update to 6.0.10., jlicht, 2023/03/14
- [bug#59188] [PATCH v5 17/17] gnu: libnode: Use node-lts as base., jlicht, 2023/03/14
- [bug#59188] [PATCH v5 16/17] gnu: node-lts: Update to 18.15.0., jlicht, 2023/03/14