aboutsummaryrefslogtreecommitdiff
path: root/src/nix/upgrade-nix.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-05-05 18:59:33 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-05-05 18:59:33 +0200
commit6f3244ce4517cc51ef3ffd39025152aa7046ef69 (patch)
tree588f8deb7406821d2d1157c310e15adde4001a61 /src/nix/upgrade-nix.cc
parent941f95284ab57e9baa317791327cf1715d8564b5 (diff)
parent909b4a882057a92ae8b40b8afdab3c4ac30da915 (diff)
Merge remote-tracking branch 'origin/master' into flakes
Diffstat (limited to 'src/nix/upgrade-nix.cc')
-rw-r--r--src/nix/upgrade-nix.cc28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/nix/upgrade-nix.cc b/src/nix/upgrade-nix.cc
index 4fcc6a721..678780f33 100644
--- a/src/nix/upgrade-nix.cc
+++ b/src/nix/upgrade-nix.cc
@@ -16,18 +16,20 @@ struct CmdUpgradeNix : MixDryRun, StoreCommand
CmdUpgradeNix()
{
- mkFlag()
- .longName("profile")
- .shortName('p')
- .labels({"profile-dir"})
- .description("the Nix profile to upgrade")
- .dest(&profileDir);
-
- mkFlag()
- .longName("nix-store-paths-url")
- .labels({"url"})
- .description("URL of the file that contains the store paths of the latest Nix release")
- .dest(&storePathsUrl);
+ addFlag({
+ .longName = "profile",
+ .shortName = 'p',
+ .description = "the Nix profile to upgrade",
+ .labels = {"profile-dir"},
+ .handler = {&profileDir}
+ });
+
+ addFlag({
+ .longName = "nix-store-paths-url",
+ .description = "URL of the file that contains the store paths of the latest Nix release",
+ .labels = {"url"},
+ .handler = {&storePathsUrl}
+ });
}
std::string description() override
@@ -49,6 +51,8 @@ struct CmdUpgradeNix : MixDryRun, StoreCommand
};
}
+ Category category() override { return catNixInstallation; }
+
void run(ref<Store> store) override
{
evalSettings.pureEval = true;