summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Note <jean-baptiste.note@m4x.org>2024-04-30 14:17:49 +0000
committerGuix Patches Tester <>2024-05-17 09:25:23 +0200
commitf9f9b57c0ee211212033fddf8a9c388bbc3a6bcf (patch)
tree8d2b0b50d8d21691363d29b38d6588a1ca1c507d
parent8814d74211871b4736d5a01947776951350b63d2 (diff)
downloadguix-patches-issue-70674.tar
guix-patches-issue-70674.tar.gz
gnu: rust: Add CARGO_HTTP_CAINFO to native-search-path.issue-70674
* gnu/packages/rust.scm (rust-1.55): Add CARGO_HTTP_CAINFO native-search-path so that Cargo honors custom certificates (a la GIT_SSL_CAINFO).
-rw-r--r--gnu/packages/rust.scm13
1 files changed, 11 insertions, 2 deletions
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index ba22d7f8ab..de7f7a7df2 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -542,9 +542,18 @@ ar = \"" binutils "/bin/ar" "\"
`(("bash" ,bash-minimal)
("llvm" ,llvm-13)
("openssl" ,openssl)))
- ;; rustc invokes gcc, so we need to set its search paths accordingly.
(native-search-paths
- %gcc-search-paths)
+ (cons
+ ;; For HTTPS access, Cargo reads from a single-file certificate
+ ;; specified with $CARGO_HTTP_CAINFO. See
+ ;; https://doc.rust-lang.org/cargo/reference/environment-variables.html
+ (search-path-specification
+ (variable "CARGO_HTTP_CAINFO")
+ (file-type 'regular)
+ (separator #f) ;single entry
+ (files '("etc/ssl/certs/ca-certificates.crt")))
+ ;; rustc invokes gcc, so we need to set its search paths accordingly.
+ %gcc-search-paths))
;; Limit this to systems where the final rust compiler builds successfully.
(supported-systems '("x86_64-linux" "aarch64-linux" "riscv64-linux"))
(synopsis "Compiler for the Rust programming language")