electrs: fix conditional cargoSha256

This commit is contained in:
Erik Arvstedt 2020-05-02 18:07:21 +02:00 committed by Jonas Nick
parent f5dbac318d
commit 2d3a1e839e
No known key found for this signature in database
GPG Key ID: 4861DBF262123605

View File

@ -13,8 +13,8 @@ rustPlatform.buildRustPackage rec {
nativeBuildInputs = [ llvmPackages.clang ];
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
cargoSha256 = if pkgs ? cargo-vendor then
# nixpkgs ≤ 19.09
cargoSha256 = if builtins.pathExists "${pkgs.path}/pkgs/build-support/rust/fetchcargo.nix" then
# nixpkgs ≤ 20.03
"19qs8if8fmygv6j74s6iwzm534fybwasjvmzdqcl996xhg75w6gi"
else
# for recent nixpkgs with cargo-native vendoring (introduced in nixpkgs PR #69274)