diff options
author | jade <lix@jade.fyi> | 2024-10-09 20:37:58 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@localhost> | 2024-10-09 20:37:58 +0000 |
commit | 9865ebaaa618d82a7b7fdccc636cbaa7dfa42427 (patch) | |
tree | b79db30394a892e7e6b7e0a2f966081b4a366590 /src/nix/daemon.cc | |
parent | 7f7a38f2788ba7fa46cf38127f525700cf63e153 (diff) | |
parent | b63d4a0c622fa556695e7666b9b3bde920904920 (diff) |
Merge "Remove static initializers for `RegisterLegacyCommand`" into main
Diffstat (limited to 'src/nix/daemon.cc')
-rw-r--r-- | src/nix/daemon.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/nix/daemon.cc b/src/nix/daemon.cc index ca65c38e6..e1d183d7b 100644 --- a/src/nix/daemon.cc +++ b/src/nix/daemon.cc @@ -14,6 +14,7 @@ #include "signals.hh" #include "daemon.hh" #include "unix-domain-socket.hh" +#include "daemon-command.hh" #include <algorithm> #include <climits> @@ -36,7 +37,8 @@ #include <sys/ucred.h> #endif -using namespace nix; +namespace nix { + using namespace nix::daemon; /** @@ -496,7 +498,9 @@ static int main_nix_daemon(int argc, char * * argv) } } -static RegisterLegacyCommand r_nix_daemon("nix-daemon", main_nix_daemon); +void registerNixDaemon() { + LegacyCommands::add("nix-daemon", main_nix_daemon); +} struct CmdDaemon : StoreCommand { @@ -560,3 +564,5 @@ struct CmdDaemon : StoreCommand }; static auto rCmdDaemon = registerCommand2<CmdDaemon>({"daemon"}); + +} |