mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-15 02:36:16 +02:00
Use std::filesystem::path
in build.cc
This commit is contained in:
parent
18485d2d53
commit
70dde8c70c
1 changed files with 5 additions and 5 deletions
|
@ -43,22 +43,22 @@ static nlohmann::json builtPathsWithResultToJSON(const std::vector<BuiltPathWith
|
|||
}
|
||||
|
||||
// TODO deduplicate with other code also setting such out links.
|
||||
static void createOutLinks(const Path& outLink, const std::vector<BuiltPathWithResult>& buildables, LocalFSStore& store2)
|
||||
static void createOutLinks(const std::filesystem::path& outLink, const std::vector<BuiltPathWithResult>& buildables, LocalFSStore& store2)
|
||||
{
|
||||
for (const auto & [_i, buildable] : enumerate(buildables)) {
|
||||
auto i = _i;
|
||||
std::visit(overloaded {
|
||||
[&](const BuiltPath::Opaque & bo) {
|
||||
std::string symlink = outLink;
|
||||
auto symlink = outLink;
|
||||
if (i) symlink += fmt("-%d", i);
|
||||
store2.addPermRoot(bo.path, absPath(symlink));
|
||||
store2.addPermRoot(bo.path, absPath(symlink.string()));
|
||||
},
|
||||
[&](const BuiltPath::Built & bfd) {
|
||||
for (auto & output : bfd.outputs) {
|
||||
std::string symlink = outLink;
|
||||
auto symlink = outLink;
|
||||
if (i) symlink += fmt("-%d", i);
|
||||
if (output.first != "out") symlink += fmt("-%s", output.first);
|
||||
store2.addPermRoot(output.second, absPath(symlink));
|
||||
store2.addPermRoot(output.second, absPath(symlink.string()));
|
||||
}
|
||||
},
|
||||
}, buildable.path.raw());
|
||||
|
|
Loading…
Reference in a new issue