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
@@ -53,10 +53,7 @@ in
./default-seccomp-policy-dir.diff
];
# Delete this on next update; see #79975 for details
legacyCargoFetcher = true;
cargoSha256 = "1d7y07wkliy5qnlyx5zj6ni39avhs3s48sqgvwxm5g5zrahg2a85";
cargoSha256 = "1s9nfgfqk140hg08i0xzylnrgrx84dqss0vnvhxnydwy9q03nk7r";
nativeBuildInputs = [ pkgconfig ];