summary refs log tree commit diff
path: root/pkgs/build-support/rust/fetch-cargo-tarball
diff options
context:
space:
mode:
authorlinsui <linsui@inbox.lv>2023-01-31 22:28:06 +0800
committerzowoq <59103226+zowoq@users.noreply.github.com>2023-02-01 06:53:43 +1000
commit9bc4f340349d6d116579fd04dce7d3d2bf3a420c (patch)
tree27e1639c02fbad6293192f14dff26de3c97764f7 /pkgs/build-support/rust/fetch-cargo-tarball
parentee2db082ffd5d034789b702af69e0527f4946161 (diff)
downloadnixpkgs-9bc4f340349d6d116579fd04dce7d3d2bf3a420c.tar
nixpkgs-9bc4f340349d6d116579fd04dce7d3d2bf3a420c.tar.gz
nixpkgs-9bc4f340349d6d116579fd04dce7d3d2bf3a420c.tar.bz2
nixpkgs-9bc4f340349d6d116579fd04dce7d3d2bf3a420c.tar.lz
nixpkgs-9bc4f340349d6d116579fd04dce7d3d2bf3a420c.tar.xz
nixpkgs-9bc4f340349d6d116579fd04dce7d3d2bf3a420c.tar.zst
nixpkgs-9bc4f340349d6d116579fd04dce7d3d2bf3a420c.zip
cargo: move cert info to fetch-cargo-tarball
As proposed in https://github.com/NixOS/nixpkgs/pull/82496, we should only set the related env vars for the fetcher instead of breaking the function of cargo itself.
Diffstat (limited to 'pkgs/build-support/rust/fetch-cargo-tarball')
-rw-r--r--pkgs/build-support/rust/fetch-cargo-tarball/default.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/build-support/rust/fetch-cargo-tarball/default.nix b/pkgs/build-support/rust/fetch-cargo-tarball/default.nix
index 7ca306b613b..36ab9316974 100644
--- a/pkgs/build-support/rust/fetch-cargo-tarball/default.nix
+++ b/pkgs/build-support/rust/fetch-cargo-tarball/default.nix
@@ -73,6 +73,9 @@ in stdenv.mkDerivation ({
 
     ${cargoUpdateHook}
 
+    # Override the `http.cainfo` option usually specified in `.cargo/config`.
+    export CARGO_HTTP_CAINFO=${cacert}/etc/ssl/certs/ca-bundle.crt
+
     cargo vendor $name --respect-source-config | cargo-vendor-normalise > $CARGO_CONFIG
 
     # Create an empty vendor directory when there is no dependency to vendor