Skip to content

Commit

Permalink
Merge pull request NixOS#4209 from hercules-ci/fix-restricted-store-a…
Browse files Browse the repository at this point in the history
…ddToStoreFromDump

Restore RestrictedStore.addToStoreFromDump implementation
  • Loading branch information
grahamc authored Oct 31, 2020
2 parents dc5696b + e8a45d0 commit 035d0ad
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/libstore/build/derivation-goal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2074,6 +2074,14 @@ struct RestrictedStore : public LocalFSStore, public virtual RestrictedStoreConf
return path;
}

StorePath addToStoreFromDump(Source & dump, const string & name,
FileIngestionMethod method = FileIngestionMethod::Recursive, HashType hashAlgo = htSHA256, RepairFlag repair = NoRepair) override
{
auto path = next->addToStoreFromDump(dump, name, method, hashAlgo, repair);
goal.addDependency(path);
return path;
}

void narFromPath(const StorePath & path, Sink & sink) override
{
if (!goal.isAllowed(path))
Expand Down

0 comments on commit 035d0ad

Please sign in to comment.