aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLinus Heckemann <git@sphalerite.org>2023-03-16 15:21:02 +0100
committerLinus Heckemann <git@sphalerite.org>2023-03-16 15:26:52 +0100
commitaf4cbdafe782ef3064156b33315469c27c36fcff (patch)
tree68dceba1f60396d1afda501ab28dbad6cf85350e /src
parenteb56cb7cc7fa9fb58e2d9dc0322375da23b0eb65 (diff)
LocalDerivationGoal: set NIX_ATTRS_*_FILE correctly for sandboxed builds
Diffstat (limited to 'src')
-rw-r--r--src/libstore/build/local-derivation-goal.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/build/local-derivation-goal.cc b/src/libstore/build/local-derivation-goal.cc
index 6fb9b86e0..13a977bd1 100644
--- a/src/libstore/build/local-derivation-goal.cc
+++ b/src/libstore/build/local-derivation-goal.cc
@@ -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";
}
}