From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:47177) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hn6sK-0000l5-3M for guix-patches@gnu.org; Mon, 15 Jul 2019 15:43:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hn6sI-0002dj-Uj for guix-patches@gnu.org; Mon, 15 Jul 2019 15:43:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40359) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hn6sI-0002d1-Iu for guix-patches@gnu.org; Mon, 15 Jul 2019 15:43:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hn6sI-00006u-E4 for guix-patches@gnu.org; Mon, 15 Jul 2019 15:43:02 -0400 Subject: [bug#36676] [PATCH 1/3] guix: cargo-build-system: Set CARGO_HOME early to fix build References: <20190715194028.91259-1-rob@vllmrt.net> In-Reply-To: <20190715194028.91259-1-rob@vllmrt.net> Resent-Message-ID: From: Robert Vollmert Date: Mon, 15 Jul 2019 21:41:53 +0200 Message-Id: <20190715194155.91313-1-rob@vllmrt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 36676@debbugs.gnu.org Cc: Robert Vollmert This makes the packages from (gnu packages crates-io) not fail to build outright with starting phase `build' error: failed to acquire package cache lock Caused by: failed to open: /homeless-shelter/.cargo/.package-cache Caused by: Permission denied (os error 13) phase `build' failed after 0.0 seconds * guix/build/cargo-build-system.scm (configure): Set CARGO_HOME. (install): No longer set CARGO_HOME. --- guix/build/cargo-build-system.scm | 4 +--- 1 file changed, 1 insertion(+), 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. -- 2.20.1 (Apple Git-117)