Merge pull request #10178 from tweag/copy-built-outputs

Fix the outputs moving on macOS
This commit is contained in:
Eelco Dolstra 2024-03-07 15:40:54 +01:00 committed by GitHub
commit 751cb7cf51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2547,8 +2547,8 @@ SingleDrvOutputs LocalDerivationGoal::registerOutputs()
// Replace the output by a fresh copy of itself to make sure
// that there's no stale file descriptor pointing to it
Path tmpOutput = actualPath + ".tmp";
renameFile(actualPath, tmpOutput);
copyFile(tmpOutput, actualPath, true);
copyFile(actualPath, tmpOutput, true);
renameFile(tmpOutput, actualPath);
auto newInfo0 = newInfoFromCA(DerivationOutput::CAFloating {
.method = dof.ca.method,