Skip to content

Commit

Permalink
Merge pull request #8053 from DeterminateSystems/fix-structuredattrs-…
Browse files Browse the repository at this point in the history
…sandbox

LocalDerivationGoal: set NIX_ATTRS_*_FILE correctly for sandboxed builds
  • Loading branch information
edolstra authored Mar 16, 2023
2 parents eb56cb7 + af4cbda commit 581e11c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libstore/build/local-derivation-goal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1154,10 +1154,10 @@ void LocalDerivationGoal::writeStructuredAttrs()

writeFile(tmpDir + "/.attrs.sh", rewriteStrings(jsonSh, inputRewrites));
chownToBuilder(tmpDir + "/.attrs.sh");
env["NIX_ATTRS_SH_FILE"] = tmpDir + "/.attrs.sh";
env["NIX_ATTRS_SH_FILE"] = tmpDirInSandbox + "/.attrs.sh";
writeFile(tmpDir + "/.attrs.json", rewriteStrings(json.dump(), inputRewrites));
chownToBuilder(tmpDir + "/.attrs.json");
env["NIX_ATTRS_JSON_FILE"] = tmpDir + "/.attrs.json";
env["NIX_ATTRS_JSON_FILE"] = tmpDirInSandbox + "/.attrs.json";
}
}

Expand Down

0 comments on commit 581e11c

Please sign in to comment.