1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

Generalize extra-* settings

This removes the extra-substituters and extra-sandbox-paths settings
and instead makes every array setting extensible by setting
"extra-<name> = <value>" in the configuration file or passing
"--<name> <value>" on the command line.
This commit is contained in:
Eelco Dolstra 2020-10-29 18:17:39 +01:00
parent bb8e837e4c
commit ff4dea63c9
8 changed files with 83 additions and 54 deletions

View file

@ -202,7 +202,10 @@ protected:
assert(created == 123);
}
virtual void set(const std::string & value) = 0;
virtual void set(const std::string & value, bool append = false) = 0;
virtual bool isAppendable()
{ return false; }
virtual std::string to_string() const = 0;
@ -243,7 +246,9 @@ public:
void operator =(const T & v) { assign(v); }
virtual void assign(const T & v) { value = v; }
void set(const std::string & str) override;
void set(const std::string & str, bool append = false) override;
bool isAppendable() override;
virtual void override(const T & v)
{
@ -305,7 +310,7 @@ public:
options->addSetting(this);
}
void set(const std::string & str) override;
void set(const std::string & str, bool append = false) override;
Path operator +(const char * p) const { return value + p; }