From 2459458bc8257734ca78cb7a2db3df20bd730ec0 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 4 Jun 2015 16:04:41 +0200 Subject: Allow substitutes for builds that have preferLocalBuild set Not substituting builds with "preferLocalBuild = true" was a bad idea, because it didn't take the cost of dependencies into account. For instance, if we can't substitute a fetchgit call, then we have to download/build git and all its dependencies. Partially reverts 5558652709f27e8a887580b77b93c705659d7a4b and adds a new derivation attribute "allowSubstitutes" to specify whether a derivation may be substituted. --- nix/libstore/misc.hh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'nix/libstore/misc.hh') diff --git a/nix/libstore/misc.hh b/nix/libstore/misc.hh index 144cb7f457..d3e31d51f7 100644 --- a/nix/libstore/misc.hh +++ b/nix/libstore/misc.hh @@ -34,5 +34,7 @@ void queryMissing(StoreAPI & store, const PathSet & targets, bool willBuildLocally(const Derivation & drv); +bool substitutesAllowed(const Derivation & drv); + } -- cgit 1.4.1