build-support/rust: remove assertMsg usage
This commit is contained in:
@@ -4669,7 +4669,7 @@ rec {
|
||||
# Not rate-limited, CDN URL.
|
||||
url = "https://static.crates.io/crates/${crateConfig.crateName}/${crateConfig.crateName}-${crateConfig.version}.crate";
|
||||
sha256 =
|
||||
assert (lib.assertMsg (crateConfig ? sha256) "Missing sha256 for ${name}");
|
||||
assert crateConfig ? sha256 || throw "Missing sha256 for ${name}";
|
||||
crateConfig.sha256;
|
||||
});
|
||||
extraRustcOpts =
|
||||
|
||||
@@ -78,8 +78,9 @@ lib.extendMkDerivation {
|
||||
...
|
||||
}@args:
|
||||
|
||||
assert lib.assertMsg useFetchCargoVendor
|
||||
"buildRustPackage: `useFetchCargoVendor` is non‐optional and enabled by default as of 25.05, remove it";
|
||||
assert
|
||||
useFetchCargoVendor
|
||||
|| throw "buildRustPackage: `useFetchCargoVendor` is non‐optional and enabled by default as of 25.05, remove it";
|
||||
|
||||
assert lib.warnIf (args ? useFetchCargoVendor)
|
||||
"buildRustPackage: `useFetchCargoVendor` is non‐optional and enabled by default as of 25.05, remove it"
|
||||
|
||||
@@ -120,9 +120,11 @@ let
|
||||
checksum =
|
||||
pkg.checksum or parsedLockFile.metadata."checksum ${pkg.name} ${pkg.version} (${pkg.source})";
|
||||
in
|
||||
assert lib.assertMsg (checksum != null) ''
|
||||
Package ${pkg.name} does not have a checksum.
|
||||
'';
|
||||
assert
|
||||
checksum != null
|
||||
|| throw ''
|
||||
Package ${pkg.name} does not have a checksum.
|
||||
'';
|
||||
fetchurl {
|
||||
name = "crate-${pkg.name}-${pkg.version}.tar.gz";
|
||||
url = "${downloadUrl}/${pkg.name}/${pkg.version}/download";
|
||||
|
||||
Reference in New Issue
Block a user