buildDepsOnly: remove (now unnecessary) cargoLock check

* Previously we would manually copy over any Cargo.lock file from the
  source to the dummified source
* Now, `mkDummySrc` will implicitly copy the file if it is present, or
  ignore it if missing, so this check is a bit overzealous now
* Loosening this check also allows callers to sneak in their own
  Cargo.lock file (e.g. through a patch phase) while still avoiding IFD
This commit is contained in:
Ivan Petkov 2022-06-02 20:51:28 -07:00
parent b2fedd23ff
commit 6fd4d85dac
No known key found for this signature in database
GPG Key ID: BB6F9EFC065832B6

View File

@ -28,9 +28,8 @@ let
path = args.src or throwMsg;
cargoToml = path + "/Cargo.toml";
cargoLock = path + "/Cargo.lock";
dummySrc =
if builtins.pathExists cargoToml && builtins.pathExists cargoLock
if builtins.pathExists cargoToml
then mkDummySrc args
else throwMsg;
in