Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

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.

(cherry picked from commit 4499513e54dcd8c76280fca69083a139cacd0303)

authored by Kevin Cox and committed by Jörg Thalheim 8faa9c2e 2d039bb0

+2 -2
+2 -2
pkgs/build-support/rust/default.nix
··· 4 4 inherit stdenv cacert git rust cargo-vendor; 5 5 }; 6 6 in 7 - { name, cargoSha256 ? null 7 + { name, cargoSha256 ? "unset" 8 8 , src ? null 9 9 , srcs ? null 10 10 , sourceRoot ? null ··· 17 17 , cargoVendorDir ? null 18 18 , ... } @ args: 19 19 20 - assert cargoVendorDir == null -> cargoSha256 != null; 20 + assert cargoVendorDir == null -> cargoSha256 != "unset"; 21 21 22 22 let 23 23 lib = stdenv.lib;