aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-01-06 21:55:20 +0100
committerGitHub <noreply@github.com>2022-01-06 21:55:20 +0100
commit3ec02c6743e4863bea1dfc3ea39a7ee72e0e83c7 (patch)
tree237bf1ccba7aae5b7751aaf034173de7c2735bf0 /src/libexpr
parentbdc577936ff1214e5fb9c7d0f57ddc4a2241322d (diff)
parentab902521b131c6a642d8cdcfe28d61b5dfe764a2 (diff)
Merge pull request #5546 from NixOS/allow-paths-in-flake-local-options
allow paths in flake local options
Diffstat (limited to 'src/libexpr')
-rw-r--r--src/libexpr/flake/flake.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libexpr/flake/flake.cc b/src/libexpr/flake/flake.cc
index 15e8d4b06..190a128d7 100644
--- a/src/libexpr/flake/flake.cc
+++ b/src/libexpr/flake/flake.cc
@@ -251,6 +251,10 @@ static Flake getFlake(
forceTrivialValue(state, *setting.value, *setting.pos);
if (setting.value->type() == nString)
flake.config.settings.insert({setting.name, state.forceStringNoCtx(*setting.value, *setting.pos)});
+ else if (setting.value->type() == nPath) {
+ PathSet emptyContext = {};
+ flake.config.settings.insert({setting.name, state.coerceToString(*setting.pos, *setting.value, emptyContext, false, true, true)});
+ }
else if (setting.value->type() == nInt)
flake.config.settings.insert({setting.name, state.forceInt(*setting.value, *setting.pos)});
else if (setting.value->type() == nBool)