aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArtemis Tosini <lix@artem.ist>2024-05-03 03:35:02 +0000
committerGerrit Code Review <gerrit@lix>2024-05-03 03:35:02 +0000
commit6f0636a7ed40bb1254b294eedac4f7ca04d387d6 (patch)
tree79e2167657e697b874d8dcf66347b30a93fc5d6c /src
parentd55b158e24fd4b56c6d8017626a4db7d6f56dd1f (diff)
parentecdbc3b207eaec1a2cafd2a0d494bcbabdd60a11 (diff)
Merge "libstore: check additionalSandboxProfile" into main
Diffstat (limited to 'src')
-rw-r--r--src/libstore/build/local-derivation-goal.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/libstore/build/local-derivation-goal.cc b/src/libstore/build/local-derivation-goal.cc
index 84d3b4a73..03e33a46d 100644
--- a/src/libstore/build/local-derivation-goal.cc
+++ b/src/libstore/build/local-derivation-goal.cc
@@ -192,6 +192,7 @@ void LocalDerivationGoal::tryLocalBuild()
throw Error("derivation '%s' has '__noChroot' set, "
"but that's not allowed when 'sandbox' is 'true'", worker.store.printStorePath(drvPath));
#if __APPLE__
+ additionalSandboxProfile = parsedDrv->getStringAttr("__sandboxProfile").value_or("");
if (additionalSandboxProfile != "")
throw Error("derivation '%s' specifies a sandbox profile, "
"but this is only allowed when 'sandbox' is 'relaxed'", worker.store.printStorePath(drvPath));
@@ -492,10 +493,6 @@ void LocalDerivationGoal::startBuilder()
settings.thisSystem,
concatStringsSep<StringSet>(", ", worker.store.systemFeatures));
-#if __APPLE__
- additionalSandboxProfile = parsedDrv->getStringAttr("__sandboxProfile").value_or("");
-#endif
-
/* Create a temporary directory where the build will take
place. */
tmpDir = createTempDir("", "nix-build-" + std::string(drvPath.name()), false, false, 0700);