fix format
This commit is contained in:
parent
a03f039a56
commit
3be8c48f54
11
src/drv.cc
11
src/drv.cc
|
@ -6,9 +6,8 @@
|
||||||
#include <nix/value-to-json.hh>
|
#include <nix/value-to-json.hh>
|
||||||
#include <nix/derivations.hh>
|
#include <nix/derivations.hh>
|
||||||
|
|
||||||
|
|
||||||
static bool queryIsCached(nix::Store &store,
|
static bool queryIsCached(nix::Store &store,
|
||||||
std::map<std::string, std::string> &outputs) {
|
std::map<std::string, std::string> &outputs) {
|
||||||
uint64_t downloadSize, narSize;
|
uint64_t downloadSize, narSize;
|
||||||
nix::StorePathSet willBuild, willSubstitute, unknown;
|
nix::StorePathSet willBuild, willSubstitute, unknown;
|
||||||
|
|
||||||
|
@ -23,7 +22,8 @@ static bool queryIsCached(nix::Store &store,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The fields of a derivation that are printed in json form */
|
/* The fields of a derivation that are printed in json form */
|
||||||
Drv::Drv(std::string &attrPath, nix::EvalState &state, nix::DrvInfo &drvInfo, MyArgs &args) {
|
Drv::Drv(std::string &attrPath, nix::EvalState &state, nix::DrvInfo &drvInfo,
|
||||||
|
MyArgs &args) {
|
||||||
|
|
||||||
auto localStore = state.store.dynamic_pointer_cast<nix::LocalFSStore>();
|
auto localStore = state.store.dynamic_pointer_cast<nix::LocalFSStore>();
|
||||||
|
|
||||||
|
@ -58,8 +58,9 @@ Drv::Drv(std::string &attrPath, nix::EvalState &state, nix::DrvInfo &drvInfo, My
|
||||||
meta = meta_;
|
meta = meta_;
|
||||||
}
|
}
|
||||||
if (args.checkCacheStatus) {
|
if (args.checkCacheStatus) {
|
||||||
cacheStatus = queryIsCached(*localStore, outputs) ? Drv::CacheStatus::Cached
|
cacheStatus = queryIsCached(*localStore, outputs)
|
||||||
: Drv::CacheStatus::Uncached;
|
? Drv::CacheStatus::Cached
|
||||||
|
: Drv::CacheStatus::Uncached;
|
||||||
} else {
|
} else {
|
||||||
cacheStatus = Drv::CacheStatus::Unknown;
|
cacheStatus = Drv::CacheStatus::Unknown;
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,6 +88,6 @@ MyArgs::MyArgs() : MixCommonArgs("nix-eval-jobs") {
|
||||||
expectArg("expr", &releaseExpr);
|
expectArg("expr", &releaseExpr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyArgs::parseArgs(char** argv, int argc) {
|
void MyArgs::parseArgs(char **argv, int argc) {
|
||||||
parseCmdline(nix::argvToStrings(argc, argv), 0);
|
parseCmdline(nix::argvToStrings(argc, argv), 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue