rust: Allow setting cargoSha256 to null.

Setting the hash to null is a convenient way to bypass the hash check
while developing. It looks like the ability to do this was inadvertently
removed while adding vendor directory support.

This still checks that the user is explicitly setting the value but
allows null as a valid option.
This commit is contained in:
Kevin Cox
2018-04-07 22:44:21 +01:00
parent e1dee4efcb
commit 4499513e54

View File

@@ -4,7 +4,7 @@ let
inherit stdenv cacert git rust cargo-vendor;
};
in
{ name, cargoSha256 ? null
{ name, cargoSha256 ? "unset"
, src ? null
, srcs ? null
, sourceRoot ? null
@@ -17,7 +17,7 @@ in
, cargoVendorDir ? null
, ... } @ args:
assert cargoVendorDir == null -> cargoSha256 != null;
assert cargoVendorDir == null -> cargoSha256 != "unset";
let
lib = stdenv.lib;