From 4499513e54dcd8c76280fca69083a139cacd0303 Mon Sep 17 00:00:00 2001 From: Kevin Cox Date: Sat, 7 Apr 2018 22:44:21 +0100 Subject: [PATCH] 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. --- pkgs/build-support/rust/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/rust/default.nix b/pkgs/build-support/rust/default.nix index 83ef146de5f8..f407ba25bf85 100644 --- a/pkgs/build-support/rust/default.nix +++ b/pkgs/build-support/rust/default.nix @@ -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;