buildRustPackage: add cargoHash for SRI hashes of vendored deps

`buildRustPackage` currently accepts `cargoSha256` as a hash for
vendored dependencies. This change adds `cargoHash` which accepts SRI
hashes, setting `outputHashAlgo` to `null`.

The hash mismatch message still uses `cargoSha256` as an example,
which it probably should until we completely switch to SRI hashes.
This commit is contained in:
Daniël de Kok
2020-12-31 11:18:11 +01:00
parent 3d2ffa3dbf
commit 67a10c88bb
3 changed files with 21 additions and 9 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec {
sha256 = "04nidx43w4nnccgbrw30wg9ai8p7hbklxpn1gc6gr2325yhqvwhl";
};
cargoSha256 = "1bzq0dsdnmxniwnb6989wlhih28c4lyd11sci821whs11lhlfpz0";
cargoHash = "sha256-4F9HIQ1BQx4EikyH0DwlDAkYIeUJJbMsj7ZX23QD+K8=";
nativeBuildInputs = [
makeWrapper