mirror of
https://github.com/NixOS/nix.git
synced 2025-11-19 16:59:35 +01:00
Optimize the nix build caching
This commit is contained in:
parent
c116e6e837
commit
753730c410
1 changed files with 11 additions and 22 deletions
|
|
@ -506,31 +506,20 @@ std::tuple<std::string, FlakeRef, InstallableValue::DerivationInfo> InstallableF
|
||||||
*emptyArgs,
|
*emptyArgs,
|
||||||
*getFlakeOutputs(*state, *lockedFlake)
|
*getFlakeOutputs(*state, *lockedFlake)
|
||||||
);
|
);
|
||||||
auto drvPath = state->forceString(
|
Value * v = state->allocValue();
|
||||||
*findAlongAttrPath(
|
if (!state->getAttrField(*drvValue, {state->sDrvPath}, pos, *v))
|
||||||
*state,
|
break;
|
||||||
"drvPath",
|
auto drvPath = state->forceString(*v);
|
||||||
*emptyArgs,
|
if (!state->getAttrField(*drvValue, {state->sOutPath}, pos, *v))
|
||||||
*drvValue).first
|
break;
|
||||||
);
|
auto outPath = state->forceString(*v);
|
||||||
auto outPath = state->forceString(
|
if (!state->getAttrField(*drvValue, {state->sOutputName}, pos, *v))
|
||||||
*findAlongAttrPath(
|
break;
|
||||||
*state,
|
auto outputName = state->forceString(*v);
|
||||||
"outPath",
|
|
||||||
*emptyArgs,
|
|
||||||
*drvValue).first
|
|
||||||
);
|
|
||||||
auto outputName = state->forceString(
|
|
||||||
*findAlongAttrPath(
|
|
||||||
*state,
|
|
||||||
"outputName",
|
|
||||||
*emptyArgs,
|
|
||||||
*drvValue).first
|
|
||||||
);
|
|
||||||
|
|
||||||
auto drvInfo = DerivationInfo{
|
auto drvInfo = DerivationInfo{
|
||||||
state->store->parseStorePath(drvPath),
|
state->store->parseStorePath(drvPath),
|
||||||
state->store->maybeParseStorePath(outPath), // FIXME: set to something when relevant?
|
state->store->maybeParseStorePath(outPath),
|
||||||
outputName
|
outputName
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue