nix-build: Fix regression causing all outputs to be built
This commit is contained in:
parent
af4689f9e9
commit
c7654bc491
1 changed files with 4 additions and 4 deletions
|
@ -453,13 +453,13 @@ void mainWrapped(int argc, char * * argv)
|
||||||
|
|
||||||
for (auto & drvInfo : drvs) {
|
for (auto & drvInfo : drvs) {
|
||||||
auto drvPath = drvInfo.queryDrvPath();
|
auto drvPath = drvInfo.queryDrvPath();
|
||||||
pathsToBuild.insert(drvPath);
|
auto outPath = drvInfo.queryOutPath();
|
||||||
|
|
||||||
auto outputName = drvInfo.queryOutputName();
|
auto outputName = drvInfo.queryOutputName();
|
||||||
if (outputName == "")
|
if (outputName == "")
|
||||||
throw Error("derivation ‘%s’ lacks an ‘outputName’ attribute", drvPath);
|
throw Error("derivation ‘%s’ lacks an ‘outputName’ attribute", drvPath);
|
||||||
|
|
||||||
pathsToBuild.insert(drvPath + (outputName != "out" ? "!" + outputName : ""));
|
pathsToBuild.insert(drvPath + "!" + outputName);
|
||||||
|
|
||||||
std::string drvPrefix;
|
std::string drvPrefix;
|
||||||
auto i = drvPrefixes.find(drvPath);
|
auto i = drvPrefixes.find(drvPath);
|
||||||
|
@ -475,8 +475,8 @@ void mainWrapped(int argc, char * * argv)
|
||||||
std::string symlink = drvPrefix;
|
std::string symlink = drvPrefix;
|
||||||
if (outputName != "out") symlink += "-" + outputName;
|
if (outputName != "out") symlink += "-" + outputName;
|
||||||
|
|
||||||
resultSymlinks[symlink] = drvInfo.queryOutPath();
|
resultSymlinks[symlink] = outPath;
|
||||||
outPaths.push_back(drvInfo.queryOutPath());
|
outPaths.push_back(outPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
buildPaths(pathsToBuild);
|
buildPaths(pathsToBuild);
|
||||||
|
|
Loading…
Reference in a new issue