From 6fd4d85dac1aae6a53e4a09b1000515c5a8774f6 Mon Sep 17 00:00:00 2001 From: Ivan Petkov Date: Thu, 2 Jun 2022 20:51:28 -0700 Subject: [PATCH] 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 --- lib/buildDepsOnly.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/buildDepsOnly.nix b/lib/buildDepsOnly.nix index c8f93e7..0011332 100644 --- a/lib/buildDepsOnly.nix +++ b/lib/buildDepsOnly.nix @@ -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