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 ];
@@ -11,15 +11,11 @@ rustPlatform.buildRustPackage rec {
sha256 = "09zn160qxd7760ii6rs5nhr00qmaz49x1plclscznxh9hinyjyh9";
};
# Delete this on next update; see #79975 for details
legacyCargoFetcher = true;
cargoSha256 = "1k4y37x783fsd8li17k56vlx5ziwmrz167a0w5mcb9sgyd2kc19a";
buildInputs = [ libseccomp ];
# Submitted upstream https://github.com/oracle/railcar/pull/44
cargoPatches = [ ./cargo-lock.patch ];
cargoSha256 = "10qxkxpdprl2rcgy52s3q5gyg3i75qmx68rpl7cx1bgjzppfn9c3";
buildInputs = [ libseccomp ];
meta = with lib; {
description = "Rust implementation of the Open Containers Initiative oci-runtime";