Subject: [bug#62375] [PATCH 0/1] npm binary importer

From: [email-masked]
Date: Wed, 22 Mar 2023 12:25:04 +0100

From: Jelle Licht <[email-masked]>

Folks,

Here a revised patch to add the npm binary importer. To give some context,
'binary' here refers to the fact that this downloads archives straight from
the npm registry at https://registry.npmjs.org. Some of these downloaded
archives may not contain the original sources, so unless properly vetted the
output of this importer does not allow one to easily generate package
expressions for inclusion in guix's collection of packages.

It should work as-is for most simple NPM packages. As noted in an inline
comment somewhere, the way both npm and our very own node-build-system treats
peer dependencies may require some manual intervention from time to time to
hook in the right dependency at the right spot. The upside here is that when
this happens, it's either trivial for a human to spot and fix, or wholly
incompatible with our current approach so not fixable without writing a custom
build system to deal with dependency cycles :-).

Please test and review, let us get this merged as it might be useful to many
people for building out their personal channels and/or package expressions.

Special thanks to Timothy Sample and Lars-Dominik Braun for involvement in
realising this, way too long ago.

Jelle Licht (1):
  import: Add binary npm importer.

 Makefile.am                        |   2 +
 guix/import/npm-binary.scm         | 269 +++++++++++++++++++++++++++++
 guix/scripts/import.scm            |   2 +-
 guix/scripts/import/npm-binary.scm | 113 ++++++++++++
 4 files changed, 385 insertions(+), 1 deletion(-)
 create mode 100644 guix/import/npm-binary.scm
 create mode 100644 guix/scripts/import/npm-binary.scm

-- 
2.39.2