aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-07-19 16:02:02 +0200
committerGitHub <noreply@github.com>2021-07-19 16:02:02 +0200
commit58cb411db628e6e8db9c789f431c8622615f3221 (patch)
tree883424c8d203275411304d0e461780e3834fb004 /src
parent2cf21f282939b9a030a5ead88258fcbb26404279 (diff)
parentc05bdef020d99da1204629bba7b775553c5d6005 (diff)
Merge pull request #5020 from NixOS/make-the-repl-reuse-the-whole-nix-config
Forward the whole Nix config to the repl subprocesses
Diffstat (limited to 'src')
-rw-r--r--src/nix/repl.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/nix/repl.cc b/src/nix/repl.cc
index 0275feae7..bf3b2c401 100644
--- a/src/nix/repl.cc
+++ b/src/nix/repl.cc
@@ -107,11 +107,8 @@ NixRepl::~NixRepl()
string runNix(Path program, const Strings & args,
const std::optional<std::string> & input = {})
{
- auto experimentalFeatures = concatStringsSep(" ", settings.experimentalFeatures.get());
- auto nixConf = getEnv("NIX_CONFIG").value_or("");
- nixConf.append("\nexperimental-features = " + experimentalFeatures);
auto subprocessEnv = getEnv();
- subprocessEnv["NIX_CONFIG"] = nixConf;
+ subprocessEnv["NIX_CONFIG"] = globalConfig.toKeyValue();
RunOptions opts(settings.nixBinDir+ "/" + program, args);
opts.input = input;
opts.environment = subprocessEnv;