mirror of
https://github.com/NixOS/nix
synced 2025-06-27 08:31:16 +02:00
Support allowSubstitutes attribute in structured attribute derivations
Hopefully fixes #3081 (didn't test).
This commit is contained in:
parent
cec50290bf
commit
e07ec8d27e
6 changed files with 11 additions and 10 deletions
|
@ -1,4 +1,5 @@
|
|||
#include "derivations.hh"
|
||||
#include "parsed-derivations.hh"
|
||||
#include "globals.hh"
|
||||
#include "local-store.hh"
|
||||
#include "store-api.hh"
|
||||
|
@ -189,6 +190,7 @@ void Store::queryMissing(const PathSet & targets,
|
|||
}
|
||||
|
||||
Derivation drv = derivationFromPath(i2.first);
|
||||
ParsedDerivation parsedDrv(i2.first, drv);
|
||||
|
||||
PathSet invalid;
|
||||
for (auto & j : drv.outputs)
|
||||
|
@ -197,7 +199,7 @@ void Store::queryMissing(const PathSet & targets,
|
|||
invalid.insert(j.second.path);
|
||||
if (invalid.empty()) return;
|
||||
|
||||
if (settings.useSubstitutes && drv.substitutesAllowed()) {
|
||||
if (settings.useSubstitutes && parsedDrv.substitutesAllowed()) {
|
||||
auto drvState = make_ref<Sync<DrvState>>(DrvState(invalid.size()));
|
||||
for (auto & output : invalid)
|
||||
pool.enqueue(std::bind(checkOutput, i2.first, make_ref<Derivation>(drv), output, drvState));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue