mirror of
https://github.com/NixOS/nix
synced 2025-06-28 01:11:15 +02:00
reproducibility: hide non-reproducible settings from manual
Because the manual is generated from default values which are themselves generated from various sources (cpuid, bios settings (kvm), number of cores). This commit hides non-reproducible settings from the manual output.
This commit is contained in:
parent
1a9bfdc4ca
commit
21520297da
5 changed files with 32 additions and 22 deletions
|
@ -232,16 +232,19 @@ protected:
|
|||
|
||||
T value;
|
||||
const T defaultValue;
|
||||
const bool documentDefault;
|
||||
|
||||
public:
|
||||
|
||||
BaseSetting(const T & def,
|
||||
const bool documentDefault,
|
||||
const std::string & name,
|
||||
const std::string & description,
|
||||
const std::set<std::string> & aliases = {})
|
||||
: AbstractSetting(name, description, aliases)
|
||||
, value(def)
|
||||
, defaultValue(def)
|
||||
, documentDefault(documentDefault)
|
||||
{ }
|
||||
|
||||
operator const T &() const { return value; }
|
||||
|
@ -288,8 +291,9 @@ public:
|
|||
const T & def,
|
||||
const std::string & name,
|
||||
const std::string & description,
|
||||
const std::set<std::string> & aliases = {})
|
||||
: BaseSetting<T>(def, name, description, aliases)
|
||||
const std::set<std::string> & aliases = {},
|
||||
const bool documentDefault = true)
|
||||
: BaseSetting<T>(def, documentDefault, name, description, aliases)
|
||||
{
|
||||
options->addSetting(this);
|
||||
}
|
||||
|
@ -311,7 +315,7 @@ public:
|
|||
const std::string & name,
|
||||
const std::string & description,
|
||||
const std::set<std::string> & aliases = {})
|
||||
: BaseSetting<Path>(def, name, description, aliases)
|
||||
: BaseSetting<Path>(def, true, name, description, aliases)
|
||||
, allowEmpty(allowEmpty)
|
||||
{
|
||||
options->addSetting(this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue