mirror of
https://github.com/NixOS/nix.git
synced 2024-11-28 17:52:25 +00:00
Formatting
This commit is contained in:
parent
d002324f1b
commit
db0525692d
@ -369,28 +369,30 @@ void MixEnvironment::setEnviron()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void createOutLinks(
|
void createOutLinks(const std::filesystem::path & outLink, const BuiltPaths & buildables, LocalFSStore & store)
|
||||||
const std::filesystem::path & outLink,
|
|
||||||
const BuiltPaths & buildables,
|
|
||||||
LocalFSStore & store)
|
|
||||||
{
|
{
|
||||||
for (const auto & [_i, buildable] : enumerate(buildables)) {
|
for (const auto & [_i, buildable] : enumerate(buildables)) {
|
||||||
auto i = _i;
|
auto i = _i;
|
||||||
std::visit(overloaded {
|
std::visit(
|
||||||
[&](const BuiltPath::Opaque & bo) {
|
overloaded{
|
||||||
auto symlink = outLink;
|
[&](const BuiltPath::Opaque & bo) {
|
||||||
if (i) symlink += fmt("-%d", i);
|
|
||||||
store.addPermRoot(bo.path, absPath(symlink.string()));
|
|
||||||
},
|
|
||||||
[&](const BuiltPath::Built & bfd) {
|
|
||||||
for (auto & output : bfd.outputs) {
|
|
||||||
auto symlink = outLink;
|
auto symlink = outLink;
|
||||||
if (i) symlink += fmt("-%d", i);
|
if (i)
|
||||||
if (output.first != "out") symlink += fmt("-%s", output.first);
|
symlink += fmt("-%d", i);
|
||||||
store.addPermRoot(output.second, absPath(symlink.string()));
|
store.addPermRoot(bo.path, absPath(symlink.string()));
|
||||||
}
|
},
|
||||||
|
[&](const BuiltPath::Built & bfd) {
|
||||||
|
for (auto & output : bfd.outputs) {
|
||||||
|
auto symlink = outLink;
|
||||||
|
if (i)
|
||||||
|
symlink += fmt("-%d", i);
|
||||||
|
if (output.first != "out")
|
||||||
|
symlink += fmt("-%s", output.first);
|
||||||
|
store.addPermRoot(output.second, absPath(symlink.string()));
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}, buildable.raw());
|
buildable.raw());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -372,9 +372,6 @@ void printClosureDiff(
|
|||||||
* Create symlinks prefixed by `outLink` to the store paths in
|
* Create symlinks prefixed by `outLink` to the store paths in
|
||||||
* `buildables`.
|
* `buildables`.
|
||||||
*/
|
*/
|
||||||
void createOutLinks(
|
void createOutLinks(const std::filesystem::path & outLink, const BuiltPaths & buildables, LocalFSStore & store);
|
||||||
const std::filesystem::path & outLink,
|
|
||||||
const BuiltPaths & buildables,
|
|
||||||
LocalFSStore & store);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user