Skip to content
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

rustPlatform.buildRustPackage: drop cargoSha256 #384584

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/release-notes/rl-2505.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,5 @@
- `lib.types.listOf`

- Plasma 5 and Qt 5 based versions of associated software are deprecated in NixOS 25.05, and will be removed in NixOS 25.11. Users are encouraged to upgrade to Plasma 6.

- `rustPlatform.buildRustPackage` stops handling the deprecated argument `cargoSha256`. Out-of-tree packages that haven't migrated from `cargoSha256` to `cargoHash` now receive errors.
9 changes: 2 additions & 7 deletions pkgs/build-support/rust/build-rust-package/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ lib.extendMkDerivation {
cargoDeps
else if cargoLock != null then
importCargoLock cargoLock
else if (args.cargoHash or null == null) && (args.cargoSha256 or null == null) then
else if args.cargoHash or null == null then
throw "cargoHash, cargoVendorDir, cargoDeps, or cargoLock must be set"
else if useFetchCargoVendor then
fetchCargoVendor (
Expand Down Expand Up @@ -116,15 +116,10 @@ lib.extendMkDerivation {
postUnpack
cargoUpdateHook
;
hash = args.cargoHash;
name = cargoDepsName;
patches = cargoPatches;
}
// lib.optionalAttrs (args ? cargoHash) {
hash = args.cargoHash;
}
// lib.optionalAttrs (args ? cargoSha256) {
sha256 = lib.warn "cargoSha256 is deprecated. Please use cargoHash with SRI hash instead" args.cargoSha256;
}
// depsExtraArgs
);

Expand Down