aboutsummaryrefslogtreecommitdiff
path: root/src/nix/build.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-05-04 22:40:19 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-05-04 22:40:19 +0200
commita721a0b1140bf489d645f5d85737acafc1c57c65 (patch)
treef4b7df80fccc95b46fd3e8419375b563b466cfa4 /src/nix/build.cc
parente9f10beed1a30fe80b315a9de4c4c2ab11527db8 (diff)
Flag: Use designated initializers
Diffstat (limited to 'src/nix/build.cc')
-rw-r--r--src/nix/build.cc22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/nix/build.cc b/src/nix/build.cc
index 0b0762836..850e09ce8 100644
--- a/src/nix/build.cc
+++ b/src/nix/build.cc
@@ -11,17 +11,19 @@ struct CmdBuild : InstallablesCommand, MixDryRun, MixProfile
CmdBuild()
{
- mkFlag()
- .longName("out-link")
- .shortName('o')
- .description("path of the symlink to the build result")
- .labels({"path"})
- .dest(&outLink);
+ addFlag({
+ .longName = "out-link",
+ .shortName = 'o',
+ .description = "path of the symlink to the build result",
+ .labels = {"path"},
+ .handler = {&outLink},
+ });
- mkFlag()
- .longName("no-link")
- .description("do not create a symlink to the build result")
- .set(&outLink, Path(""));
+ addFlag({
+ .longName = "no-link",
+ .description = "do not create a symlink to the build result",
+ .handler = {&outLink, Path("")},
+ });
}
std::string description() override