From 55faf486c7b0d4d3e924b0923e8065cd4386af93 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 28 Nov 2023 12:58:36 +0200 Subject: [PATCH] build: cargo: Use correct config file for cargo config. * guix/build/cargo-build-system.scm (configure): Use .cargo/config as the config file. Add a note. Change-Id: Ice006c11184d4c8e1bdb765c3998b06ad299e55b --- guix/build/cargo-build-system.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm index 2e6aeb78be..ffb2ec898e 100644 --- a/guix/build/cargo-build-system.scm +++ b/guix/build/cargo-build-system.scm @@ -181,7 +181,8 @@ libraries or executables." ;; Configure cargo to actually use this new directory with all the crates. (setenv "CARGO_HOME" (string-append (getcwd) "/.cargo")) (mkdir-p ".cargo") - (let ((port (open-file ".cargo/config.toml" "w" #:encoding "utf-8"))) + ;; Not .cargo/config.toml, rustc/cargo will generate .cargo/config otherwise. + (let ((port (open-file ".cargo/config" "w" #:encoding "utf-8"))) ;; Placed here so it doesn't cause random rebuilds. Neither of these work. ;; sysroot = '" (assoc-ref inputs "rust-sysroot") "' ;; rustflags = ['--sysroot', '" (assoc-ref inputs "rust-sysroot") "']