mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 14:06:16 +02:00
Respect build-use-substitutes
This commit is contained in:
parent
812c0dfbe2
commit
064816ab98
2 changed files with 3 additions and 1 deletions
|
@ -3107,7 +3107,7 @@ void SubstitutionGoal::init()
|
|||
if (settings.readOnlyMode)
|
||||
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();
|
||||
}
|
||||
|
|
|
@ -780,6 +780,7 @@ Path LocalStore::queryPathFromHashPart(const string & hashPart)
|
|||
|
||||
PathSet LocalStore::querySubstitutablePaths(const PathSet & paths)
|
||||
{
|
||||
if (!settings.useSubstitutes) return PathSet();
|
||||
PathSet res;
|
||||
for (auto & sub : getDefaultSubstituters()) {
|
||||
if (sub->storeDir != storeDir) continue;
|
||||
|
@ -799,6 +800,7 @@ PathSet LocalStore::querySubstitutablePaths(const PathSet & paths)
|
|||
void LocalStore::querySubstitutablePathInfos(const PathSet & paths,
|
||||
SubstitutablePathInfos & infos)
|
||||
{
|
||||
if (!settings.useSubstitutes) return;
|
||||
for (auto & sub : getDefaultSubstituters()) {
|
||||
if (sub->storeDir != storeDir) continue;
|
||||
for (auto & path : paths) {
|
||||
|
|
Loading…
Reference in a new issue