forked from lix-project/lix
Respect build-use-substitutes
This commit is contained in:
parent
812c0dfbe2
commit
064816ab98
|
@ -3107,7 +3107,7 @@ void SubstitutionGoal::init()
|
||||||
if (settings.readOnlyMode)
|
if (settings.readOnlyMode)
|
||||||
throw Error(format("cannot substitute path ‘%1%’ - no write access to the Nix store") % storePath);
|
throw Error(format("cannot substitute path ‘%1%’ - no write access to the Nix store") % storePath);
|
||||||
|
|
||||||
subs = getDefaultSubstituters();
|
subs = settings.useSubstitutes ? getDefaultSubstituters() : std::list<ref<Store>>();
|
||||||
|
|
||||||
tryNext();
|
tryNext();
|
||||||
}
|
}
|
||||||
|
|
|
@ -780,6 +780,7 @@ Path LocalStore::queryPathFromHashPart(const string & hashPart)
|
||||||
|
|
||||||
PathSet LocalStore::querySubstitutablePaths(const PathSet & paths)
|
PathSet LocalStore::querySubstitutablePaths(const PathSet & paths)
|
||||||
{
|
{
|
||||||
|
if (!settings.useSubstitutes) return PathSet();
|
||||||
PathSet res;
|
PathSet res;
|
||||||
for (auto & sub : getDefaultSubstituters()) {
|
for (auto & sub : getDefaultSubstituters()) {
|
||||||
if (sub->storeDir != storeDir) continue;
|
if (sub->storeDir != storeDir) continue;
|
||||||
|
@ -799,6 +800,7 @@ PathSet LocalStore::querySubstitutablePaths(const PathSet & paths)
|
||||||
void LocalStore::querySubstitutablePathInfos(const PathSet & paths,
|
void LocalStore::querySubstitutablePathInfos(const PathSet & paths,
|
||||||
SubstitutablePathInfos & infos)
|
SubstitutablePathInfos & infos)
|
||||||
{
|
{
|
||||||
|
if (!settings.useSubstitutes) return;
|
||||||
for (auto & sub : getDefaultSubstituters()) {
|
for (auto & sub : getDefaultSubstituters()) {
|
||||||
if (sub->storeDir != storeDir) continue;
|
if (sub->storeDir != storeDir) continue;
|
||||||
for (auto & path : paths) {
|
for (auto & path : paths) {
|
||||||
|
|
Loading…
Reference in a new issue