diff mbox series

[bug#42888] gnu: rust: Fix install phase for non-x86_64 platforms.

Message ID 87d03qptmv.fsf@gmx.com
State Accepted
Headers show
Series [bug#42888] gnu: rust: Fix install phase for non-x86_64 platforms. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job

Commit Message

Pierre Langlois Aug. 16, 2020, 2:12 p.m. UTC
Hello Guix!

In an optimistic attempt to eventually have Icecat on a Pinebook Pro, I
thought I'd try and get rust building on aarch64. Here's a fix for the
post-install phase that had an x86 triplet hardcoded. With this we're
able to start off the bootstrap chain!

That being said, each step takes ~5 hours on this machine so this is
going to take a while :-), it's currently working on 1.23.

So, I suppose this should go into either core-updates or staging? WDYT?

Thanks!
Pierre

Comments

Efraim Flashner Aug. 16, 2020, 2:19 p.m. UTC | #1
On Sun, Aug 16, 2020 at 03:12:08PM +0100, Pierre Langlois wrote:
> Hello Guix!
> 
> In an optimistic attempt to eventually have Icecat on a Pinebook Pro, I
> thought I'd try and get rust building on aarch64. Here's a fix for the
> post-install phase that had an x86 triplet hardcoded. With this we're
> able to start off the bootstrap chain!

I forgot about that! It takes so long to build I never bothered with it
on my boards.

> That being said, each step takes ~5 hours on this machine so this is
> going to take a while :-), it's currently working on 1.23.
> 
> So, I suppose this should go into either core-updates or staging? WDYT?

I'd go with staging. No one wants to rebuild the rust bootstrap, but
they're basically all leaf packages so it's fine.

> 
> Thanks!
> Pierre
>
diff mbox series

Patch

From ac0415f8f724ec56022b526ade68c1aa708d51ea Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois@gmx.com>
Date: Sun, 16 Aug 2020 12:17:18 +0100
Subject: [PATCH] gnu: rust: Fix install phase for non-x86_64 platforms.

* gnu/packages/rust.scm (rust-1.20)[arguments]: Replace hardcoded x86_64
triplet with nix-system->gnu-triplet-for-rust in 'delete-install-logs phase.
---
 gnu/packages/rust.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 778aeaab05..a031683ea5 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -612,9 +612,10 @@  jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\"
                        (cargo-out (assoc-ref outputs "cargo")))
                    (for-each
                      (lambda (file) (delete-manifest-file out file))
-                     '("install.log"
+                     `("install.log"
                        "manifest-rust-docs"
-                       "manifest-rust-std-x86_64-unknown-linux-gnu"
+                       ,,(string-append "manifest-rust-std-"
+                                        (nix-system->gnu-triplet-for-rust))
                        "manifest-rustc"))
                    (for-each
                      (lambda (file) (delete-manifest-file cargo-out file))
--
2.28.0