diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-05-05 18:59:33 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-05-05 18:59:33 +0200 |
commit | 6f3244ce4517cc51ef3ffd39025152aa7046ef69 (patch) | |
tree | 588f8deb7406821d2d1157c310e15adde4001a61 /src/nix/upgrade-nix.cc | |
parent | 941f95284ab57e9baa317791327cf1715d8564b5 (diff) | |
parent | 909b4a882057a92ae8b40b8afdab3c4ac30da915 (diff) |
Merge remote-tracking branch 'origin/master' into flakes
Diffstat (limited to 'src/nix/upgrade-nix.cc')
-rw-r--r-- | src/nix/upgrade-nix.cc | 28 |
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; |