structured-attrs: chown .attrs.* files to builder

Otherwise `chmod .`'ing the build directory doesn't work anymore, which
is done in nixpkgs if sourceRoot is set to '.'.
This commit is contained in:
Robin Gloster 2020-01-23 17:38:07 +01:00
parent d506bd587a
commit f8dbde0813
No known key found for this signature in database
GPG Key ID: D5C458DF6DD97EDF
1 changed files with 2 additions and 0 deletions

View File

@ -2579,6 +2579,7 @@ void DerivationGoal::writeStructuredAttrs()
}
writeFile(tmpDir + "/.attrs.json", rewriteStrings(json.dump(), inputRewrites));
chownToBuilder(tmpDir + "/.attrs.json");
/* As a convenience to bash scripts, write a shell file that
maps all attributes that are representable in bash -
@ -2647,6 +2648,7 @@ void DerivationGoal::writeStructuredAttrs()
}
writeFile(tmpDir + "/.attrs.sh", rewriteStrings(jsonSh, inputRewrites));
chownToBuilder(tmpDir + "/.attrs.sh");
}