mirror of
https://github.com/NixOS/nix.git
synced 2025-11-19 16:59:35 +01:00
Another attempt at caching nix build
A different tradeof set probably. I guess we could unify both
This commit is contained in:
parent
3e261410bc
commit
c116e6e837
1 changed files with 25 additions and 22 deletions
|
|
@ -499,36 +499,39 @@ std::tuple<std::string, FlakeRef, InstallableValue::DerivationInfo> InstallableF
|
||||||
|
|
||||||
for (auto & attrPath : getActualAttrPaths()) {
|
for (auto & attrPath : getActualAttrPaths()) {
|
||||||
auto emptyArgs = state->allocBindings(0);
|
auto emptyArgs = state->allocBindings(0);
|
||||||
auto drvPathAttrPath = attrPath + ".drvPath";
|
|
||||||
auto drvOutputNameAttrPath = attrPath + ".outputName";
|
|
||||||
auto drvOutputPathAttrPath = attrPath + ".outPath";
|
|
||||||
try {
|
try {
|
||||||
auto [drvPathValue, pos] = findAlongAttrPath(
|
auto [drvValue, pos] = findAlongAttrPath(
|
||||||
*state,
|
*state,
|
||||||
drvPathAttrPath,
|
attrPath,
|
||||||
*emptyArgs,
|
*emptyArgs,
|
||||||
*getFlakeOutputs(*state, *lockedFlake)
|
*getFlakeOutputs(*state, *lockedFlake)
|
||||||
);
|
);
|
||||||
auto drvPath = state->forceString(*drvPathValue);
|
auto drvPath = state->forceString(
|
||||||
auto drvOutputNameValue = findAlongAttrPath(
|
*findAlongAttrPath(
|
||||||
*state,
|
*state,
|
||||||
drvOutputNameAttrPath,
|
"drvPath",
|
||||||
*emptyArgs,
|
*emptyArgs,
|
||||||
*getFlakeOutputs(*state, *lockedFlake)
|
*drvValue).first
|
||||||
).first;
|
);
|
||||||
auto drvOutputName = state->forceString(*drvOutputNameValue);
|
auto outPath = state->forceString(
|
||||||
auto drvOutputPathValue = findAlongAttrPath(
|
*findAlongAttrPath(
|
||||||
*state,
|
*state,
|
||||||
drvOutputPathAttrPath,
|
"outPath",
|
||||||
*emptyArgs,
|
*emptyArgs,
|
||||||
*getFlakeOutputs(*state, *lockedFlake)
|
*drvValue).first
|
||||||
).first;
|
);
|
||||||
auto drvOutputPath = state->forceString(*drvOutputPathValue);
|
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(drvOutputPath), // FIXME: set to something when relevant?
|
state->store->maybeParseStorePath(outPath), // FIXME: set to something when relevant?
|
||||||
drvOutputName
|
outputName
|
||||||
};
|
};
|
||||||
|
|
||||||
return {attrPath, lockedFlake->flake.lockedRef, std::move(drvInfo)};
|
return {attrPath, lockedFlake->flake.lockedRef, std::move(drvInfo)};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue