GNU bug report logs - #62375
[PATCH 0/1] npm binary importer

Previous Next

Package: guix-patches;

Reported by: jlicht <at> fsfe.org

Date: Wed, 22 Mar 2023 11:26:01 UTC

Severity: normal

Tags: moreinfo, patch

Done: Jelle Licht <jlicht <at> fsfe.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: jlicht <at> fsfe.org
Subject: bug#62375: closed (Re: [PATCH v4] import: Add binary npm importer.)
Date: Tue, 25 Feb 2025 10:15:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

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

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 62375 <at> debbugs.gnu.org.

-- 
62375: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62375
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Jelle Licht <jlicht <at> fsfe.org>
To: 62375-done <at> debbugs.gnu.org
Cc: Timothy Sample <samplet <at> ngyro.com>, Lars-Dominik Braun <lars <at> 6xq.net>
Subject: Re: [PATCH v4] import: Add binary npm importer.
Date: Tue, 25 Feb 2025 11:14:02 +0100
Hey folks,

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

jlicht <at> fsfe.org writes:

> From: Jelle Licht <jlicht <at> fsfe.org>
>
> * 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 <samplet <at> ngyro.com>
> Co-authored-by: Lars-Dominik Braun <lars <at> 6xq.net>
>
> Change-Id: I98a45068cf5b9c42790664cc743feaa7ac76f807
> ---
>
> Changes in v4:
> - Add copyright line for LDB
> - Use package-name <at> 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

[Message part 3 (message/rfc822, inline)]
From: jlicht <at> fsfe.org
To: guix-patches <at> gnu.org
Cc: dev <at> jpoiret.xyz, me <at> tobias.gr, zimon.toutoune <at> gmail.com, othacehe <at> gnu.org,
 ludo <at> gnu.org, mail <at> cbaines.net, rekado <at> elephly.net,
 Jelle Licht <jlicht <at> fsfe.org>
Subject: [PATCH 0/1] npm binary importer
Date: Wed, 22 Mar 2023 12:25:04 +0100
From: Jelle Licht <jlicht <at> fsfe.org>

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




This bug report was last modified 142 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.