From 7d8f9ee62ea2aab31b3e71e499302d67861718db Mon Sep 17 00:00:00 2001 From: linsui Date: Sun, 21 Aug 2022 17:09:09 +0800 Subject: [PATCH] build-rust-package: cargoSha256 and cargoHash must not be null --- pkgs/build-support/rust/build-rust-package/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/rust/build-rust-package/default.nix b/pkgs/build-support/rust/build-rust-package/default.nix index 95b6f357e56a..db0d2c53bb1e 100644 --- a/pkgs/build-support/rust/build-rust-package/default.nix +++ b/pkgs/build-support/rust/build-rust-package/default.nix @@ -52,8 +52,9 @@ , buildAndTestSubdir ? null , ... } @ args: -assert cargoVendorDir == null && cargoLock == null -> !(args ? cargoSha256) && !(args ? cargoHash) - -> throw "cargoSha256, cargoHash, cargoVendorDir, or cargoLock must be set"; +assert cargoVendorDir == null && cargoLock == null + -> !(args ? cargoSha256 && args.cargoSha256 != null) && !(args ? cargoHash && args.cargoHash != null) + -> throw "cargoSha256, cargoHash, cargoVendorDir, or cargoLock must be set"; assert buildType == "release" || buildType == "debug"; let