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/hash.cc | |
parent | 7f7a38f2788ba7fa46cf38127f525700cf63e153 (diff) | |
parent | b63d4a0c622fa556695e7666b9b3bde920904920 (diff) |
Merge "Remove static initializers for `RegisterLegacyCommand`" into main
Diffstat (limited to 'src/nix/hash.cc')
-rw-r--r-- | src/nix/hash.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nix/hash.cc b/src/nix/hash.cc index f6add527a..40b00c978 100644 --- a/src/nix/hash.cc +++ b/src/nix/hash.cc @@ -5,8 +5,9 @@ #include "shared.hh" #include "references.hh" #include "archive.hh" +#include "hash-command.hh" -using namespace nix; +namespace nix { struct CmdHashBase : Command { @@ -221,4 +222,8 @@ static int compatNixHash(int argc, char * * argv) return 0; } -static RegisterLegacyCommand r_nix_hash("nix-hash", compatNixHash); +void registerNixHash() { + LegacyCommands::add("nix-hash", compatNixHash); +} + +} |