Subject: Re: [PATCH v4] import: Add binary npm importer.

From: Jelle Licht <[email-masked]>
Date: Tue, 25 Feb 2025 11:14:02 +0100

Hey folks,

This was merged quite some time ago into master already, so closing.

[email-masked] writes:

> From: Jelle Licht <[email-masked]>
>
> * guix/scripts/import.scm: (importers): Add "npm-binary".
> * guix/import/npm-binary.scm: New file.
> * guix/scripts/import/npm-binary.scm: New file.
> * Makefile.am: Add them.
>
> Co-authored-by: Timothy Sample <[email-masked]>
> Co-authored-by: Lars-Dominik Braun <[email-masked]>
>
> Change-Id: I98a45068cf5b9c42790664cc743feaa7ac76f807
> ---
>
> Changes in v4:
> - Add copyright line for LDB
> - Use package-name@version-spec notation on CLI
> - Simplify CLI argument handling
> - Turn %registry into a parameter named %npm-registry
>
> Changes in v3:
> - Ensure that package bindings generated during recursive import match the
> package bindings used in the list of inputs
>
> Changes in v2:
> - Change *SOME-VAR* to %SOME-VAR
> - Removed unused http-error-code
> - Rebase on master
> - Refactor hash-url to use port-sha256 helper
> - use explicit record accessors instead of order-sensitive destructuring
> - address line-width styling issues
> - added basic documentation
> - added some basic tests (using simple mocks instead of with-http-server)
> - simplify import script entrypoint
>
>  Makefile.am                        |   3 +
>  doc/guix.texi                      |  33 ++++
>  guix/import/npm-binary.scm         | 279 +++++++++++++++++++++++++++++
>  guix/scripts/import.scm            |   2 +-
>  guix/scripts/import/npm-binary.scm | 121 +++++++++++++
>  tests/npm-binary.scm               | 146 +++++++++++++++
>  6 files changed, 583 insertions(+), 1 deletion(-)
>  create mode 100644 guix/import/npm-binary.scm
>  create mode 100644 guix/scripts/import/npm-binary.scm
>  create mode 100755 tests/npm-binary.scm