3
0
Fork 0
forked from mirrors/nixpkgs

rustPlatform.fetchCargoTarball: default outputHashAlgo to sha256

This commit is contained in:
figsoda 2023-01-07 17:53:21 -05:00
parent 3c3d6bedf0
commit 45fc1f185f

View file

@ -28,7 +28,11 @@ in
} @ args:
let hash_ =
if args ? hash then { outputHashAlgo = null; outputHash = args.hash; }
if args ? hash then
{
outputHashAlgo = if args.hash == "" then "sha256" else null;
outputHash = args.hash;
}
else if args ? sha256 then { outputHashAlgo = "sha256"; outputHash = args.sha256; }
else throw "fetchCargoTarball requires a hash for ${name}";
in stdenv.mkDerivation ({