aboutsummaryrefslogtreecommitdiff
path: root/src/libmain
diff options
context:
space:
mode:
Diffstat (limited to 'src/libmain')
-rw-r--r--src/libmain/common-args.hh18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/libmain/common-args.hh b/src/libmain/common-args.hh
index e7ed0d934..c35406c3b 100644
--- a/src/libmain/common-args.hh
+++ b/src/libmain/common-args.hh
@@ -2,6 +2,7 @@
///@file
#include "args.hh"
+#include "repair-flag.hh"
namespace nix {
@@ -49,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},
+ });
+ }
+};
+
}