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
This commit is contained in:
Efraim Flashner 2023-11-28 12:58:36 +02:00
parent 6619021d32
commit 55faf486c7
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -181,7 +181,8 @@ (define* (configure #:key inputs
;; 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") "']