aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build/local-derivation-goal.hh
diff options
context:
space:
mode:
authorMatthew Kenigsberg <matthewkenigsberg@gmail.com>2021-09-15 11:51:52 -0500
committerMatthew Kenigsberg <matthewkenigsberg@gmail.com>2021-09-15 11:58:06 -0500
commit3b82c1a5fef521ebadea5df12384390c8c24100c (patch)
tree67fd413bcf0b42c5ada7eddc41a04f7bd99df3a8 /src/libstore/build/local-derivation-goal.hh
parente023c985d58094041e74ff59a51757bc75687ca7 (diff)
parentd2c8eed34496b650935e4563ffe3174978bd22fc (diff)
Merge remote-tracking branch 'upstream/master' into auto-uid-allocation
Diffstat (limited to 'src/libstore/build/local-derivation-goal.hh')
-rw-r--r--src/libstore/build/local-derivation-goal.hh8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstore/build/local-derivation-goal.hh b/src/libstore/build/local-derivation-goal.hh
index f69d97e99..ac915a586 100644
--- a/src/libstore/build/local-derivation-goal.hh
+++ b/src/libstore/build/local-derivation-goal.hh
@@ -115,6 +115,9 @@ struct LocalDerivationGoal : public DerivationGoal
/* Paths that were added via recursive Nix calls. */
StorePathSet addedPaths;
+ /* Realisations that were added via recursive Nix calls. */
+ std::set<DrvOutput> addedDrvOutputs;
+
/* Recursive Nix calls are only allowed to build or realize paths
in the original input closure or added via a recursive Nix call
(so e.g. you can't do 'nix-store -r /nix/store/<bla>' where
@@ -123,6 +126,11 @@ struct LocalDerivationGoal : public DerivationGoal
{
return inputPaths.count(path) || addedPaths.count(path);
}
+ bool isAllowed(const DrvOutput & id)
+ {
+ return addedDrvOutputs.count(id);
+ }
+
bool isAllowed(const DerivedPath & req);
friend struct RestrictedStore;