mirror of
https://github.com/NixOS/nix
synced 2025-06-28 22:01:15 +02:00
* Add an option ‘build-use-substitutes’, which can be set to ‘false’
to disable use of substitutes; i.e., force building from source. Fixes Nix/221.
This commit is contained in:
parent
59a26360c7
commit
db5b86ef13
6 changed files with 23 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
|||
#include "misc.hh"
|
||||
#include "store-api.hh"
|
||||
#include "local-store.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
|
||||
namespace nix {
|
||||
|
@ -69,7 +70,8 @@ void queryMissing(StoreAPI & store, const PathSet & targets,
|
|||
|
||||
bool mustBuild = false;
|
||||
foreach (DerivationOutputs::iterator, i, drv.outputs)
|
||||
if (!store.isValidPath(i->second.path) && !store.hasSubstitutes(i->second.path))
|
||||
if (!store.isValidPath(i->second.path) &&
|
||||
!(queryBoolSetting("build-use-substitutes", true) && store.hasSubstitutes(i->second.path)))
|
||||
mustBuild = true;
|
||||
|
||||
if (mustBuild) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue