From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id IETKK/LlGmShKwAASxT56A (envelope-from ) for ; Wed, 22 Mar 2023 12:26:42 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 6DrUK/LlGmQIZwAA9RJhRA (envelope-from ) for ; Wed, 22 Mar 2023 12:26:42 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2C3D713698 for ; Wed, 22 Mar 2023 12:26:42 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=fsfe.org header.s=2021100501 header.b=FLOiOltT; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fsfe.org (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1679484402; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=aHvktX4KrRbyjP0CtnfUSBovzYlZw7d91zc9mKc7tmQ=; b=JgmLkE1S7iuwa2ZNypH++HXbjNAT6oX64nklRss67xYDiu3QQveNSj0vsSE53aRIojd+5A vTAAoJunXjUjlLmQfj8Wr1LwagLULfF5obP370kG1k0DhGHKiUNzEpAzqJurYCAbaFNC/Z 2E0k1/cFRv7309q4YFSLeA+Sy8jFBFkPDt+Q1HDTGkUGCNW8D5rpf/JKQI69TKwRZ+uFTq jJYYe2gCJSVngZUwK4eHzVmSRvM0Z0IAFkD8EaRROb2Ycl+n6Flvlx19Ao+Aa5QebRVGYp P4KnrVZSB4vsHEd90B5OTdYBYgJmc7vgx/bAiCZd5m8vBHP5pZK3zn5Gm7zhlg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679484402; a=rsa-sha256; cv=none; b=gY6Rxu/BAGSMHnqK4MB+p2ZxuIwqbdzWdp3ozTK3GhznbZBHcSLFPC8Kq1CxfHqa5XnC64 6f2GJaa1uF4RadTmgRYTSlOKGbioTJoCq3sAAZyUv89bP5JzCRVFARDAocLLdS4GuRvfym RyMqIbLB4fhAfzXSvSQrU3a6+wy+eS/NSsrAXzY/wLATFseQAvg9aa7eZtzB/oWNWpEoPb Q7bCGUrDzQpHdY7UK5kv+dpHhxVrBd5FxSGQPROwLs9M57FeRUE46Fj3mCYDxWCJ/pzIQm YDDyvc0L5Tzy2Vas1y9MUcS+GSCpXd0WhzTxvRtyVDRMNf+lx9ChdogzCOdWEA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=fsfe.org header.s=2021100501 header.b=FLOiOltT; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fsfe.org (policy=none) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pewbp-0002rv-3V; Wed, 22 Mar 2023 07:26:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pewbV-0002j2-6x for guix-patches@gnu.org; Wed, 22 Mar 2023 07:26:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pewbS-0006hA-8q for guix-patches@gnu.org; Wed, 22 Mar 2023 07:26:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pewbS-0004Be-31 for guix-patches@gnu.org; Wed, 22 Mar 2023 07:26:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62375] [PATCH 0/1] npm binary importer Resent-From: jlicht@fsfe.org Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 22 Mar 2023 11:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62375 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62375@debbugs.gnu.org Cc: dev@jpoiret.xyz, me@tobias.gr, zimon.toutoune@gmail.com, othacehe@gnu.org, ludo@gnu.org, mail@cbaines.net, rekado@elephly.net, Jelle Licht X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167948432016034 (code B ref -1); Wed, 22 Mar 2023 11:26:01 +0000 Received: (at submit) by debbugs.gnu.org; 22 Mar 2023 11:25:20 +0000 Received: from localhost ([127.0.0.1]:33651 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pewal-0004AY-Mk for submit@debbugs.gnu.org; Wed, 22 Mar 2023 07:25:20 -0400 Received: from lists.gnu.org ([209.51.188.17]:39482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pewai-0004AN-NI for submit@debbugs.gnu.org; Wed, 22 Mar 2023 07:25:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pewag-00022c-Bj for guix-patches@gnu.org; Wed, 22 Mar 2023 07:25:14 -0400 Received: from mail1.fsfe.org ([2001:aa8:ffed:f5f3::151]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pewae-0006UW-1q; Wed, 22 Mar 2023 07:25:14 -0400 From: jlicht@fsfe.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fsfe.org; s=2021100501; t=1679484305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=aHvktX4KrRbyjP0CtnfUSBovzYlZw7d91zc9mKc7tmQ=; b=FLOiOltT2xPz8JO/KAnflzwoMj0XJZ7VoxQh+MBMj7nw/TLrNNQXJ/O27uoGZYQlvibS/f AqO3sBZ9gkc5p2XSGyhb05/5s32iAM6AFG3nYskUnXLghlQA5W31illC+NCAAuRCffKxzr ACnZQn0Clg2u9zFmDpVDjDhPFhHkLsw= Date: Wed, 22 Mar 2023 12:25:04 +0100 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2001:aa8:ffed:f5f3::151; envelope-from=jlicht@fsfe.org; helo=mail1.fsfe.org X-Spam_score_int: -70 X-Spam_score: -7.1 X-Spam_bar: ------- X-Spam_report: (-7.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: X-Spam-Score: 9.55 List-Post: X-Migadu-Queue-Id: 2C3D713698 X-Migadu-Scanner: scn0.migadu.com X-Spam: Yes X-Migadu-Spam: Yes X-Migadu-Spam-Score: 9.55 List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-TUID: 1lhxk3qJJa7U From: Jelle Licht 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