From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 2LLCNGm5qmKKWwEAbAwnHQ (envelope-from ) for ; Thu, 16 Jun 2022 07:02:33 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id cB6sM2m5qmJZeQEAG6o9tA (envelope-from ) for ; Thu, 16 Jun 2022 07:02:33 +0200 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 5C3472BD8D for ; Thu, 16 Jun 2022 07:02:33 +0200 (CEST) Received: from localhost ([::1]:43714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1heK-0003CW-41 for larch@yhetil.org; Thu, 16 Jun 2022 01:02:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52856) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1hdr-0003CG-7B for guix-patches@gnu.org; Thu, 16 Jun 2022 01:02:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46490) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o1hdq-0002e1-VO for guix-patches@gnu.org; Thu, 16 Jun 2022 01:02:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o1hdp-0001JL-SW for guix-patches@gnu.org; Thu, 16 Jun 2022 01:02:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56010] [PATCH 2/2] gnu: Add treefmt. Resent-From: Gabriel Arazas Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 16 Jun 2022 05:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56010 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56010@debbugs.gnu.org Cc: Gabriel Arazas Received: via spool by 56010-submit@debbugs.gnu.org id=B56010.16553556654971 (code B ref 56010); Thu, 16 Jun 2022 05:02:01 +0000 Received: (at 56010) by debbugs.gnu.org; 16 Jun 2022 05:01:05 +0000 Received: from localhost ([127.0.0.1]:40387 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1hcu-0001I7-Uj for submit@debbugs.gnu.org; Thu, 16 Jun 2022 01:01:05 -0400 Received: from mail-pl1-f180.google.com ([209.85.214.180]:41849) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1hcs-0001HM-N5 for 56010@debbugs.gnu.org; Thu, 16 Jun 2022 01:01:03 -0400 Received: by mail-pl1-f180.google.com with SMTP id g8so372033plt.8 for <56010@debbugs.gnu.org>; Wed, 15 Jun 2022 22:01:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=p1P6Ywnz4dNK+H9pz+RnNBPmWjpcHH2J7KEZsarlTXM=; b=hK98I48PDQoNxLkmyer1EYb9jkLrjg3g39J1kXAygtNCqXfAh/uZ8LkHgNsaQ6GRU2 eCE2y3kWZwc8S+0+9MijaIry0K8BPotety7ZFr+wJAO51gHXFRk8c/oYUu1hEY1tOs/Z Z0xAHd3p6qWdgQo/Ync6uV2QvMomsCbC7Gb7comKNd+89BnAG6OT8LJcHrdW+UuLLtW8 wuK+ZbIBpzkzpwgSI/BZMsSv/HqVIuMvtXjjlge7fqGUdb3HYS9jZzJLQ3EyKF4TsZK3 OSezMV73gC4/up8leVsnuiUDg8PQLbQnFviLQtGuZk3+Sftf0Kt0wV+3aSBXMHTXiBbe bZ0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=p1P6Ywnz4dNK+H9pz+RnNBPmWjpcHH2J7KEZsarlTXM=; b=dkgpTSW2GeV8T93Zo9uj4YDaDUQbbicQvSuXf3Kuu+Q869/W6uJD0JUeYFxmCSMMLq y6QSgXWdl+PDYxNTlakj0PblpmBUSn/ZqI4Lt1cGQ1qARR7uY1p26e9l6aemtFqeg548 JsCMm8F5yGpju3xSNN//d5WszXG4tEtbdQpFz7g0DwTMJwx4AXTPcjXvPw2GfSrSlkK9 AkeNoBMjPqhqFkgCsAa6IxCTCdnKbFH6SuE4lXNYyEKfl6PsFvXXYGfAHuJIFeRPW3YN 8g22vamTNSrXyfhO4i3AwE9yTQ5V48UR7txxmJiA+BkBCVVsxIjNowqyASbZS9qOrxrJ mH1w== X-Gm-Message-State: AJIora9CPn9dXQVbdezue3C3+ZHwhn9wbRhcwf+Gcsce8VAQupQ6XmSb 6pIOgfw4y+BKXph6NEZ+Zba4rp+jKPE= X-Google-Smtp-Source: AGRyM1vyTuH+w3UeXGYqf0GDOA93CyMxEU5X3l6eYGSVDdlKvreR+T3UqAggCogfuhsznxE4y2DWUw== X-Received: by 2002:a17:90a:b894:b0:1e2:d8f8:41e9 with SMTP id o20-20020a17090ab89400b001e2d8f841e9mr14019098pjr.20.1655355656631; Wed, 15 Jun 2022 22:00:56 -0700 (PDT) Received: from ni.localhost ([112.198.162.175]) by smtp.gmail.com with ESMTPSA id jf13-20020a170903268d00b00163cdf1a200sm558302plb.38.2022.06.15.22.00.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jun 2022 22:00:56 -0700 (PDT) From: Gabriel Arazas Date: Thu, 16 Jun 2022 13:00:39 +0800 Message-Id: <65448f1ebe0612b33c2b91332a232b7216f011a0.1655351682.git.foo.dogsquared@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <293660d428aa4648c2b4b12ca972306b726b3cfe.1655351682.git.foo.dogsquared@gmail.com> References: <293660d428aa4648c2b4b12ca972306b726b3cfe.1655351682.git.foo.dogsquared@gmail.com> 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1655355753; 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=p1P6Ywnz4dNK+H9pz+RnNBPmWjpcHH2J7KEZsarlTXM=; b=oznXuoJ1DW4eEOAHj5b68a9dCwYMwR7bTHGOwZOoEyirg8IwJQS1L9mijf1Q9XHeZK2SRZ p2L6jP7UZA7UPYvf+e55PnPkxw1eFnij9JSj26GDihxCO2rZXYTG1wxcFu/iitxk4P9z5d /Jg8pLxmOd7iFS1Cc4H85YkKj2dV02LIapFLsGkLXvzbO0WuXctDlwgPU0geLL79u19lu6 EPaIS/XsJmrw+xgeuLrbJ1aBH0PuQg1fJJSHCuY97ksPcd8aCXZ2vkHZ8LQg+QkpJW0Kw/ mCA+Ch6uSTqVEahSi96/ajTuVU9y4PEPcIlg2s1wsbc6aNgpgFVKqbSsioh+Ag== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655355753; a=rsa-sha256; cv=none; b=R24LhfYct/fWhfObvFBp8G6ptz/m8UMLUc29ZPIEnOm4GhJkfNpmmsZPfDNmz2QDhyyZd6 nBAkIb+Z+bYZogFw/s98V9HCAttrvq4UNJ9CLiPoVs1cTpvnaiGnRsFW/jGFbGg+gR6VVF /7s4oCAv76xtOmolwAA2uRIvVkNB4DDx+79hAlqdgIrOqeN2/bYYzzKZlI1yZRmu0tbD3i T/GH795t5tuQY4J7yX5GShKIcmlzek+3iY8iMfRYKKtuqznzeW5jPAdWQm9fiZsTs9nx91 vZQ/Bo8rVaD/yWawOVnH5XISCGdhKYvUC3z1vaGRLzt4xJKd9LYdu8mzi+XudQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=hK98I48P; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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" X-Migadu-Spam-Score: 6.51 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=hK98I48P; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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" X-Migadu-Queue-Id: 5C3472BD8D X-Spam-Score: 6.51 X-Migadu-Scanner: scn1.migadu.com X-TUID: I1J+ujZNESVA * gnu/packages/rust-apps.scm (treefmt): New variable. --- gnu/packages/rust-apps.scm | 51 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm index 6d97e289c2..e84528dff2 100644 --- a/gnu/packages/rust-apps.scm +++ b/gnu/packages/rust-apps.scm @@ -1129,6 +1129,57 @@ (define-public tectonic of support files.") (license license:expat))) +(define-public treefmt + (package + (name "treefmt") + (version "0.4.1") + (source (origin + (method url-fetch) + (uri (crate-uri "treefmt" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1rarg6rffzl1cf6r167h9p14wr696kwnzr85kwbdy7x7x5zpj5li")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs (("rust-anyhow" ,rust-anyhow-1) ("rust-console" ,rust-console-0.13) + ("rust-directories" ,rust-directories-3) + ("rust-filetime" ,rust-filetime-0.2) + ("rust-globset" ,rust-globset-0.4) + ("rust-ignore" ,rust-ignore-0.4) + ("rust-log" ,rust-log-0.4) + ("rust-path-clean" ,rust-path-clean-0.1) + ("rust-rayon" ,rust-rayon-1) + ("rust-serde" ,rust-serde-1) + ("rust-serde-json" ,rust-serde-json-1) + ("rust-sha-1" ,rust-sha-1-0.9) + ("rust-structopt" ,rust-structopt-0.3) + ("rust-tempfile" ,rust-tempfile-3) + ("rust-toml" ,rust-toml-0.5) + ("rust-which" ,rust-which-4)) + #:cargo-development-inputs + (("rust-criterion" ,rust-criterion-0.3)))) + (home-page "https://numtide.github.io/treefmt") + (synopsis "Command-line application to format the code tree") + (description + "This application provides a way to unify the formatting process of the +codebase. It is nice for large code trees where using multiple formatters are +common. @command{treefmt} comes with the following features. + +@itemize @bullet +@item Unified CLI and output. +@item Runs formatters in parallel. +@item Cache changed files for performance. +@end itemize + +The application does have some design decisions to keep in mind. + +@itemize @bullet +@item The source code is kept under version control, making it possible to revert and check changes. +@item Only one formatter per file, making outputs idempotent. +@end itemize") + (license license:expat))) + (define-public hex (package (name "hex") -- 2.36.1