mirror of
https://github.com/NixOS/nix
synced 2025-07-08 02:43:54 +02:00
Merge pull request #5020 from NixOS/make-the-repl-reuse-the-whole-nix-config
Forward the whole Nix config to the repl subprocesses
This commit is contained in:
commit
58cb411db6
3 changed files with 20 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue