mirror of
https://github.com/NixOS/nix
synced 2025-06-28 05:21:16 +02:00
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
This commit is contained in:
parent
bdc24efc87
commit
9b1f3cbc13
4 changed files with 32 additions and 4 deletions
|
@ -99,6 +99,12 @@ public:
|
|||
*/
|
||||
virtual nlohmann::json toJSON() = 0;
|
||||
|
||||
/**
|
||||
* Outputs all settings in a key-value pair format suitable to be used as
|
||||
* `nix.conf`
|
||||
*/
|
||||
virtual std::string toKeyValue() = 0;
|
||||
|
||||
/**
|
||||
* Converts settings to `Args` to be used on the command line interface
|
||||
* - args: args to write to
|
||||
|
@ -169,6 +175,8 @@ public:
|
|||
|
||||
nlohmann::json toJSON() override;
|
||||
|
||||
std::string toKeyValue() override;
|
||||
|
||||
void convertToArgs(Args & args, const std::string & category) override;
|
||||
};
|
||||
|
||||
|
@ -330,6 +338,8 @@ struct GlobalConfig : public AbstractConfig
|
|||
|
||||
nlohmann::json toJSON() override;
|
||||
|
||||
std::string toKeyValue() override;
|
||||
|
||||
void convertToArgs(Args & args, const std::string & category) override;
|
||||
|
||||
struct Register
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue