Subject: [PATCH v3 00/43] guix: node-build-system: Support compiling add-ons with node-gyp.

From: Philip McGrath <[email-masked]>
Date: Wed, 8 Dec 2021 15:27:55 -0500

Hi!

Here is a v3 of this patch series, hopefully incorporating all of the
suggestions. In particular, as Timothy suggested
in <https://issues.guix.gnu.org/51838#59>, I've tried to make sure the earlier
patches, at least through #:absent-dependencies, are able to be applied even
if there is more discussion needed on the later patches.

As I mentioned in <https://issues.guix.gnu.org/51838#64>, while experimenting
with v2 of this series, I discovered an issue with the install script
automatically generated by npm. Patch 21 ``guix: node-build-system: Add
avoid-node-gyp-rebuild phase.'' fixed the issue: I explain the details in
comments there.

This series also adds two additional leaf packages, `node-segfault-handler'
and `node-serialport', that confirm these patches can support additional
styles of native addons. In particular, because the native addon for
`node-serialport' is actually in one of the intermediate packages,
`node-serialport-bindings', it serves as a test case for the new
`avoid-node-gyp-rebuild' phase.

I've also put these patches up
at <https://gitlab.com/philip1/guix-patches/-/tree/guix-issue-51838-v3>,
if anyone finds that useful.

  -Philip

Philip McGrath (43):
  gnu: node: Avoid duplicating build phases.
  gnu: node: Update to 10.24.1 for bootstrapping.
  gnu: node: Patch shebangs in node_modules.
  gnu: node: Add an npmrc file to set nodedir.
  guix: node-build-system: Refactor patch-dependencies phase.
  guix: node-build-system: Add #:absent-dependencies argument.
  gnu: node-semver-bootstrap: Use #:absent-dependencies.
  gnu: node-ms-bootstrap: Use #:absent-dependencies.
  gnu: node-binary-search-bootstrap: Use #:absent-dependencies.
  gnu: node-debug-bootstrap: Use #:absent-dependencies.
  gnu: node-llparse-builder-bootstrap: Use #:absent-dependencies.
  gnu: node-llparse-frontend-bootstrap: Use #:absent-dependencies.
  gnu: node-llparse-bootstrap: Use #:absent-dependencies.
  gnu: node-semver: Use #:absent-dependencies.
  gnu: node-wrappy: Use #:absent-dependencies.
  gnu: node-once: Use #:absent-dependencies.
  gnu: node-irc-colors: Use #:absent-dependencies.
  gnu: node-irc: Use #:absent-dependencies.
  guix: node-build-system: Add implicit libuv input.
  guix: node-build-system: Add delete-lockfiles phase.
  guix: node-build-system: Add avoid-node-gyp-rebuild phase.
  gnu: Add node-inherits.
  gnu: Add node-safe-buffer.
  gnu: Add node-string-decoder.
  gnu: Add node-readable-stream.
  gnu: Add node-nan.
  gnu: Add node-openzwave-shared.
  gnu: Add node-addon-api.
  gnu: Add node-sqlite3.
  gnu: Add node-file-uri-to-path.
  gnu: Add node-bindings.
  gnu: Add node-segfault-handler.
  gnu: Add node-serialport-binding-abstract.
  gnu: Add node-serialport-parser-delimiter.
  gnu: Add node-serialport-parser-readling.
  gnu: Add node-serialport-bindings.
  gnu: Add node-serialport-parser-regex.
  gnu: Add node-serialport-parser-ready.
  gnu: Add node-serialport-parser-inter-byte-timeout.
  gnu: Add node-serialport-parser-cctalk.
  gnu: Add node-serialport-parser-byte-length.
  gnu: Add node-serialport-stream.
  gnu: Add node-serialport.

 gnu/packages/node-xyz.scm        | 833 +++++++++++++++++++++++++++++--
 gnu/packages/node.scm            | 219 ++++----
 gnu/packages/zwave.scm           |  65 +++
 guix/build-system/node.scm       |  28 +-
 guix/build/node-build-system.scm | 129 ++++-
 5 files changed, 1119 insertions(+), 155 deletions(-)

-- 
2.32.0