From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id kBzBD9EOB1/qfQAA0tVLHw (envelope-from ) for ; Thu, 09 Jul 2020 12:34:25 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id IOx0C9EOB18/WwAAbx9fmQ (envelope-from ) for ; Thu, 09 Jul 2020 12:34:25 +0000 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 7B192940AF7 for ; Thu, 9 Jul 2020 12:34:24 +0000 (UTC) Received: from localhost ([::1]:42114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtVks-0007me-HM for larch@yhetil.org; Thu, 09 Jul 2020 08:34:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48302) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jtVkY-0007h6-DS for guix-patches@gnu.org; Thu, 09 Jul 2020 08:34:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56879) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jtVkY-0003mR-4S for guix-patches@gnu.org; Thu, 09 Jul 2020 08:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jtVkY-0006NT-2G for guix-patches@gnu.org; Thu, 09 Jul 2020 08:34:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42295] [PATCH] gnu: rust-1.44: Add rustfmt output. Resent-From: Matthew Kraai Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 09 Jul 2020 12:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42295 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 42295@debbugs.gnu.org Cc: Matthew Kraai X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159429798624393 (code B ref -1); Thu, 09 Jul 2020 12:34:01 +0000 Received: (at submit) by debbugs.gnu.org; 9 Jul 2020 12:33:06 +0000 Received: from localhost ([127.0.0.1]:40170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtVje-0006LN-1w for submit@debbugs.gnu.org; Thu, 09 Jul 2020 08:33:06 -0400 Received: from lists.gnu.org ([209.51.188.17]:40244) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtVjc-0006LF-Aq for submit@debbugs.gnu.org; Thu, 09 Jul 2020 08:33:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47894) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jtVjc-0007RT-32 for guix-patches@gnu.org; Thu, 09 Jul 2020 08:33:04 -0400 Received: from mail.ftbfs.org ([52.8.68.13]:39318 helo=aws.ftbfs.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jtVja-0003e1-1c for guix-patches@gnu.org; Thu, 09 Jul 2020 08:33:03 -0400 Received: from ip68-5-94-190.oc.oc.cox.net ([68.5.94.190] helo=localhost.localdomain) by aws.ftbfs.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jtVjX-0000jn-8D; Thu, 09 Jul 2020 12:32:59 +0000 From: Matthew Kraai Date: Thu, 9 Jul 2020 05:32:56 -0700 Message-Id: <20200709123256.7690-1-kraai@ftbfs.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=52.8.68.13; envelope-from=kraai@ftbfs.org; helo=aws.ftbfs.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/09 08:32:59 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.4 (--) 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 3.99 X-TUID: MJmqEAsHQLXq * gnu/packages/rust.scm (rust-1.44): Add a rustfmt output. --- gnu/packages/rust.scm | 50 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 6fc0fd4f52..52aef9478b 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -1277,8 +1277,54 @@ move around." "18akhk0wz1my6y9vhardriy2ysc482z0fnjdcgs9gy59kmnarxkm")) (define-public rust-1.44 - (rust-bootstrapped-package rust-1.43 "1.44.1" - "0ww4z2v3gxgn3zddqzwqya1gln04p91ykbrflnpdbmcd575n8bky")) + (let ((base-rust + (rust-bootstrapped-package rust-1.43 "1.44.1" + "0ww4z2v3gxgn3zddqzwqya1gln04p91ykbrflnpdbmcd575n8bky"))) + (package + (inherit base-rust) + (outputs '("out" "doc" "cargo" "rustfmt")) + (arguments + (substitute-keyword-arguments (package-arguments base-rust) + ((#:phases phases) + `(modify-phases ,phases + (replace 'build + (lambda* _ + (invoke "./x.py" "build") + (invoke "./x.py" "build" "src/tools/cargo") + (invoke "./x.py" "build" "src/tools/rustfmt"))) + (replace 'check + (lambda* _ + ;; Enable parallel execution. + (let ((parallel-job-spec + (string-append "-j" (number->string + (min 4 + (parallel-job-count)))))) + (invoke "./x.py" parallel-job-spec "test" "-vv") + (invoke "./x.py" parallel-job-spec "test" + "src/tools/cargo") + (invoke "./x.py" parallel-job-spec "test" + "src/tools/rustfmt")))) + (replace 'mkdir-prefix-paths + (lambda* (#:key outputs #:allow-other-keys) + ;; As result of https://github.com/rust-lang/rust/issues/36989 + ;; `prefix' directory should exist before `install' call + (mkdir-p (assoc-ref outputs "out")) + (mkdir-p (assoc-ref outputs "cargo")) + (mkdir-p (assoc-ref outputs "rustfmt")) + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (invoke "./x.py" "install") + (substitute* "config.toml" + ;; replace prefix to specific output + (("prefix = \"[^\"]*\"") + (string-append "prefix = \"" (assoc-ref outputs "cargo") "\""))) + (invoke "./x.py" "install" "cargo") + (substitute* "config.toml" + ;; replace prefix to specific output + (("prefix = \"[^\"]*\"") + (string-append "prefix = \"" (assoc-ref outputs "rustfmt") "\""))) + (invoke "./x.py" "install" "rustfmt")))))))))) ;; NOTE: An update to LLVM 10 is coming in 1.45, make sure not to miss it. -- 2.27.0