aboutsummaryrefslogtreecommitdiff
path: root/src/nix/build.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-04-05 10:05:21 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2021-04-05 10:05:21 -0400
commit179582872de60863fcabcf471f98930a25fd6df3 (patch)
tree6349bd6ca80d01938414f5e9ed42a603140a1d9d /src/nix/build.cc
parent9b805d36ac70545fc4c0d863e21e0c2e5f2518a1 (diff)
Make `DerivedPathWithHints` a newtype
This allows us to namespace its constructors under it.
Diffstat (limited to 'src/nix/build.cc')
-rw-r--r--src/nix/build.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nix/build.cc b/src/nix/build.cc
index 0529ed382..03159b6cc 100644
--- a/src/nix/build.cc
+++ b/src/nix/build.cc
@@ -61,12 +61,12 @@ struct CmdBuild : InstallablesCommand, MixDryRun, MixJSON, MixProfile
for (const auto & [_i, buildable] : enumerate(buildables)) {
auto i = _i;
std::visit(overloaded {
- [&](DerivedPathOpaque bo) {
+ [&](DerivedPathWithHints::Opaque bo) {
std::string symlink = outLink;
if (i) symlink += fmt("-%d", i);
store2->addPermRoot(bo.path, absPath(symlink));
},
- [&](DerivedPathWithHintsBuilt bfd) {
+ [&](DerivedPathWithHints::Built bfd) {
auto builtOutputs = store->queryDerivationOutputMap(bfd.drvPath);
for (auto & output : builtOutputs) {
std::string symlink = outLink;
@@ -75,7 +75,7 @@ struct CmdBuild : InstallablesCommand, MixDryRun, MixJSON, MixProfile
store2->addPermRoot(output.second, absPath(symlink));
}
},
- }, buildable);
+ }, buildable.raw());
}
updateProfile(buildables);