From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id KBzNICgcC2b5PwAAqHPOHw:P1 (envelope-from ) for ; Mon, 01 Apr 2024 22:42:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id KBzNICgcC2b5PwAAqHPOHw (envelope-from ) for ; Mon, 01 Apr 2024 22:42:16 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=VgbgmZ51; 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=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712004136; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=R4Tem82kgGMfIipNSisQle6aBWMQ2g/6vhOpbfTZrNQ=; b=OkOIPUl2SF3EbawtftmmBV56dkznrMR2rn9W7qY/5yT2+FG26YuyiQMudO1OGriKZkgyIu GRbln+WPVXScNLCn/FkNLUFW3qZnrcf2lQTvRa25pKqAVBTXsamWlNEpUdxi0I0p2pdU4P ZEeTeFYohz6QRC5qO2JGUtW0LkXGvtHFc7XxXHjdnA5ermrad9ye38ZUDIbbHn6wp1Qxaj f/gpEJC8Q4lsU1IzHaPxJ+88j/qnjzLtNgMV+MCkoGYrtL4i4PI764a+wt9PC5AkHTcNxw dpP6VSCKEzntlZngGBqBgdgJNEP4quSgCePIdrmvTfEhABAWqQ7cujBC9slqfg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=VgbgmZ51; 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=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712004136; a=rsa-sha256; cv=none; b=RTX/Sg4cYThbkucWqZgP3pMQh3N1yl0+LTjrhCMw1dieDYxlSynAHVmr1NulIGwA7vRqAz TDzkk9G3jzgEDBL7slY08Ch9oLrxwQ3MbnOYNUP+VsbAMdSp5MhKw26ntp3V7in9j+Gs5k A1AKI3RTvUXR/PA9VQEz3dfN84CLxJE4Og5xZw/knJS0nkNJQkanpCKUgTSiAn+Cb0yJ5q 1jIORrCK6Rzm5ytZIHqJnW0H50m72EIbTyOE6XyjPib3UqbbYE6QwgYexJ8CivFXGDlIOa vBzIzUhaqGXOfvfBv8oaa/xtkBfERd8UHn5tcLY6zUg4hWQbC7m6L8HwPji/nw== 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 4DBA06C97C for ; Mon, 1 Apr 2024 22:42:15 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rrOTi-0003iM-1n; Mon, 01 Apr 2024 16:42:02 -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 1rrOTf-0003hy-5T for guix-patches@gnu.org; Mon, 01 Apr 2024 16:41:59 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rrOTe-0001ic-Rq for guix-patches@gnu.org; Mon, 01 Apr 2024 16:41:58 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rrOTh-0007kx-U0 for guix-patches@gnu.org; Mon, 01 Apr 2024 16:42:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62375] [PATCH v3] import: Add binary npm importer. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 01 Apr 2024 20:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62375 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch moreinfo To: jlicht@fsfe.org Cc: Timothy Sample , Josselin Poiret , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , Lars-Dominik Braun , 62375@debbugs.gnu.org, Christopher Baines , Ricardo Wurmus Received: via spool by 62375-submit@debbugs.gnu.org id=B62375.171200410329791 (code B ref 62375); Mon, 01 Apr 2024 20:42:01 +0000 Received: (at 62375) by debbugs.gnu.org; 1 Apr 2024 20:41:43 +0000 Received: from localhost ([127.0.0.1]:51786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrOTP-0007kQ-0q for submit@debbugs.gnu.org; Mon, 01 Apr 2024 16:41:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rrOTK-0007kA-VK for 62375@debbugs.gnu.org; Mon, 01 Apr 2024 16:41:42 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rrOTB-0001fG-IU; Mon, 01 Apr 2024 16:41:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=R4Tem82kgGMfIipNSisQle6aBWMQ2g/6vhOpbfTZrNQ=; b=VgbgmZ51HQ6sMtUK1b7l TIT2uZ0VujYeyW01Bt+zIdUGDIbmenDLEYCHhBZX/le+ZQv1SRE900geDL36VlaGXRvs2X1vijcVp uTTrVLBn68rJUcux9P8a0iMOWA65w2jEo4wrmlhxK5n1oDA+XVuv3WkXE+reNtcdJ5HwkSfE+EPPn FY8lD3hOFB1BMs8vG8qYGjQIL2rg43FIoS5gA3JQE2dPjjxqWcMpOixRWK6hcf4TWjkhYuJGtOMrB ecKBoKeQKe3+bZYqjrqv7XfVISTa5Ot5DyPE5xMo9EtJDFZVjDKqxwVNcIDcZ1qv2ozh1UDQpVz/t hODbQ0r/e02bJQ==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <7148a74f04e1598a18b58fbd0b1b27a2397312b2.1711917305.git.jlicht@fsfe.org> (jlicht@fsfe.org's message of "Sun, 31 Mar 2024 22:37:01 +0200") References: <7148a74f04e1598a18b58fbd0b1b27a2397312b2.1711917305.git.jlicht@fsfe.org> Date: Mon, 01 Apr 2024 22:41:26 +0200 Message-ID: <871q7odde1.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: List-Post: 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-Migadu-Queue-Id: 4DBA06C97C X-Spam-Score: -5.55 X-Migadu-Spam-Score: -5.55 X-Migadu-Scanner: mx10.migadu.com X-TUID: JtBZ2x/aw1rk Hi! jlicht@fsfe.org skribis: > From: Jelle Licht > > * 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 > Co-authored-by: Lars-Dominik Braun > > Change-Id: I98a45068cf5b9c42790664cc743feaa7ac76f807 Yay! > +The npm-binary importer also allows you to specify a version string: > + > +@example > +guix import npm-binary buffer-crc32 1.0.0 > +@end example For consistency with other importers (pypi, gem, cran), could you change the syntax to: guix import npm-binary buffer-crc32@1.0.0 ? That=E2=80=99s the last remaining issue for me. > +;; TODO: Support other registries > +(define %registry "https://registry.npmjs.org") For the purposes of tests, you could make it: (define %npm-registry (make-parameter "https://registry.npmjs.org")) That would allow you to write tests using =E2=80=98with-http-server=E2=80= =99 and =E2=80=98parameterize=E2=80=99 as done in =E2=80=98tests/pypi.scm=E2=80=99 = and others, which I find nicer and more robust than =E2=80=98mock=E2=80=99. Not a blocker though. Thanks! Ludo=E2=80=99.