about summary refs log tree commit diff
path: root/pkgs/build-support/rust
diff options
context:
space:
mode:
authorKevin Cox <kevincox@kevincox.ca>2018-04-07 22:44:21 +0100
committerKevin Cox <kevincox@kevincox.ca>2018-04-07 22:48:55 +0100
commit4499513e54dcd8c76280fca69083a139cacd0303 (patch)
treeaaa3257fd0d97e7e6d4c8e1525067be28986fff9 /pkgs/build-support/rust
parente1dee4efcbffc72260025078bf8297a3b732509c (diff)
downloadnixlib-4499513e54dcd8c76280fca69083a139cacd0303.tar
nixlib-4499513e54dcd8c76280fca69083a139cacd0303.tar.gz
nixlib-4499513e54dcd8c76280fca69083a139cacd0303.tar.bz2
nixlib-4499513e54dcd8c76280fca69083a139cacd0303.tar.lz
nixlib-4499513e54dcd8c76280fca69083a139cacd0303.tar.xz
nixlib-4499513e54dcd8c76280fca69083a139cacd0303.tar.zst
nixlib-4499513e54dcd8c76280fca69083a139cacd0303.zip
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.
Diffstat (limited to 'pkgs/build-support/rust')
-rw-r--r--pkgs/build-support/rust/default.nix4
1 files 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;