4#include <llvm/Support/CommandLine.h>
6using namespace llvm::cl;
11#define NULL_DEVICE "/dev/null"
13opt<std::string> OptionWorkerStderr{
14 "option-worker-stderr", desc(
"Directory to write options worker stderr"),
17opt<std::string> NixpkgsWorkerStderr{
18 "nixpkgs-worker-stderr",
19 desc(
"Writable file path for nixpkgs worker stderr (debugging)"),
25 std::unique_ptr<AttrSetClientProc> &Worker) {
26 Worker = std::make_unique<AttrSetClientProc>([&Name]() {
27 freopen(Name.c_str(),
"w", stderr);
37 std::unique_ptr<AttrSetClientProc> &Worker) {
39 if (OptionWorkerStderr.getNumOccurrences())
40 NewName = OptionWorkerStderr.getValue() +
"/" + Name;
static const char * getExe()
llvm::cl::OptionCategory NixdCategory
void startAttrSetEval(const std::string &Name, std::unique_ptr< AttrSetClientProc > &Worker)
void startOption(const std::string &Name, std::unique_ptr< AttrSetClientProc > &Worker)
void startNixpkgs(std::unique_ptr< AttrSetClientProc > &NixpkgsEval)