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:
parent
9b805d36ac
commit
179582872d
8 changed files with 44 additions and 31 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue