diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2021-05-13 16:11:56 +0200 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2021-06-22 19:15:57 +0200 |
commit | f1e281c4fe1263a0c848bc8aaf57a0e61a99fa93 (patch) | |
tree | 0441e2eb826aad0530f7c6522a355ad332b9581f /src/libstore/build | |
parent | 447928bdb55d160617387e7ac5954f9a8f36004b (diff) |
Split shell & json creation for build environments with structured attrs
Diffstat (limited to 'src/libstore/build')
-rw-r--r-- | src/libstore/build/local-derivation-goal.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libstore/build/local-derivation-goal.cc b/src/libstore/build/local-derivation-goal.cc index e6b552b94..60495ae3e 100644 --- a/src/libstore/build/local-derivation-goal.cc +++ b/src/libstore/build/local-derivation-goal.cc @@ -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"); |