aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/realisation.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2023-06-09 13:06:47 +0200
committerGitHub <noreply@github.com>2023-06-09 13:06:47 +0200
commit381a32981bd9d15da2b06f151c38f1a1229a8800 (patch)
tree34bd75c80a91042816d81e4028a5dc8957fd90d9 /src/libstore/realisation.cc
parent0e18254aa81b9315c13d6ae736cb38666d19f122 (diff)
parent3c78920f7358957dba37a379e9d0b062dd3192e2 (diff)
Merge branch 'master' into angerman/mac-fix-recursive-nix
Diffstat (limited to 'src/libstore/realisation.cc')
-rw-r--r--src/libstore/realisation.cc13
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);
}