2023-12-10 13:22:32 +00:00
|
|
|
#pragma once
|
|
|
|
|
2024-05-16 23:47:20 +00:00
|
|
|
#include <lix/libexpr/flake/flake.hh>
|
|
|
|
#include <lix/libutil/args/root.hh>
|
|
|
|
#include <lix/libcmd/common-eval-args.hh>
|
2023-12-11 21:05:02 +00:00
|
|
|
#include <stddef.h>
|
2024-05-16 23:47:20 +00:00
|
|
|
#include <lix/libmain/common-args.hh>
|
|
|
|
#include <lix/libexpr/flake/flakeref.hh>
|
|
|
|
#include <lix/libutil/types.hh>
|
2023-12-11 21:05:02 +00:00
|
|
|
#include <string>
|
|
|
|
#include <optional>
|
2023-12-10 13:22:32 +00:00
|
|
|
|
|
|
|
class MyArgs : virtual public nix::MixEvalArgs,
|
|
|
|
virtual public nix::MixCommonArgs,
|
2024-05-28 00:23:13 +00:00
|
|
|
virtual public nix::RootArgs {
|
2023-12-10 13:22:32 +00:00
|
|
|
public:
|
|
|
|
std::string releaseExpr;
|
|
|
|
nix::Path gcRootsDir;
|
|
|
|
bool flake = false;
|
|
|
|
bool fromArgs = false;
|
|
|
|
bool meta = false;
|
|
|
|
bool showTrace = false;
|
|
|
|
bool impure = false;
|
|
|
|
bool forceRecurse = false;
|
|
|
|
bool checkCacheStatus = false;
|
|
|
|
size_t nrWorkers = 1;
|
|
|
|
size_t maxMemorySize = 4096;
|
|
|
|
|
|
|
|
// usually in MixFlakeOptions
|
|
|
|
nix::flake::LockFlags lockFlags = {.updateLockFile = false,
|
|
|
|
.writeLockFile = false,
|
|
|
|
.useRegistries = false,
|
|
|
|
.allowUnlocked = false};
|
|
|
|
MyArgs();
|
2023-12-10 19:20:17 +00:00
|
|
|
MyArgs(const MyArgs&) = delete;
|
2023-12-10 13:22:32 +00:00
|
|
|
|
|
|
|
void parseArgs(char** argv, int argc);
|
|
|
|
};
|