From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id GIJqN10BfGOBJAEAbAwnHQ (envelope-from ) for ; Mon, 21 Nov 2022 23:53:17 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id EHNKN10BfGO/UQEAauVa8A (envelope-from ) for ; Mon, 21 Nov 2022 23:53:17 +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 836CA3961B for ; Mon, 21 Nov 2022 23:53:17 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oxFep-0001Mj-CM; Mon, 21 Nov 2022 17:52:55 -0500 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 1oxFeo-0001MZ-7Z for guix-devel@gnu.org; Mon, 21 Nov 2022 17:52:54 -0500 Received: from mta-12-4.privateemail.com ([198.54.127.107]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxFem-0005ox-Af; Mon, 21 Nov 2022 17:52:53 -0500 Received: from mta-12.privateemail.com (localhost [127.0.0.1]) by mta-12.privateemail.com (Postfix) with ESMTP id BADD218000A6; Mon, 21 Nov 2022 17:52:43 -0500 (EST) Received: from APP-06 (unknown [10.50.14.156]) by mta-12.privateemail.com (Postfix) with ESMTPA id 8B61518000A4; Mon, 21 Nov 2022 17:52:42 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=twdb.moe; s=default; t=1669071163; bh=E1f4wVAEqZi+REmKye14iTW9EgykUG9EnFDoBXksYTg=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=N6AlE/27v8pqEJfpMUEmqHdL7T0JU5fGcG77Cu+dOPmJw8aHrbFvdHry63mHfjg8N lItZ/e7XaN9zZV17Cp/r8R1UsZfxP/Jx268d6fqas+51VI/R5FFHWr0r2z8D2tEizx 4DNtSNLJNcWSir4ttjXm9pcHXKwd/awPG45zJ2s0kglzuDgEoaQ5ysf46XKgqlrm7g YtPBTxRst5LB82U6pLNAf82AZk0uL1HOfzNlJsutqh2dlRS7jPvuCuQthWIlyIIU7S ZJDT9r13RMVcR51Q/P6uUC+jjiPE/WmdLb/k9uppwfwR9rJaGhKV1Pekr/PmMo3yjM JD5pcqcgBfgkw== Date: Mon, 21 Nov 2022 19:52:42 -0300 (BRT) From: zamfofex To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Cc: "guix-devel@gnu.org" Message-ID: <1327358359.716196.1669071162549@privateemail.com> In-Reply-To: <878rk4lfv1.fsf@gnu.org> References: <450401139.631101.1668893228599@privateemail.com> <878rk4lfv1.fsf@gnu.org> Subject: Re: bringing npm packages to Guix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Priority: 3 Importance: Normal X-Mailer: Open-Xchange Mailer v7.10.6-Rev30 X-Originating-Client: open-xchange-appsuite X-Virus-Scanned: ClamAV using ClamSMTP Received-SPF: pass client-ip=198.54.127.107; envelope-from=zamfofex@twdb.moe; helo=MTA-12-4.privateemail.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1669071197; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=E1f4wVAEqZi+REmKye14iTW9EgykUG9EnFDoBXksYTg=; b=tlxCCJ6usjtIrf2rFTerp+U5br/ieMKtlgiaHjFJvWrh6ld3uFL5q6klmi3PXs0O0Ysq5w ATiL6xvpy6FYfZWUSR5xOeFEnY76lAzEt5HJOikdlwJP95BpdrSI0mpVsu9HbplTXaNKwT n3xxZiWcYrNm00H/sA5mKBx1us9f9wGjlSpcDNHgr3sylgVKSmhX/BhUbiaAhIVOCzma9X Y3xx2i8FNhzWlivpwnVSu0XnDlIPE3aWFVRQggb6S1LpaWzNp7iyKOOo43IwwQYxX1PGQ8 qajFAkUj3p+qD1ttOd1mAOC8/6NYLCfFSDIs5aGdHAJMgWZpYZMcoAEKLFV8vQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1669071197; a=rsa-sha256; cv=none; b=WBkkp3wSR6OLJHyeD2MlI6Nf5GeUxC0BawwFYY1JdUTuuyeRhS9AlYZQZxwlP2mM6cCmw/ TunYhm39wMawICxIIlKcsQTuwOKUsSQkPnLes4ash3ULMWSdx5At/tRU0Km72q8BufUql4 xFA3q0j54P6GBh/LNsgKOzf9U7O62KUP2RJNyEndyQ+78QN3pFz1tpatrnTvNN29SJwET1 m/mzHNsPilgtseyPoK38QIoMp/ahvASfayo5mj0bSzUVKAjbPqPO1W+eI+5VG574jwzXf0 DXsY+utPXscKghttzAxwY+v2n3pBZx/LdVYVMF8BNTEiBMNCCQQXaLTdJmwl4w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=twdb.moe header.s=default header.b="N6AlE/27"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.80 Authentication-Results: aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=twdb.moe header.s=default header.b="N6AlE/27"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 836CA3961B X-Spam-Score: -1.80 X-Migadu-Scanner: scn0.migadu.com X-TUID: MdX+oISBBGGj Hello! Thanks for responding. The premise of the idea I=E2=80=99m proposing is that it wouldn=E2=80=99t b= e necessary to traverse into (most of) the =E2=80=98devDependencies=E2=80= =99 if you build the packages ad=E2=80=90hoc using esbuild. So, the idea is= to sidestep the build process that the package has, and just invoke esbuil= d on the appropriate files of the package. My hope is that this is sufficie= nt to bring most (or at least a lot of) useful packages from npm to Guix wi= thout the need of a binary importer. I set up a package for sucrase as a proof of concept, since sucrase is a CL= I tool that can be run and tried out easily (as opposed to jQuery, which is= a library meant to be used in browsers). However, note that following my p= roposed approach, packaging jQuery becomes entirely trivial =E2=80=94 it is= a matter of simply running esbuild on jQuery=E2=80=99s input files. For th= e sake of example, I have included a Guix package I created for jQuery in t= he GitHub Gist I sent above. (And I can anecdotally verify that it works wh= en tring it on a browser.) I will admit that I cheated a bit, since I used the currently unreleased 4.= 0.0 version, as opposed to the latest released 3.x versions, since the real= eased 3.x versions use the old and outdated AMD format (=E2=80=9Casynchrono= us module definition=E2=80=9D) for representing dependencies between files = in a project. (See ) However,= most packages nowadays have already moved away from AMD (and jQuery is get= ting there), so this shouldn=E2=80=99t be an issue in practice.