about summary refs log tree commit diff
path: root/pkgs/development/compilers/rust
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/development/compilers/rust
parentee2db082ffd5d034789b702af69e0527f4946161 (diff)
downloadnixlib-9bc4f340349d6d116579fd04dce7d3d2bf3a420c.tar
nixlib-9bc4f340349d6d116579fd04dce7d3d2bf3a420c.tar.gz
nixlib-9bc4f340349d6d116579fd04dce7d3d2bf3a420c.tar.bz2
nixlib-9bc4f340349d6d116579fd04dce7d3d2bf3a420c.tar.lz
nixlib-9bc4f340349d6d116579fd04dce7d3d2bf3a420c.tar.xz
nixlib-9bc4f340349d6d116579fd04dce7d3d2bf3a420c.tar.zst
nixlib-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/development/compilers/rust')
-rw-r--r--pkgs/development/compilers/rust/cargo.nix13
1 files changed, 3 insertions, 10 deletions
diff --git a/pkgs/development/compilers/rust/cargo.nix b/pkgs/development/compilers/rust/cargo.nix
index d04eebe7eadf..481b4195891c 100644
--- a/pkgs/development/compilers/rust/cargo.nix
+++ b/pkgs/development/compilers/rust/cargo.nix
@@ -1,6 +1,6 @@
 { lib, stdenv, pkgsHostHost
 , file, curl, pkg-config, python3, openssl, cmake, zlib
-, installShellFiles, makeWrapper, cacert, rustPlatform, rustc
+, installShellFiles, makeWrapper, rustPlatform, rustc
 , CoreFoundation, Security
 , auditable ? false # TODO: change to true when this is the default
 }:
@@ -28,7 +28,7 @@ rustPlatform.buildRustPackage {
     (lib.getDev pkgsHostHost.curl)
     zlib
   ];
-  buildInputs = [ cacert file curl python3 openssl zlib ]
+  buildInputs = [ file curl python3 openssl zlib ]
     ++ lib.optionals stdenv.isDarwin [ CoreFoundation Security ];
 
   # cargo uses git-rs which is made for a version of libgit2 from recent master that
@@ -39,14 +39,7 @@ rustPlatform.buildRustPackage {
   RUSTC_BOOTSTRAP = 1;
 
   postInstall = ''
-    # NOTE: We override the `http.cainfo` option usually specified in
-    # `.cargo/config`. This is an issue when users want to specify
-    # their own certificate chain as environment variables take
-    # precedence
-    wrapProgram "$out/bin/cargo" \
-      --suffix PATH : "${rustc}/bin" \
-      --set CARGO_HTTP_CAINFO "${cacert}/etc/ssl/certs/ca-bundle.crt" \
-      --set SSL_CERT_FILE "${cacert}/etc/ssl/certs/ca-bundle.crt"
+    wrapProgram "$out/bin/cargo" --suffix PATH : "${rustc}/bin"
 
     installManPage src/tools/cargo/src/etc/man/*