rustPlatform.importCargoLock: use cp -L again, but ignore error

We accidentally broke the dereferencing logic of copying in https://github.com/NixOS/nixpkgs/pull/379049

The new solution is just to revert back to using `cp -L` but to also ignore the
non-zero exit code with the || operator
This commit is contained in:
TomaSajt
2025-04-03 20:09:31 +05:30
committed by Masum Reza
parent 1670be595d
commit ec505766bb
@@ -228,7 +228,7 @@ let
echo Found crate ${pkg.name} at $crateCargoTOML
tree=$(dirname $crateCargoTOML)
${python3Packages.python.interpreter} -c 'import sys, shutil; shutil.copytree(sys.argv[1], sys.argv[2], ignore_dangling_symlinks=True)' "$tree" "$out"
cp -prvL "$tree" "$out" || echo "Warning: certain files couldn't be copied!" >&2
chmod u+w $out
if grep -q workspace "$out/Cargo.toml"; then