aboutsummaryrefslogtreecommitdiff
path: root/src/nix/show-config.cc
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2021-07-15 18:17:18 +0200
committerregnat <rg@regnat.ovh>2021-07-15 18:41:56 +0200
commit9b1f3cbc133eafdaadf89ee9e4f3ce6a11cbbcce (patch)
treecefd2afaa698da973ad5ccfc58ddb083ea4fa4f0 /src/nix/show-config.cc
parentbdc24efc87caf2f0a42345bc83b3c6409889ca82 (diff)
Forward the whole Nix config to the post-build-hook
Fill `NIX_CONFIG` with the value of the current Nix configuration before calling the post-build-hook. That way the whole configuration (including the possible `experimental-features`, a possibly `--store` option or whatever) will be made available to the hook
Diffstat (limited to 'src/nix/show-config.cc')
-rw-r--r--src/nix/show-config.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/nix/show-config.cc b/src/nix/show-config.cc
index 91721219b..29944e748 100644
--- a/src/nix/show-config.cc
+++ b/src/nix/show-config.cc
@@ -22,10 +22,7 @@ struct CmdShowConfig : Command, MixJSON
// FIXME: use appropriate JSON types (bool, ints, etc).
logger->cout("%s", globalConfig.toJSON().dump());
} else {
- std::map<std::string, Config::SettingInfo> settings;
- globalConfig.getSettings(settings);
- for (auto & s : settings)
- logger->cout("%s = %s", s.first, s.second.value);
+ logger->cout("%s", globalConfig.toKeyValue());
}
}
};