aboutsummaryrefslogtreecommitdiff
path: root/src/libmain/common-args.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libmain/common-args.hh')
-rw-r--r--src/libmain/common-args.hh19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/libmain/common-args.hh b/src/libmain/common-args.hh
index f180d83ce..c35406c3b 100644
--- a/src/libmain/common-args.hh
+++ b/src/libmain/common-args.hh
@@ -1,6 +1,8 @@
#pragma once
+///@file
#include "args.hh"
+#include "repair-flag.hh"
namespace nix {
@@ -48,4 +50,21 @@ struct MixJSON : virtual Args
}
};
+struct MixRepair : virtual Args
+{
+ RepairFlag repair = NoRepair;
+
+ MixRepair()
+ {
+ addFlag({
+ .longName = "repair",
+ .description =
+ "During evaluation, rewrite missing or corrupted files in the Nix store. "
+ "During building, rebuild missing or corrupted store paths.",
+ .category = miscCategory,
+ .handler = {&repair, Repair},
+ });
+ }
+};
+
}