Skip to content

Deprecate or remove FetchCargoTarball #619

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
yzx9 opened this issue Mar 30, 2025 · 0 comments
Open

Deprecate or remove FetchCargoTarball #619

yzx9 opened this issue Mar 30, 2025 · 0 comments

Comments

@yzx9
Copy link

yzx9 commented Mar 30, 2025

The rustPlatform.fetchCargoTarball function is going to be deprecated in 25.05. However, we are still recommending fetchCargoTarball (ranking it before importCargoLock).

To align with future changes, we should stop recommending or consider removing fetchCargoTarball, and may add fetchCargoVendor

Nixpkgs Release Notes 25.05

https://github.com/NixOS/nixpkgs/blob/4ac82c1d5c627bb70f1403e32f2efff8f7c0cfc4/doc/release-notes/rl-2505.section.md?plain=1#L32-L34

The rustPlatform.fetchCargoTarball function is deprecated, because it relied on cargo vendor not changing its output format to keep fixed-output derivation hashes the same, which is a Nix invariant, and Cargo 1.84.0 changed cargo vendor's output format. It should generally be replaced with rustPlatform.fetchCargoVendor, but rustPlatform.importCargoLock may also be appropriate in some circumstances. rustPlatform.buildRustPackage users must set useFetchCargoVendor to true and regenerate the cargoHash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant