aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/flake
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2021-11-12 16:28:39 +0100
committerregnat <rg@regnat.ovh>2021-12-17 09:31:13 +0100
commitab902521b131c6a642d8cdcfe28d61b5dfe764a2 (patch)
treee3bdd4684832fea64f6a80db8d0704f548eaaa31 /src/libexpr/flake
parentc260640dec6e35c714b666a1e7adede5aab6972a (diff)
Allow paths in flake local settings
Fix #5505
Diffstat (limited to 'src/libexpr/flake')
-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 b15878d5c..ed753c7e4 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)