diff options
author | Yorick van Pelt <yorick@yorickvanpelt.nl> | 2023-01-31 12:51:12 +0100 |
---|---|---|
committer | Yorick van Pelt <yorick@yorickvanpelt.nl> | 2023-05-08 12:58:59 +0200 |
commit | 2ca2c80c4e08544cb64f4dc00d083fb9540c2b04 (patch) | |
tree | f757a8d618fd8e1f6cff1ccc82cd8835efcd0884 /src/libstore/realisation.cc | |
parent | 869fb1a2f6b8374feacb5ed730e0a0f6cbb195c4 (diff) |
libstore: also pass unwanted outputs to the post-build-hook
Diffstat (limited to 'src/libstore/realisation.cc')
-rw-r--r-- | src/libstore/realisation.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libstore/realisation.cc b/src/libstore/realisation.cc index d63ec5ea2..93ddb5b20 100644 --- a/src/libstore/realisation.cc +++ b/src/libstore/realisation.cc @@ -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); } |