>From 326a4761b03c50481d44d5b485954d823006bbb8 Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Fri, 23 Nov 2018 11:58:06 +0000 Subject: [PATCH v2] gnu: rust: Do not run tests when building for bootstrapping. * gnu/packages/rust.scm (rust-bootstrapped-package): Create a temporary rust-bootstrap package that inherits from base-rust and removes the check phase. Then use it for the cargo-bootsrap and rustc-bootstrap native inputs. --- gnu/packages/rust.scm | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index a56faad079..7d416836aa 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2017 Efraim Flashner ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018 Danny Milosavljevic +;;; Copyright © 2018 Pierre Langlois ;;; ;;; This file is part of GNU Guix. ;;; @@ -83,15 +84,26 @@ (define* (rust-bootstrapped-package base-rust version checksum #:key (patches '())) "Bootstrap rust VERSION with source checksum CHECKSUM patched with PATCHES using BASE-RUST." - (package - (inherit base-rust) - (version version) - (source - (rust-source version checksum #:patches patches)) - (native-inputs - (alist-replace "cargo-bootstrap" (list base-rust "cargo") - (alist-replace "rustc-bootstrap" (list base-rust) - (package-native-inputs base-rust)))))) + ;; Tests take a long time to run, as they do not run in parallel for + ;; stability reasons. Disable them when building the rust used for + ;; bootstrapping. + (let ((rust-bootstrap + (package + (inherit base-rust) + (arguments + (substitute-keyword-arguments (package-arguments base-rust) + ((#:phases phases) + `(modify-phases ,phases + (delete 'check)))))))) + (package + (inherit base-rust) + (version version) + (source + (rust-source version checksum #:patches patches)) + (native-inputs + (alist-replace "cargo-bootstrap" (list rust-bootstrap "cargo") + (alist-replace "rustc-bootstrap" (list rust-bootstrap) + (package-native-inputs base-rust))))))) (define-public mrustc (let ((rustc-version "1.19.0")) -- 2.19.2