Skip to content

Commit

Permalink
re order
Browse files Browse the repository at this point in the history
  • Loading branch information
mkenigs committed May 9, 2020
1 parent b36c735 commit 883948d
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions src/nix/installables.cc
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,27 @@ struct InstallableStorePath : Installable
}
};

std::vector<InstallableValue::DerivationInfo> InstallableAttrPath::toDerivations()
{
auto v = toValue(*state).first;

Bindings & autoArgs = *cmd.getAutoArgs(*state);

DrvInfos drvInfos;
getDerivations(*state, *v, "", autoArgs, drvInfos, false);

std::vector<DerivationInfo> res;
for (auto & drvInfo : drvInfos) {
res.push_back({
state->store->parseStorePath(drvInfo.queryDrvPath()),
state->store->parseStorePath(drvInfo.queryOutPath()),
drvInfo.queryOutputName()
});
}

return res;
}

Buildables InstallableValue::toBuildables()
{
Buildables res;
Expand Down Expand Up @@ -234,27 +255,6 @@ struct InstallableAttrPath : InstallableValue
virtual std::vector<InstallableValue::DerivationInfo> toDerivations() override;
};

std::vector<InstallableValue::DerivationInfo> InstallableAttrPath::toDerivations()
{
auto v = toValue(*state).first;

Bindings & autoArgs = *cmd.getAutoArgs(*state);

DrvInfos drvInfos;
getDerivations(*state, *v, "", autoArgs, drvInfos, false);

std::vector<DerivationInfo> res;
for (auto & drvInfo : drvInfos) {
res.push_back({
state->store->parseStorePath(drvInfo.queryDrvPath()),
state->store->parseStorePath(drvInfo.queryOutPath()),
drvInfo.queryOutputName()
});
}

return res;
}

std::vector<std::string> InstallableFlake::getActualAttrPaths()
{
std::vector<std::string> res;
Expand Down

0 comments on commit 883948d

Please sign in to comment.