aboutsummaryrefslogtreecommitdiff
path: root/src/nix/doctor.cc
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2018-08-30 00:59:29 +0200
committerDaiderd Jordan <daiderd@gmail.com>2018-09-02 12:54:20 +0200
commitc9a08540c3d64d1285928d1ce3d3d416a2547dd9 (patch)
treeda05fd3fd68c9977d33d1e5a99ca9c07fcb3e565 /src/nix/doctor.cc
parent475a0a54a9c28c311f0c05d129bb165e7c215efb (diff)
nix doctor: add command
Inspired by the homebrew command, shows a combination of debugging information and warnings with potential issues with a nix installation.
Diffstat (limited to 'src/nix/doctor.cc')
-rw-r--r--src/nix/doctor.cc26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/nix/doctor.cc b/src/nix/doctor.cc
new file mode 100644
index 000000000..fb4fc2a6e
--- /dev/null
+++ b/src/nix/doctor.cc
@@ -0,0 +1,26 @@
+#include "command.hh"
+#include "shared.hh"
+#include "store-api.hh"
+
+using namespace nix;
+
+struct CmdDoctor : StoreCommand
+{
+ std::string name() override
+ {
+ return "doctor";
+ }
+
+ std::string description() override
+ {
+ return "check your system for potential problems";
+ }
+
+ void run(ref<Store> store) override
+ {
+ std::cout << "Store uri: " << store->getUri() << std::endl;
+ }
+};
+
+static RegisterCommand r1(make_ref<CmdDoctor>());
+