[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/19: gnu: node-acorn: Remove lifecycle script.
From: |
guix-commits |
Subject: |
03/19: gnu: node-acorn: Remove lifecycle script. |
Date: |
Sat, 6 May 2023 07:56:24 -0400 (EDT) |
jlicht pushed a commit to branch master
in repository guix.
commit 7a44c34f4a709f56445c4029963cf5066971d3df
Author: Jelle Licht <jlicht@fsfe.org>
AuthorDate: Wed Feb 8 22:05:17 2023 +0100
gnu: node-acorn: Remove lifecycle script.
* gnu/packages/node-xyz.scm (node-acorn)[arguments]<modules>: New argument.
<phases>: Patch out unused 'prepare' script that breaks dependents.
---
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 @@
(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
- 14/19: gnu: node-serialport: Avoid gyp rebuilds., (continued)
- 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, 2023/05/06
- 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 <=
- 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
- 16/19: gnu: emacs-nodejs-repl: Build with node-lts., guix-commits, 2023/05/06
- 19/19: gnu: libnode: Use node-lts as base., guix-commits, 2023/05/06
- 18/19: gnu: node-lts: Update to 18.16.0., guix-commits, 2023/05/06
- 10/19: gnu: node-resolve-protobuf-schema: Ignore development dependencies., guix-commits, 2023/05/06