1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 05:21:16 +02:00

nix: Make all options available as flags

Thus, instead of ‘--option <name> <value>’, you can write ‘--<name>
<value>’. So

  --option http-connections 100

becomes

  --http-connections 100

Apart from brevity, the difference is that it's not an error to set a
non-existent option via --option, but unrecognized arguments are
fatal.

Boolean options have special treatment: they're mapped to the
argument-less flags ‘--<name>’ and ‘--no-<name>’. E.g.

  --option auto-optimise-store false

becomes

  --no-auto-optimise-store
This commit is contained in:
Eelco Dolstra 2017-06-07 16:17:17 +02:00
parent c8cc50d46e
commit b8283773bd
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
4 changed files with 40 additions and 0 deletions

View file

@ -63,6 +63,8 @@ public:
void resetOverriden();
void toJSON(JSONObject & out);
void convertToArgs(Args & args);
};
class AbstractSetting
@ -99,6 +101,8 @@ protected:
virtual void toJSON(JSONPlaceholder & out);
virtual void convertToArg(Args & args);
bool isOverriden() { return overriden; }
};
@ -132,6 +136,8 @@ public:
std::string to_string() override;
void convertToArg(Args & args) override;
void toJSON(JSONPlaceholder & out) override;
};