mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 22:16:16 +02:00
Remove static variable name clashes
This was useful for an experiment with building Nix as a single compilation unit. It's not very useful otherwise but also doesn't hurt...
This commit is contained in:
parent
0419cd2695
commit
85c8be6286
63 changed files with 97 additions and 92 deletions
|
@ -44,7 +44,7 @@ static bool allSupportedLocally(Store & store, const std::set<std::string>& requ
|
|||
return true;
|
||||
}
|
||||
|
||||
static int _main(int argc, char * * argv)
|
||||
static int main_build_remote(int argc, char * * argv)
|
||||
{
|
||||
{
|
||||
logger = makeJSONLogger(*logger);
|
||||
|
@ -297,4 +297,4 @@ connected:
|
|||
}
|
||||
}
|
||||
|
||||
static RegisterLegacyCommand s1("build-remote", _main);
|
||||
static RegisterLegacyCommand r_build_remote("build-remote", main_build_remote);
|
||||
|
|
|
@ -2081,7 +2081,7 @@ Strings EvalSettings::getDefaultNixPath()
|
|||
|
||||
EvalSettings evalSettings;
|
||||
|
||||
static GlobalConfig::Register r1(&evalSettings);
|
||||
static GlobalConfig::Register rEvalSettings(&evalSettings);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ static void prim_unsafeDiscardStringContext(EvalState & state, const Pos & pos,
|
|||
mkString(v, s, PathSet());
|
||||
}
|
||||
|
||||
static RegisterPrimOp r1("__unsafeDiscardStringContext", 1, prim_unsafeDiscardStringContext);
|
||||
static RegisterPrimOp primop_unsafeDiscardStringContext("__unsafeDiscardStringContext", 1, prim_unsafeDiscardStringContext);
|
||||
|
||||
|
||||
static void prim_hasContext(EvalState & state, const Pos & pos, Value * * args, Value & v)
|
||||
|
@ -21,7 +21,7 @@ static void prim_hasContext(EvalState & state, const Pos & pos, Value * * args,
|
|||
mkBool(v, !context.empty());
|
||||
}
|
||||
|
||||
static RegisterPrimOp r2("__hasContext", 1, prim_hasContext);
|
||||
static RegisterPrimOp primop_hasContext("__hasContext", 1, prim_hasContext);
|
||||
|
||||
|
||||
/* Sometimes we want to pass a derivation path (i.e. pkg.drvPath) to a
|
||||
|
@ -42,7 +42,7 @@ static void prim_unsafeDiscardOutputDependency(EvalState & state, const Pos & po
|
|||
mkString(v, s, context2);
|
||||
}
|
||||
|
||||
static RegisterPrimOp r3("__unsafeDiscardOutputDependency", 1, prim_unsafeDiscardOutputDependency);
|
||||
static RegisterPrimOp primop_unsafeDiscardOutputDependency("__unsafeDiscardOutputDependency", 1, prim_unsafeDiscardOutputDependency);
|
||||
|
||||
|
||||
/* Extract the context of a string as a structured Nix value.
|
||||
|
@ -127,7 +127,7 @@ static void prim_getContext(EvalState & state, const Pos & pos, Value * * args,
|
|||
v.attrs->sort();
|
||||
}
|
||||
|
||||
static RegisterPrimOp r4("__getContext", 1, prim_getContext);
|
||||
static RegisterPrimOp primop_getContext("__getContext", 1, prim_getContext);
|
||||
|
||||
|
||||
/* Append the given context to a given string.
|
||||
|
@ -191,6 +191,6 @@ static void prim_appendContext(EvalState & state, const Pos & pos, Value * * arg
|
|||
mkString(v, orig, context);
|
||||
}
|
||||
|
||||
static RegisterPrimOp r5("__appendContext", 2, prim_appendContext);
|
||||
static RegisterPrimOp primop_appendContext("__appendContext", 2, prim_appendContext);
|
||||
|
||||
}
|
||||
|
|
|
@ -87,6 +87,6 @@ static void prim_fetchMercurial(EvalState & state, const Pos & pos, Value * * ar
|
|||
state.allowedPaths->insert(tree.actualPath);
|
||||
}
|
||||
|
||||
static RegisterPrimOp r("fetchMercurial", 1, prim_fetchMercurial);
|
||||
static RegisterPrimOp r_fetchMercurial("fetchMercurial", 1, prim_fetchMercurial);
|
||||
|
||||
}
|
||||
|
|
|
@ -152,7 +152,7 @@ static void prim_fetchTree(EvalState & state, const Pos & pos, Value * * args, V
|
|||
fetchTree(state, pos, args, v, std::nullopt);
|
||||
}
|
||||
|
||||
static RegisterPrimOp r("fetchTree", 1, prim_fetchTree);
|
||||
static RegisterPrimOp primop_fetchTree("fetchTree", 1, prim_fetchTree);
|
||||
|
||||
static void fetch(EvalState & state, const Pos & pos, Value * * args, Value & v,
|
||||
const string & who, bool unpack, std::string name)
|
||||
|
|
|
@ -88,6 +88,6 @@ static void prim_fromTOML(EvalState & state, const Pos & pos, Value * * args, Va
|
|||
}
|
||||
}
|
||||
|
||||
static RegisterPrimOp r("fromTOML", 1, prim_fromTOML);
|
||||
static RegisterPrimOp primop_fromTOML("fromTOML", 1, prim_fromTOML);
|
||||
|
||||
}
|
||||
|
|
|
@ -452,6 +452,6 @@ struct GitInputScheme : InputScheme
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = OnStartup([] { registerInputScheme(std::make_unique<GitInputScheme>()); });
|
||||
static auto rGitInputScheme = OnStartup([] { registerInputScheme(std::make_unique<GitInputScheme>()); });
|
||||
|
||||
}
|
||||
|
|
|
@ -334,7 +334,7 @@ struct GitLabInputScheme : GitArchiveInputScheme
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = OnStartup([] { registerInputScheme(std::make_unique<GitHubInputScheme>()); });
|
||||
static auto r2 = OnStartup([] { registerInputScheme(std::make_unique<GitLabInputScheme>()); });
|
||||
static auto rGitHubInputScheme = OnStartup([] { registerInputScheme(std::make_unique<GitHubInputScheme>()); });
|
||||
static auto rGitLabInputScheme = OnStartup([] { registerInputScheme(std::make_unique<GitLabInputScheme>()); });
|
||||
|
||||
}
|
||||
|
|
|
@ -100,6 +100,6 @@ struct IndirectInputScheme : InputScheme
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = OnStartup([] { registerInputScheme(std::make_unique<IndirectInputScheme>()); });
|
||||
static auto rIndirectInputScheme = OnStartup([] { registerInputScheme(std::make_unique<IndirectInputScheme>()); });
|
||||
|
||||
}
|
||||
|
|
|
@ -293,6 +293,6 @@ struct MercurialInputScheme : InputScheme
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = OnStartup([] { registerInputScheme(std::make_unique<MercurialInputScheme>()); });
|
||||
static auto rMercurialInputScheme = OnStartup([] { registerInputScheme(std::make_unique<MercurialInputScheme>()); });
|
||||
|
||||
}
|
||||
|
|
|
@ -102,6 +102,6 @@ struct PathInputScheme : InputScheme
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = OnStartup([] { registerInputScheme(std::make_unique<PathInputScheme>()); });
|
||||
static auto rPathInputScheme = OnStartup([] { registerInputScheme(std::make_unique<PathInputScheme>()); });
|
||||
|
||||
}
|
||||
|
|
|
@ -231,6 +231,6 @@ struct TarballInputScheme : InputScheme
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = OnStartup([] { registerInputScheme(std::make_unique<TarballInputScheme>()); });
|
||||
static auto rTarballInputScheme = OnStartup([] { registerInputScheme(std::make_unique<TarballInputScheme>()); });
|
||||
|
||||
}
|
||||
|
|
|
@ -63,6 +63,6 @@ struct DummyStore : public Store, public virtual DummyStoreConfig
|
|||
{ unsupported("buildDerivation"); }
|
||||
};
|
||||
|
||||
static RegisterStoreImplementation<DummyStore, DummyStoreConfig> regStore;
|
||||
static RegisterStoreImplementation<DummyStore, DummyStoreConfig> regDummyStore;
|
||||
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace nix {
|
|||
|
||||
FileTransferSettings fileTransferSettings;
|
||||
|
||||
static GlobalConfig::Register r1(&fileTransferSettings);
|
||||
static GlobalConfig::Register rFileTransferSettings(&fileTransferSettings);
|
||||
|
||||
std::string resolveUri(const std::string & uri)
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace nix {
|
|||
|
||||
Settings settings;
|
||||
|
||||
static GlobalConfig::Register r1(&settings);
|
||||
static GlobalConfig::Register rSettings(&settings);
|
||||
|
||||
Settings::Settings()
|
||||
: nixPrefix(NIX_PREFIX)
|
||||
|
|
|
@ -181,6 +181,6 @@ protected:
|
|||
|
||||
};
|
||||
|
||||
static RegisterStoreImplementation<HttpBinaryCacheStore, HttpBinaryCacheStoreConfig> regStore;
|
||||
static RegisterStoreImplementation<HttpBinaryCacheStore, HttpBinaryCacheStoreConfig> regHttpBinaryCacheStore;
|
||||
|
||||
}
|
||||
|
|
|
@ -335,6 +335,6 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
static RegisterStoreImplementation<LegacySSHStore, LegacySSHStoreConfig> regStore;
|
||||
static RegisterStoreImplementation<LegacySSHStore, LegacySSHStoreConfig> regLegacySSHStore;
|
||||
|
||||
}
|
||||
|
|
|
@ -105,6 +105,6 @@ std::set<std::string> LocalBinaryCacheStore::uriSchemes()
|
|||
return {"file"};
|
||||
}
|
||||
|
||||
static RegisterStoreImplementation<LocalBinaryCacheStore, LocalBinaryCacheStoreConfig> regStore;
|
||||
static RegisterStoreImplementation<LocalBinaryCacheStore, LocalBinaryCacheStoreConfig> regLocalBinaryCacheStore;
|
||||
|
||||
}
|
||||
|
|
|
@ -1008,6 +1008,6 @@ void ConnectionHandle::withFramedSink(std::function<void(Sink &sink)> fun)
|
|||
|
||||
}
|
||||
|
||||
static RegisterStoreImplementation<UDSRemoteStore, UDSRemoteStoreConfig> regStore;
|
||||
static RegisterStoreImplementation<UDSRemoteStore, UDSRemoteStoreConfig> regUDSRemoteStore;
|
||||
|
||||
}
|
||||
|
|
|
@ -439,7 +439,7 @@ struct S3BinaryCacheStoreImpl : public S3BinaryCacheStore, virtual S3BinaryCache
|
|||
|
||||
};
|
||||
|
||||
static RegisterStoreImplementation<S3BinaryCacheStoreImpl, S3BinaryCacheStoreConfig> regStore;
|
||||
static RegisterStoreImplementation<S3BinaryCacheStoreImpl, S3BinaryCacheStoreConfig> regS3BinaryCacheStore;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -83,6 +83,6 @@ ref<RemoteStore::Connection> SSHStore::openConnection()
|
|||
return conn;
|
||||
}
|
||||
|
||||
static RegisterStoreImplementation<SSHStore, SSHStoreConfig> regStore;
|
||||
static RegisterStoreImplementation<SSHStore, SSHStoreConfig> regSSHStore;
|
||||
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ struct ArchiveSettings : Config
|
|||
|
||||
static ArchiveSettings archiveSettings;
|
||||
|
||||
static GlobalConfig::Register r1(&archiveSettings);
|
||||
static GlobalConfig::Register rArchiveSettings(&archiveSettings);
|
||||
|
||||
const std::string narVersionMagic1 = "nix-archive-1";
|
||||
|
||||
|
|
|
@ -277,7 +277,7 @@ Args::Flag Args::Flag::mkHashTypeOptFlag(std::string && longName, std::optional<
|
|||
};
|
||||
}
|
||||
|
||||
static void completePath(std::string_view prefix, bool onlyDirs)
|
||||
static void _completePath(std::string_view prefix, bool onlyDirs)
|
||||
{
|
||||
pathCompletions = true;
|
||||
glob_t globbuf;
|
||||
|
@ -300,12 +300,12 @@ static void completePath(std::string_view prefix, bool onlyDirs)
|
|||
|
||||
void completePath(size_t, std::string_view prefix)
|
||||
{
|
||||
completePath(prefix, false);
|
||||
_completePath(prefix, false);
|
||||
}
|
||||
|
||||
void completeDir(size_t, std::string_view prefix)
|
||||
{
|
||||
completePath(prefix, true);
|
||||
_completePath(prefix, true);
|
||||
}
|
||||
|
||||
Strings argvToStrings(int argc, char * * argv)
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace nix {
|
|||
|
||||
LoggerSettings loggerSettings;
|
||||
|
||||
static GlobalConfig::Register r1(&loggerSettings);
|
||||
static GlobalConfig::Register rLoggerSettings(&loggerSettings);
|
||||
|
||||
static thread_local ActivityId curActivity = 0;
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ std::vector<string> shellwords(const string & s)
|
|||
return res;
|
||||
}
|
||||
|
||||
static void _main(int argc, char * * argv)
|
||||
static void main_nix_build(int argc, char * * argv)
|
||||
{
|
||||
auto dryRun = false;
|
||||
auto runEnv = std::regex_search(argv[0], std::regex("nix-shell$"));
|
||||
|
@ -540,5 +540,5 @@ static void _main(int argc, char * * argv)
|
|||
}
|
||||
}
|
||||
|
||||
static RegisterLegacyCommand s1("nix-build", _main);
|
||||
static RegisterLegacyCommand s2("nix-shell", _main);
|
||||
static RegisterLegacyCommand r_nix_build("nix-build", main_nix_build);
|
||||
static RegisterLegacyCommand r_nix_shell("nix-shell", main_nix_build);
|
||||
|
|
|
@ -153,7 +153,7 @@ static void update(const StringSet & channelNames)
|
|||
replaceSymlink(profile, channelLink);
|
||||
}
|
||||
|
||||
static int _main(int argc, char ** argv)
|
||||
static int main_nix_channel(int argc, char ** argv)
|
||||
{
|
||||
{
|
||||
// Figure out the name of the `.nix-channels' file to use
|
||||
|
@ -250,4 +250,4 @@ static int _main(int argc, char ** argv)
|
|||
}
|
||||
}
|
||||
|
||||
static RegisterLegacyCommand s1("nix-channel", _main);
|
||||
static RegisterLegacyCommand r_nix_channel("nix-channel", main_nix_channel);
|
||||
|
|
|
@ -49,7 +49,7 @@ void removeOldGenerations(std::string dir)
|
|||
}
|
||||
}
|
||||
|
||||
static int _main(int argc, char * * argv)
|
||||
static int main_nix_collect_garbage(int argc, char * * argv)
|
||||
{
|
||||
{
|
||||
bool removeOld = false;
|
||||
|
@ -92,4 +92,4 @@ static int _main(int argc, char * * argv)
|
|||
}
|
||||
}
|
||||
|
||||
static RegisterLegacyCommand s1("nix-collect-garbage", _main);
|
||||
static RegisterLegacyCommand r_nix_collect_garbage("nix-collect-garbage", main_nix_collect_garbage);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
using namespace nix;
|
||||
|
||||
static int _main(int argc, char ** argv)
|
||||
static int main_nix_copy_closure(int argc, char ** argv)
|
||||
{
|
||||
{
|
||||
auto gzip = false;
|
||||
|
@ -65,4 +65,4 @@ static int _main(int argc, char ** argv)
|
|||
}
|
||||
}
|
||||
|
||||
static RegisterLegacyCommand s1("nix-copy-closure", _main);
|
||||
static RegisterLegacyCommand r_nix_copy_closure("nix-copy-closure", main_nix_copy_closure);
|
||||
|
|
|
@ -265,7 +265,7 @@ static void daemonLoop(char * * argv)
|
|||
}
|
||||
|
||||
|
||||
static int _main(int argc, char * * argv)
|
||||
static int main_nix_daemon(int argc, char * * argv)
|
||||
{
|
||||
{
|
||||
auto stdio = false;
|
||||
|
@ -330,4 +330,4 @@ static int _main(int argc, char * * argv)
|
|||
}
|
||||
}
|
||||
|
||||
static RegisterLegacyCommand s1("nix-daemon", _main);
|
||||
static RegisterLegacyCommand r_nix_daemon("nix-daemon", main_nix_daemon);
|
||||
|
|
|
@ -1330,7 +1330,7 @@ static void opVersion(Globals & globals, Strings opFlags, Strings opArgs)
|
|||
}
|
||||
|
||||
|
||||
static int _main(int argc, char * * argv)
|
||||
static int main_nix_env(int argc, char * * argv)
|
||||
{
|
||||
{
|
||||
Strings opFlags, opArgs;
|
||||
|
@ -1460,4 +1460,4 @@ static int _main(int argc, char * * argv)
|
|||
}
|
||||
}
|
||||
|
||||
static RegisterLegacyCommand s1("nix-env", _main);
|
||||
static RegisterLegacyCommand r_nix_env("nix-env", main_nix_env);
|
||||
|
|
|
@ -83,7 +83,7 @@ void processExpr(EvalState & state, const Strings & attrPaths,
|
|||
}
|
||||
|
||||
|
||||
static int _main(int argc, char * * argv)
|
||||
static int main_nix_instantiate(int argc, char * * argv)
|
||||
{
|
||||
{
|
||||
Strings files;
|
||||
|
@ -192,4 +192,4 @@ static int _main(int argc, char * * argv)
|
|||
}
|
||||
}
|
||||
|
||||
static RegisterLegacyCommand s1("nix-instantiate", _main);
|
||||
static RegisterLegacyCommand r_nix_instantiate("nix-instantiate", main_nix_instantiate);
|
||||
|
|
|
@ -48,7 +48,7 @@ string resolveMirrorUri(EvalState & state, string uri)
|
|||
}
|
||||
|
||||
|
||||
static int _main(int argc, char * * argv)
|
||||
static int main_nix_prefetch_url(int argc, char * * argv)
|
||||
{
|
||||
{
|
||||
HashType ht = htSHA256;
|
||||
|
@ -229,4 +229,4 @@ static int _main(int argc, char * * argv)
|
|||
}
|
||||
}
|
||||
|
||||
static RegisterLegacyCommand s1("nix-prefetch-url", _main);
|
||||
static RegisterLegacyCommand r_nix_prefetch_url("nix-prefetch-url", main_nix_prefetch_url);
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
#endif
|
||||
|
||||
|
||||
namespace nix_store {
|
||||
|
||||
|
||||
using namespace nix;
|
||||
using std::cin;
|
||||
using std::cout;
|
||||
|
@ -1025,7 +1028,7 @@ static void opVersion(Strings opFlags, Strings opArgs)
|
|||
/* Scan the arguments; find the operation, set global flags, put all
|
||||
other flags in a list, and put all other arguments in another
|
||||
list. */
|
||||
static int _main(int argc, char * * argv)
|
||||
static int main_nix_store(int argc, char * * argv)
|
||||
{
|
||||
{
|
||||
Strings opFlags, opArgs;
|
||||
|
@ -1121,4 +1124,6 @@ static int _main(int argc, char * * argv)
|
|||
}
|
||||
}
|
||||
|
||||
static RegisterLegacyCommand s1("nix-store", _main);
|
||||
static RegisterLegacyCommand r_nix_store("nix-store", main_nix_store);
|
||||
|
||||
}
|
||||
|
|
|
@ -87,4 +87,4 @@ struct CmdAddToStore : MixDryRun, StoreCommand
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdAddToStore>("add-to-store");
|
||||
static auto rCmdAddToStore = registerCommand<CmdAddToStore>("add-to-store");
|
||||
|
|
|
@ -88,4 +88,4 @@ struct CmdBuild : InstallablesCommand, MixDryRun, MixProfile
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdBuild>("build");
|
||||
static auto rCmdBuild = registerCommand<CmdBuild>("build");
|
||||
|
|
|
@ -72,5 +72,5 @@ struct CmdCatNar : StoreCommand, MixCat
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdCatStore>("cat-store");
|
||||
static auto r2 = registerCommand<CmdCatNar>("cat-nar");
|
||||
static auto rCmdCatStore = registerCommand<CmdCatStore>("cat-store");
|
||||
static auto rCmdCatNar = registerCommand<CmdCatNar>("cat-nar");
|
||||
|
|
|
@ -106,4 +106,4 @@ struct CmdCopy : StorePathsCommand
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdCopy>("copy");
|
||||
static auto rCmdCopy = registerCommand<CmdCopy>("copy");
|
||||
|
|
|
@ -41,4 +41,4 @@ struct CmdDescribeStores : Command, MixJSON
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdDescribeStores>("describe-stores");
|
||||
static auto rDescribeStore = registerCommand<CmdDescribeStores>("describe-stores");
|
||||
|
|
|
@ -443,5 +443,5 @@ struct CmdPrintDevEnv : Common
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdPrintDevEnv>("print-dev-env");
|
||||
static auto r2 = registerCommand<CmdDevelop>("develop");
|
||||
static auto rCmdPrintDevEnv = registerCommand<CmdPrintDevEnv>("print-dev-env");
|
||||
static auto rCmdDevelop = registerCommand<CmdDevelop>("develop");
|
||||
|
|
|
@ -143,4 +143,4 @@ struct CmdDiffClosures : SourceExprCommand
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdDiffClosures>("diff-closures");
|
||||
static auto rCmdDiffClosures = registerCommand<CmdDiffClosures>("diff-closures");
|
||||
|
|
|
@ -131,4 +131,4 @@ struct CmdDoctor : StoreCommand
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdDoctor>("doctor");
|
||||
static auto rCmdDoctor = registerCommand<CmdDoctor>("doctor");
|
||||
|
|
|
@ -30,4 +30,4 @@ struct CmdDumpPath : StorePathCommand
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdDumpPath>("dump-path");
|
||||
static auto rDumpPath = registerCommand<CmdDumpPath>("dump-path");
|
||||
|
|
|
@ -54,4 +54,4 @@ struct CmdEdit : InstallableCommand
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdEdit>("edit");
|
||||
static auto rCmdEdit = registerCommand<CmdEdit>("edit");
|
||||
|
|
|
@ -90,4 +90,4 @@ struct CmdEval : MixJSON, InstallableCommand
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdEval>("eval");
|
||||
static auto rCmdEval = registerCommand<CmdEval>("eval");
|
||||
|
|
|
@ -965,4 +965,4 @@ struct CmdFlake : NixMultiCommand
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdFlake>("flake");
|
||||
static auto rCmdFlake = registerCommand<CmdFlake>("flake");
|
||||
|
|
|
@ -79,8 +79,8 @@ struct CmdHash : Command
|
|||
}
|
||||
};
|
||||
|
||||
static RegisterCommand r1("hash-file", [](){ return make_ref<CmdHash>(FileIngestionMethod::Flat); });
|
||||
static RegisterCommand r2("hash-path", [](){ return make_ref<CmdHash>(FileIngestionMethod::Recursive); });
|
||||
static RegisterCommand rCmdHashFile("hash-file", [](){ return make_ref<CmdHash>(FileIngestionMethod::Flat); });
|
||||
static RegisterCommand rCmdHashPath("hash-path", [](){ return make_ref<CmdHash>(FileIngestionMethod::Recursive); });
|
||||
|
||||
struct CmdToBase : Command
|
||||
{
|
||||
|
@ -112,10 +112,10 @@ struct CmdToBase : Command
|
|||
}
|
||||
};
|
||||
|
||||
static RegisterCommand r3("to-base16", [](){ return make_ref<CmdToBase>(Base16); });
|
||||
static RegisterCommand r4("to-base32", [](){ return make_ref<CmdToBase>(Base32); });
|
||||
static RegisterCommand r5("to-base64", [](){ return make_ref<CmdToBase>(Base64); });
|
||||
static RegisterCommand r6("to-sri", [](){ return make_ref<CmdToBase>(SRI); });
|
||||
static RegisterCommand rCmdToBase16("to-base16", [](){ return make_ref<CmdToBase>(Base16); });
|
||||
static RegisterCommand rCmdToBase32("to-base32", [](){ return make_ref<CmdToBase>(Base32); });
|
||||
static RegisterCommand rCmdToBase64("to-base64", [](){ return make_ref<CmdToBase>(Base64); });
|
||||
static RegisterCommand rCmdToSRI("to-sri", [](){ return make_ref<CmdToBase>(SRI); });
|
||||
|
||||
/* Legacy nix-hash command. */
|
||||
static int compatNixHash(int argc, char * * argv)
|
||||
|
@ -167,4 +167,4 @@ static int compatNixHash(int argc, char * * argv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static RegisterLegacyCommand s1("nix-hash", compatNixHash);
|
||||
static RegisterLegacyCommand r_nix_hash("nix-hash", compatNixHash);
|
||||
|
|
|
@ -64,4 +64,4 @@ struct CmdLog : InstallableCommand
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdLog>("log");
|
||||
static auto rCmdLog = registerCommand<CmdLog>("log");
|
||||
|
|
|
@ -152,5 +152,5 @@ struct CmdLsNar : Command, MixLs
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdLsStore>("ls-store");
|
||||
static auto r2 = registerCommand<CmdLsNar>("ls-nar");
|
||||
static auto rCmdLsStore = registerCommand<CmdLsStore>("ls-store");
|
||||
static auto rCmdLsNar = registerCommand<CmdLsNar>("ls-nar");
|
||||
|
|
|
@ -108,4 +108,4 @@ struct CmdMakeContentAddressable : StorePathsCommand, MixJSON
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdMakeContentAddressable>("make-content-addressable");
|
||||
static auto rCmdMakeContentAddressable = registerCommand<CmdMakeContentAddressable>("make-content-addressable");
|
||||
|
|
|
@ -31,4 +31,4 @@ struct CmdOptimiseStore : StoreCommand
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdOptimiseStore>("optimise-store");
|
||||
static auto rCmdOptimiseStore = registerCommand<CmdOptimiseStore>("optimise-store");
|
||||
|
|
|
@ -127,4 +127,4 @@ struct CmdPathInfo : StorePathsCommand, MixJSON
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdPathInfo>("path-info");
|
||||
static auto rCmdPathInfo = registerCommand<CmdPathInfo>("path-info");
|
||||
|
|
|
@ -29,4 +29,4 @@ struct CmdPingStore : StoreCommand
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdPingStore>("ping-store");
|
||||
static auto rCmdPingStore = registerCommand<CmdPingStore>("ping-store");
|
||||
|
|
|
@ -467,4 +467,4 @@ struct CmdProfile : NixMultiCommand
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdProfile>("profile");
|
||||
static auto rCmdProfile = registerCommand<CmdProfile>("profile");
|
||||
|
|
|
@ -143,4 +143,4 @@ struct CmdRegistry : virtual NixMultiCommand
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdRegistry>("registry");
|
||||
static auto rCmdRegistry = registerCommand<CmdRegistry>("registry");
|
||||
|
|
|
@ -825,6 +825,6 @@ struct CmdRepl : StoreCommand, MixEvalArgs
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdRepl>("repl");
|
||||
static auto rCmdRepl = registerCommand<CmdRepl>("repl");
|
||||
|
||||
}
|
||||
|
|
|
@ -140,7 +140,7 @@ struct CmdShell : InstallablesCommand, RunCommon, MixEnvironment
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdShell>("shell");
|
||||
static auto rCmdShell = registerCommand<CmdShell>("shell");
|
||||
|
||||
struct CmdRun : InstallableCommand, RunCommon
|
||||
{
|
||||
|
@ -209,7 +209,7 @@ struct CmdRun : InstallableCommand, RunCommon
|
|||
}
|
||||
};
|
||||
|
||||
static auto r2 = registerCommand<CmdRun>("run");
|
||||
static auto rCmdRun = registerCommand<CmdRun>("run");
|
||||
|
||||
void chrootHelper(int argc, char * * argv)
|
||||
{
|
||||
|
|
|
@ -185,4 +185,4 @@ struct CmdSearch : InstallableCommand, MixJSON
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdSearch>("search");
|
||||
static auto rCmdSearch = registerCommand<CmdSearch>("search");
|
||||
|
|
|
@ -30,4 +30,4 @@ struct CmdShowConfig : Command, MixJSON
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdShowConfig>("show-config");
|
||||
static auto rShowConfig = registerCommand<CmdShowConfig>("show-config");
|
||||
|
|
|
@ -123,4 +123,4 @@ struct CmdShowDerivation : InstallablesCommand
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdShowDerivation>("show-derivation");
|
||||
static auto rCmdShowDerivation = registerCommand<CmdShowDerivation>("show-derivation");
|
||||
|
|
|
@ -92,7 +92,7 @@ struct CmdCopySigs : StorePathsCommand
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdCopySigs>("copy-sigs");
|
||||
static auto rCmdCopySigs = registerCommand<CmdCopySigs>("copy-sigs");
|
||||
|
||||
struct CmdSignPaths : StorePathsCommand
|
||||
{
|
||||
|
@ -144,4 +144,4 @@ struct CmdSignPaths : StorePathsCommand
|
|||
}
|
||||
};
|
||||
|
||||
static auto r2 = registerCommand<CmdSignPaths>("sign-paths");
|
||||
static auto rCmdSignPaths = registerCommand<CmdSignPaths>("sign-paths");
|
||||
|
|
|
@ -158,4 +158,4 @@ struct CmdUpgradeNix : MixDryRun, StoreCommand
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdUpgradeNix>("upgrade-nix");
|
||||
static auto rCmdUpgradeNix = registerCommand<CmdUpgradeNix>("upgrade-nix");
|
||||
|
|
|
@ -189,4 +189,4 @@ struct CmdVerify : StorePathsCommand
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdVerify>("verify");
|
||||
static auto rCmdVerify = registerCommand<CmdVerify>("verify");
|
||||
|
|
|
@ -263,4 +263,4 @@ struct CmdWhyDepends : SourceExprCommand
|
|||
}
|
||||
};
|
||||
|
||||
static auto r1 = registerCommand<CmdWhyDepends>("why-depends");
|
||||
static auto rCmdWhyDepends = registerCommand<CmdWhyDepends>("why-depends");
|
||||
|
|
Loading…
Reference in a new issue