summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobert Vollmert <rob@vllmrt.net>2019-07-15 21:41:53 +0200
committerDanny Milosavljevic <dannym@scratchpost.org>2019-07-16 09:52:07 +0200
commitc82c16a6f3cfeec82ba8bd7572b11852a6152c7e (patch)
treebdef14a592a89a49cf1c0785ba60bc75259f60ae
parent857ff51562f7f42b86f8eba5b883d07b4645eeb6 (diff)
downloadguix-c82c16a6f3cfeec82ba8bd7572b11852a6152c7e.tar.gz
build/cargo-build-system: Set CARGO_HOME early.
* guix/build/cargo-build-system.scm (configure): Set CARGO_HOME.
(install): No longer set CARGO_HOME.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
-rw-r--r--guix/build/cargo-build-system.scm4
1 files changed, 1 insertions, 3 deletions
diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm
index 1f36304b15..e4e62dd838 100644
--- a/guix/build/cargo-build-system.scm
+++ b/guix/build/cargo-build-system.scm
@@ -99,6 +99,7 @@ Cargo.toml file present at its root."
     inputs)
 
   ;; Configure cargo to actually use this new directory.
+  (setenv "CARGO_HOME" (string-append (getcwd) "/.cargo"))
   (mkdir-p ".cargo")
   (let ((port (open-file ".cargo/config" "w" #:encoding "utf-8")))
     (display "
@@ -148,9 +149,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.