also respect cargoRoot when updating checksum

This commit is contained in:
Jörg Thalheim 2023-06-16 08:23:16 +02:00
parent ef5b8337a0
commit fe6b2e9cdc

View File

@ -167,10 +167,10 @@ def update_cargo_lock(
"--print-out-paths",
"--expr",
f"""
{get_package(opts)}.overrideAttrs (_: {{
{get_package(opts)}.overrideAttrs (old: {{
cargoDeps = null;
postUnpack = ''
cp -r "$sourceRoot/Cargo.lock" $out
cp -r "$sourceRoot/${{old.cargoRoot or "."}}/Cargo.lock" $out
exit
'';
outputs = [ "out" ];