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,
|
||||
*getFlakeOutputs(*state, *lockedFlake)
|
||||
);
|
||||
auto drvPath = state->forceString(
|
||||
*findAlongAttrPath(
|
||||
*state,
|
||||
"drvPath",
|
||||
*emptyArgs,
|
||||
*drvValue).first
|
||||
);
|
||||
auto outPath = state->forceString(
|
||||
*findAlongAttrPath(
|
||||
*state,
|
||||
"outPath",
|
||||
*emptyArgs,
|
||||
*drvValue).first
|
||||
);
|
||||
auto outputName = state->forceString(
|
||||
*findAlongAttrPath(
|
||||
*state,
|
||||
"outputName",
|
||||
*emptyArgs,
|
||||
*drvValue).first
|
||||
);
|
||||
Value * v = state->allocValue();
|
||||
if (!state->getAttrField(*drvValue, {state->sDrvPath}, pos, *v))
|
||||
break;
|
||||
auto drvPath = state->forceString(*v);
|
||||
if (!state->getAttrField(*drvValue, {state->sOutPath}, pos, *v))
|
||||
break;
|
||||
auto outPath = state->forceString(*v);
|
||||
if (!state->getAttrField(*drvValue, {state->sOutputName}, pos, *v))
|
||||
break;
|
||||
auto outputName = state->forceString(*v);
|
||||
|
||||
auto drvInfo = DerivationInfo{
|
||||
state->store->parseStorePath(drvPath),
|
||||
state->store->maybeParseStorePath(outPath), // FIXME: set to something when relevant?
|
||||
state->store->maybeParseStorePath(outPath),
|
||||
outputName
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue