Subject: bug#36667: closed ((No Subject))

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 20 Jan 2022 22:03:02 +0000

Your bug report

#36667: crates-io.scm packages should build on master

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
36667: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=36667
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: (No Subject)
From: Attila Lendvai <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Thu, 20 Jan 2022 22:02:44 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Empty Message

Subject: crates-io.scm packages should build on master
From: [email-masked]
To: [email-masked]
Date: Mon, 15 Jul 2019 14:21:15 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Rust libraries contained in gnu/packages/crates-io.scm are not building 
anymore because cargo wants to download crate dependencies inside the 
store.

The attached patch sets the CARGO_HOME environment variable  to "." much 
earlier than it previously was, just after the configure phase. With the 
attached patch all packages in crates-io.scm build without errors.

I hope I did everything right,

Bye,

Giacomo

From 867b8bd5fc43305b3dac3d9c8e7574344170d8aa Mon Sep 17 00:00:00 2001
From: Giacomo Leidi <[email-masked]>
Date: Mon, 15 Jul 2019 16:07:00 +0200
Subject: [PATCH] guix: Fix cargo-build-system.

* guix/build/cargo-build-system.scm (install): Moved CARGO_HOME setting
to...
* guix/build/cargo-build-system.scm (configure): ... here.
---
 guix/build/cargo-build-system.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm
index 1f36304b15..a34bd0632a 100644
--- a/guix/build/cargo-build-system.scm
+++ b/guix/build/cargo-build-system.scm
@@ -118,6 +118,9 @@ directory = '" port)
   ;; upgrading the compiler for example.
   (setenv "RUSTFLAGS" "--cap-lints allow")
   (setenv "CC" (string-append (assoc-ref inputs "gcc") "/bin/gcc"))
+  ;; Force cargo to honor our .cargo/config definitions
+  ;; https://github.com/rust-lang/cargo/issues/6397
+  (setenv "CARGO_HOME" ".")
   #t)
 
 (define* (build #:key
@@ -148,9 +151,6 @@ directory = '" port)
     ;; Make cargo reuse all the artifacts we just built instead
     ;; of defaulting to making a new temp directory
     (setenv "CARGO_TARGET_DIR" "./target")
-    ;; Force cargo to honor our .cargo/config definitions
-    ;; https://github.com/rust-lang/cargo/issues/6397
-    (setenv "CARGO_HOME" ".")
 
     ;; Only install crates which include binary targets,
     ;; otherwise cargo will raise an error.
-- 
2.22.0