mirror of
https://github.com/NixOS/nix.git
synced 2025-11-27 12:41:00 +01:00
Split shell & json creation for build environments with structured attrs
This commit is contained in:
parent
447928bdb5
commit
f1e281c4fe
4 changed files with 20 additions and 13 deletions
|
|
@ -1086,10 +1086,9 @@ void LocalDerivationGoal::initEnv()
|
|||
|
||||
void LocalDerivationGoal::writeStructuredAttrs()
|
||||
{
|
||||
if (auto structAttrs = parsedDrv->generateStructuredAttrs(inputRewrites, worker.store, inputPaths)) {
|
||||
auto value = structAttrs.value();
|
||||
auto jsonSh = value.first;
|
||||
auto json = value.second;
|
||||
if (auto structAttrsJson = parsedDrv->prepareStructuredAttrs(inputRewrites, worker.store, inputPaths)) {
|
||||
auto json = structAttrsJson.value();
|
||||
auto jsonSh = parsedDrv->writeStructuredAttrsShell(json);
|
||||
|
||||
writeFile(tmpDir + "/.attrs.sh", rewriteStrings(jsonSh, inputRewrites));
|
||||
chownToBuilder(tmpDir + "/.attrs.sh");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue