Skip to content

Commit

Permalink
buildRustPackage: deprecate cargoSha256 in favor of cargoHash
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksanaa committed Jul 3, 2024
1 parent b802f3a commit bde993f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkgs/build-support/rust/build-rust-package/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

assert cargoVendorDir == null && cargoLock == null
-> !(args ? cargoSha256 && args.cargoSha256 != null) && !(args ? cargoHash && args.cargoHash != null)
-> throw "cargoSha256, cargoHash, cargoVendorDir, or cargoLock must be set";
-> throw "cargoHash, cargoVendorDir, or cargoLock must be set";

let

Expand All @@ -75,7 +75,7 @@ let
} // lib.optionalAttrs (args ? cargoHash) {
hash = args.cargoHash;
} // lib.optionalAttrs (args ? cargoSha256) {
sha256 = args.cargoSha256;
sha256 = lib.warn "cargoSha256 is deprecated. Please use cargoHash with SRI hash instead." args.cargoSha256;
} // depsExtraArgs);

target = stdenv.hostPlatform.rust.rustcTargetSpec;
Expand Down

0 comments on commit bde993f

Please sign in to comment.