mirror of
https://github.com/NixOS/nix.git
synced 2025-11-11 04:56:01 +01:00
external-derivation-builder: args must always be specified
I don't want to figure out how to make nlohmann treat std::optional<> the same way Rust's serde_json treats Option<> (i.e. skip it if it's not there).
This commit is contained in:
parent
b64a310eb2
commit
1521a819b7
2 changed files with 3 additions and 3 deletions
|
|
@ -1241,7 +1241,7 @@ public:
|
||||||
{
|
{
|
||||||
std::vector<std::string> systems;
|
std::vector<std::string> systems;
|
||||||
Path program;
|
Path program;
|
||||||
std::optional<std::vector<std::string>> args;
|
std::vector<std::string> args;
|
||||||
};
|
};
|
||||||
|
|
||||||
using ExternalBuilders = std::vector<ExternalBuilder>;
|
using ExternalBuilders = std::vector<ExternalBuilder>;
|
||||||
|
|
|
||||||
|
|
@ -94,8 +94,8 @@ struct ExternalDerivationBuilder : DerivationBuilderImpl
|
||||||
|
|
||||||
Strings args = {externalBuilder.program};
|
Strings args = {externalBuilder.program};
|
||||||
|
|
||||||
if (externalBuilder.args) {
|
if (!externalBuilder.args.empty()) {
|
||||||
args.insert(args.end(), externalBuilder.args->begin(), externalBuilder.args->end());
|
args.insert(args.end(), externalBuilder.args.begin(), externalBuilder.args.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
args.insert(args.end(), jsonFile);
|
args.insert(args.end(), jsonFile);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue