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

libstore: also pass unwanted outputs to the post-build-hook

This commit is contained in:
Yorick van Pelt 2023-01-31 12:51:12 +01:00
parent 869fb1a2f6
commit 2ca2c80c4e
No known key found for this signature in database
GPG key ID: A36E70F9DC014A15
5 changed files with 30 additions and 10 deletions

View file

@ -136,6 +136,19 @@ size_t Realisation::checkSignatures(const PublicKeys & publicKeys) const
return good;
}
SingleDrvOutputs filterDrvOutputs(const OutputsSpec& wanted, SingleDrvOutputs&& outputs)
{
SingleDrvOutputs ret = std::move(outputs);
for (auto it = ret.begin(); it != ret.end(); ) {
if (!wanted.contains(it->first))
it = ret.erase(it);
else
++it;
}
return ret;
}
StorePath RealisedPath::path() const {
return std::visit([](auto && arg) { return arg.getPath(); }, raw);
}