unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Pierre Langlois <pierre.langlois@gmx.com>
To: Julien Lepiller <julien@lepiller.eu>, Marius Bakke <mbakke@fastmail.com>
Cc: 33465@debbugs.gnu.org
Subject: [bug#33465] [PATCH] gnu: rust: Don't depend on 'git'.
Date: Fri, 23 Nov 2018 17:47:33 +0000	[thread overview]
Message-ID: <cubpnuvofd6.fsf@gmx.com> (raw)
In-Reply-To: <cubr2fboj57.fsf@gmx.com>

[-- Attachment #1: Type: text/plain, Size: 370 bytes --]


Pierre Langlois writes:

> Whoops, ignore that patch, it doesn't do what I wanted it to do. The
> point was to skip the tests *only* for temporary packages used for
> bootstrapping the final one. But here it's disabled the tests all the
> time, we don't want that... my bad!  I'll another look when I have time.

Right, attached is what I meant to do.

Thanks!
Pierre


[-- Attachment #2: 0001-gnu-rust-Do-not-run-tests-when-building-for-bootstra.patch --]
[-- Type: text/x-patch, Size: 2620 bytes --]

From 326a4761b03c50481d44d5b485954d823006bbb8 Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois@gmx.com>
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 <efraim@flashner.co.il>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Danny Milosavljevic <dannym+a@scratchpost.org>
+;;; Copyright © 2018 Pierre Langlois <pierre.langlois@gmx.com>
 ;;;
 ;;; 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


  reply	other threads:[~2018-11-23 17:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-22 13:58 [bug#33465] [PATCH] gnu: rust: Don't depend on 'git' Marius Bakke
2018-11-22 14:06 ` Julien Lepiller
2018-11-23 12:04   ` Pierre Langlois
2018-11-23 16:25     ` Pierre Langlois
2018-11-23 17:47       ` Pierre Langlois [this message]
2018-11-24  1:09         ` bug#33465: " Marius Bakke
2018-11-24 21:45           ` [bug#33465] " Danny Milosavljevic
2018-11-25 11:53             ` Pierre Langlois

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cubpnuvofd6.fsf@gmx.com \
    --to=pierre.langlois@gmx.com \
    --cc=33465@debbugs.gnu.org \
    --cc=julien@lepiller.eu \
    --cc=mbakke@fastmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).