aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/primops.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r--src/libexpr/primops.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index b906e7747..005a38319 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -4288,13 +4288,16 @@ void EvalState::createBaseEnv()
.impureOnly = true,
});
- if (!evalSettings.pureEval) {
- v.mkString(settings.thisSystem.get());
- }
+ if (!evalSettings.pureEval)
+ v.mkString(evalSettings.getCurrentSystem());
addConstant("__currentSystem", v, {
.type = nString,
.doc = R"(
- The value of the [`system` configuration option](@docroot@/command-ref/conf-file.md#conf-pure-eval).
+ The value of the
+ [`eval-system`](@docroot@/command-ref/conf-file.md#conf-eval-system)
+ or else
+ [`system`](@docroot@/command-ref/conf-file.md#conf-system)
+ configuration option.
It can be used to set the `system` attribute for [`builtins.derivation`](@docroot@/language/derivations.md) such that the resulting derivation can be built on the same system that evaluates the Nix expression: