1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-17 16:02:43 +01:00

Make DerivedPathWithHints a newtype

This allows us to namespace its constructors under it.
This commit is contained in:
John Ericson 2021-04-05 10:05:21 -04:00
parent 9b805d36ac
commit 179582872d
8 changed files with 44 additions and 31 deletions

View file

@ -277,14 +277,14 @@ struct Common : InstallableCommand, MixProfile
}
};
std::visit(overloaded {
[&](const DerivedPathOpaque & bo) {
[&](const DerivedPathWithHints::Opaque & bo) {
doRedirect(bo.path);
},
[&](const DerivedPathWithHintsBuilt & bfd) {
[&](const DerivedPathWithHints::Built & bfd) {
for (auto & [outputName, path] : bfd.outputs)
if (path) doRedirect(*path);
},
}, buildable);
}, buildable.raw());
}
return rewriteStrings(script, rewrites);