mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 16:26:18 +02:00
Disable EvalCache in impure mode
This commit is contained in:
parent
6644b6099b
commit
c47d2dac6c
1 changed files with 5 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
#include "eval-cache.hh"
|
||||
#include "sqlite.hh"
|
||||
#include "eval.hh"
|
||||
|
||||
#include <set>
|
||||
|
||||
|
@ -62,6 +63,8 @@ void EvalCache::addDerivation(
|
|||
const std::string & attrPath,
|
||||
const Derivation & drv)
|
||||
{
|
||||
if (!evalSettings.pureEval) return;
|
||||
|
||||
auto state(_state->lock());
|
||||
|
||||
if (state->fingerprints.insert(fingerprint).second)
|
||||
|
@ -81,6 +84,8 @@ std::optional<EvalCache::Derivation> EvalCache::getDerivation(
|
|||
const Fingerprint & fingerprint,
|
||||
const std::string & attrPath)
|
||||
{
|
||||
if (!evalSettings.pureEval) return {};
|
||||
|
||||
auto state(_state->lock());
|
||||
|
||||
auto queryAttribute(state->queryAttribute.use()
|
||||
|
|
Loading…
Reference in a new issue