Merge pull request #276072 from lilyinstarlight/fix/cargo-workspace-root-fixup-pls

rustPlatform.importCargoLock: fix workspace_root detection
This commit is contained in:
K900 2024-01-01 18:42:49 +03:00 committed by GitHub
commit 6cbe5542b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -193,7 +193,7 @@ let
if grep -q workspace "$out/Cargo.toml"; then
chmod u+w "$out/Cargo.toml"
${replaceWorkspaceValues} "$out/Cargo.toml" "${tree}/Cargo.toml"
${replaceWorkspaceValues} "$out/Cargo.toml" "$(${cargo}/bin/cargo metadata --format-version 1 --no-deps --manifest-path $crateCargoTOML | ${jq}/bin/jq -r .workspace_root)/Cargo.toml"
fi
# Cargo is happy with empty metadata.