rustPlatform.fetchCargo: handle custom Cargo.lock patchfiles with validation

Previously, we would asssert that the lockfiles are consistent during the
unpackPhase, but if the pkg has a patch for the lockfile itself then we must
wait until the patchPhase is complete to check.

This also removes an implicity dependency on the src attribute coming from
`fetchzip` / `fetchFromGitHub`, which happens to name the source directory
"source". Now we glob for it, so different fetchers will work consistently.
This commit is contained in:
Benjamin Hipple
2020-02-28 18:54:23 -08:00
committed by Jon
parent 71d5e1595c
commit ad30a30488
6 changed files with 1092 additions and 23 deletions
@@ -10,12 +10,11 @@ rustPlatform.buildRustPackage rec {
rev = "v${version}";
sha256 = "0vl996y58a9b62d8sqrpfn2h8qkya7qbg5zqsmy7nxhph1vhbspj";
};
# Upstreamed in https://github.com/tiffany352/rink-rs/pull/53
cargoPatches = [ ./cargo-lock.patch ];
# Delete this on next update; see #79975 for details
legacyCargoFetcher = true;
cargoSha256 = "0q2g1hkqyzq9lsas4fhsbpk3jn5hikchh6i1jf9c08ca2xm136c2";
cargoSha256 = "0shlh0m9k0iqxpv9zmiw7a6v197swrvpz9x6qzhximzkdwni9gz9";
buildInputs = [ pkgconfig ];
propagatedBuildInputs = [ openssl gmp ncurses ];