Skip to content

Commit

Permalink
rustPlatform.fetchCargoTarball: use sparse protocol for crates.io
Browse files Browse the repository at this point in the history
  • Loading branch information
zowoq committed Mar 26, 2023
1 parent 91c3620 commit 9861cf4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkgs/build-support/rust/fetch-cargo-tarball/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 9861cf4

Please sign in to comment.