mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
rustPlatform.fetchCargoTarball: use sparse protocol for crates.io
This commit is contained in:
parent
91c36201aa
commit
9861cf4a7f
@ -62,6 +62,10 @@ in stdenv.mkDerivation ({
|
||||
export CARGO_HOME=$(mktemp -d cargo-home.XXX)
|
||||
CARGO_CONFIG=$(mktemp cargo-config.XXXX)
|
||||
|
||||
# https://blog.rust-lang.org/2023/03/09/Rust-1.68.0.html#cargos-sparse-protocol
|
||||
# planned to become the default in 1.70
|
||||
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
||||
|
||||
if [[ -n "$NIX_CRATES_INDEX" ]]; then
|
||||
cat >$CARGO_HOME/config.toml <<EOF
|
||||
[source.crates-io]
|
||||
|
Loading…
Reference in New Issue
Block a user