From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id WAzrN7AITWX1KQEAauVa8A:P1 (envelope-from ) for ; Thu, 09 Nov 2023 17:28:33 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id WAzrN7AITWX1KQEAauVa8A (envelope-from ) for ; Thu, 09 Nov 2023 17:28:32 +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 6C6D85A935 for ; Thu, 9 Nov 2023 17:28:32 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=fm3 header.b=VYDfV2Vn; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm3 header.b="r qryWAD"; dmarc=none; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1699547312; a=rsa-sha256; cv=none; b=PaUr4MlBnaMfmvj3cWr2qWGrPYBkJ9sCxr0JxMomOgD4U3k03oD7hhS4SeR9YeGGoD7v+5 hJYchKglfAyk6tpwNqb/r6LepusIQJx3T1W3sav2XkpAKLn8lylA2LjlYPeLbQQjDQWfmC pmJWDSJNsrPfv4+2LLjhADsKNf080SUJL03HLA5TzTA8KU4vGcHFESAnzBdkxS5uxVWTDv 6y2Kk6kSI2MWiKYiBwuKO3l5o5UUfLPaFoW32Uc9E+UUQdYaOaQs72wO4DxEsUnBxZT8Sa W8LtbtG8HRteBUqmYR8IWrRTeCkHoj0C4e6tiIdBKoutgPfeg0RTxETWRao68A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=fm3 header.b=VYDfV2Vn; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm3 header.b="r qryWAD"; dmarc=none; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1699547312; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=5O60HOAYlTjPgPcakHiT+I7U5cLWEeogtKVlV1zaySM=; b=nAE6YICRe++sWRBTpUAB/ajYgjRPXc5OFbslwNXxPpDlIMs0fI/AfW7XV+VTAEXndre0BC 9H2/7ojU0RC/XNOC1fqvyiFmHATsAa27ks/zflmKyRQ7TWNxCaa5V1eNERGeeeXAtmKNGE 9WIYNblm/hQqH/hX6zsKerA54UjDVVEvSkxHgDAboHeCyAXnWBAzeQfPjTBLI0JYMYTPJG XPGPE3msUbjRxGzjwh7QIXL/SZNRojbdnJ2mQfUtg0ZdiWvusQj0MzU4wX4Q6H5KP387+i DVEzFq80NEpMkDzHqmDO3caEUOAg6RePQsHzWQbtxkkKgfJsm9RFG0NJ70mCig== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r17tL-00083x-Kk; Thu, 09 Nov 2023 11:28:27 -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 1r17tK-00082X-2G for guix-patches@gnu.org; Thu, 09 Nov 2023 11:28:26 -0500 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 1r17tJ-0006Zx-Qp for guix-patches@gnu.org; Thu, 09 Nov 2023 11:28:25 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r17tv-0004fK-FC; Thu, 09 Nov 2023 11:29:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67019] [PATCH 11/16] gnu: Add flow-remove-types. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, julien@lepiller.eu, pukkamustard@posteo.net, guix-patches@gnu.org Resent-Date: Thu, 09 Nov 2023 16:29:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67019 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67019@debbugs.gnu.org Cc: Philip McGrath , Philip McGrath , Julien Lepiller , pukkamustard X-Debbugs-Original-Xcc: Philip McGrath , Julien Lepiller , pukkamustard Received: via spool by 67019-submit@debbugs.gnu.org id=B67019.169954728717752 (code B ref 67019); Thu, 09 Nov 2023 16:29:03 +0000 Received: (at 67019) by debbugs.gnu.org; 9 Nov 2023 16:28:07 +0000 Received: from localhost ([127.0.0.1]:48515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r17t1-0004cA-4q for submit@debbugs.gnu.org; Thu, 09 Nov 2023 11:28:07 -0500 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:52397) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r17sx-0004a5-P7 for 67019@debbugs.gnu.org; Thu, 09 Nov 2023 11:28:04 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id F34053200A47; Thu, 9 Nov 2023 11:27:23 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 09 Nov 2023 11:27:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= philipmcgrath.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1699547243; x=1699633643; bh=5O60HOAYlT jPgPcakHiT+I7U5cLWEeogtKVlV1zaySM=; b=VYDfV2VnlVlPdTrZlfJUYsQUps pdKeJ+3QHgAAwJMZ5AnTLMRn9p1noqyOhi4F/hq4T48cVbSv2q0uc/ZH6NafZaow 6qIK6+GmEsPLfxAkBSDffSgy32ZgiqLHINRJ0tCHIX/TRTg93MgjTgW2L4n3+3gx rDJrZtn02eclKmB+W8ojlwcLDv826Q8b08IeISV5yhORGIuQd4qM5GZEltTtkZ8d atEGnh/HUA8bsLDpBimZ1EM5JfB7HjaO8nf2FMJRb5BZp9zYmZC4EDxYKLLsoy8G yBXCgkedWJ/MWC611nAWgTcD2YxgzXKBU3w91iqK7J9HyVc8XajJqr/Uf8BQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1699547243; x= 1699633643; bh=5O60HOAYlTjPgPcakHiT+I7U5cLWEeogtKVlV1zaySM=; b=r qryWAD/bklMv+ySLt3tAdEqBIUdem3EBALTM1I4z13PlXpso8mWJBHzT3+LJWc+x rjT7yx8S0adzv+9n+epQ1UDp+V+jV2pMQmUDVq6sGq804ZSBxgiBpadhoG6GqwxY EzThgGnunRi9KyYIkb+aV8R64ZhGCbiqxDycehpkeVPV7eZkDMK0BUE7lsIBaCh/ a6F9jamlnszzpnONi1pdPsfxwZPzkuuA30J3Xh/BqOc+slPNwXJy9yGkdeXg9Mkz MRcE6xqgrML2/vMssgD5vJk5HYmWqRM2UtoJmi9SdiZAQtQht1f11H0A37M8BnKN n6azDy4KPq/qjlAtjjSHA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedruddvuddgkeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpefrhhhilhhiphcuofgtifhrrghthhcuoehphhhilhhiphes phhhihhlihhpmhgtghhrrghthhdrtghomheqnecuggftrfgrthhtvghrnhepgffhgfffje egudejvddvgedvheefveehvdffueduudeivdfhgeeileehvdfhfeefnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphhhihhlihhpsehphhhilh hiphhmtghgrhgrthhhrdgtohhm X-ME-Proxy: Feedback-ID: i2b1146f3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 9 Nov 2023 11:27:23 -0500 (EST) From: Philip McGrath Date: Thu, 9 Nov 2023 11:26:33 -0500 Message-ID: <00fd9449a17eb15c0816754c6e438fa399711573.1699540553.git.philip@philipmcgrath.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 6C6D85A935 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -2.21 X-Spam-Score: -2.21 X-TUID: pmJOTla5zE/r * gnu/packages/web.scm (flow-remove-types): New variable. --- gnu/packages/web.scm | 60 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 0ade9e46e3..8f0295998a 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -2075,6 +2075,66 @@ (define-public node-flow-parser provides the Flow parser in its compiled-to-JavaScript form for use with Node.js and NPM."))) +(define-public flow-remove-types + (package + (inherit node-flow-parser) + (name "flow-remove-types") + (inputs (list node-flow-parser node-vlq)) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'delete-workspace-file + (lambda args + ;; this workspace file causes NPM to try to install dependencies + ;; of other packages developed in this source repository + (delete-file "package.json"))) + (add-after 'delete-workspace-file 'chdir + (lambda args + (chdir "packages/flow-remove-types"))) + (add-after 'patch-dependencies 'delete-dependencies + (lambda args + (delete-dependencies '("pirates")))) + (add-after 'delete-dependencies 'remove-unsupported-features + (lambda args + (delete-file "register.js") + (with-output-to-file "register.js" + (lambda () + (for-each + display + '("console.warn('flow-remove-types/register.js does not add" + " a require hook on Guix');\n" + "module.exports =" + " function setOptions(newOptions) {};\n")))) + (substitute* "flow-node" + (("var flowRemoveTypes") + (string-append + "process.stderr.write('flow-node: not yet supported" + " on Guix');\n" + "return process.exit(1);\n" + "var flowRemoveTypes"))) + (substitute* "test.sh" + (("echo \"Test: node require hook\"") + "echo \"SKIPPING Test: node require hook\"") + (("RES=\\$[(]node -e 'require[(]\"\\./register\"[)];") + "RES=42 # ") + (("echo \"Test: flow-node\"") + "echo \"SKIPPING Test: flow-node\"") + (("FLOW_NODE=") + "FLOW_NODE=42 # ") + (("echo \"Test: flow-node with options\"") + "echo \"SKIPPING Test: flow-node with options\"") + (("FLOW_NODE_OPTS=") + "FLOW_NODE_OPTS=4 # "))))))) + (synopsis "Utility to erase Flow type annotations from JavaScript") + (description "Flow is a gradual type system for JavaScript. This package +provides @command{flow-remove-types}, a command-line tool that erases Flow +type annotations, producing standard JavaScript files. The functionality is +also provided as a JavaScript library. + +Note that the Guix package does not yet support the @command{flow-node} +command or the Node.js require hook for interactive development."))) + (define-public tinyproxy (package (name "tinyproxy") -- 2.41.0