Ideally (pending agreement from maintainers), I would like to get this in:
https://github.com/NixOS/nixpkgs/pull/78501
This includes opt-in new behavior for fetchCargo
that makes it much more efficient and possible to cache in hashed mirrors, but at the cost of changing the cargoSha256
for Rust applications (once opted in). I’m planning on sending a treewide PR that updates all the Rust applications to the new behavior and makes it opt-out once the infra lands, so it’d be nice of the functionality for that new behavior is on the NixOS release so that backporting changes to 20.03 will be easier for maintainers.
Note that the proposed functionality has no functional change to how we build Rust applications, just how we manage the cargo vendor directory.