diff options
author | Rickard Nilsson <rickynils@gmail.com> | 2021-01-12 01:28:00 +0100 |
---|---|---|
committer | Rickard Nilsson <rickynils@gmail.com> | 2021-01-12 01:28:00 +0100 |
commit | 44fd7a05b655315fa0e6156ac33a1c5624460968 (patch) | |
tree | 9c2b49f2c96742f920cd4b76936b44292aa2a230 | |
parent | 6254b1f5d298ff73127d7b0f0da48f142bdc753c (diff) |
Don't let 'preferLocalBuild' override 'max-jobs=0'
This resolves #3810 by changing the behavior of `max-jobs = 0`, so
that specifying the option also avoids local building of derivations
with the attribute `preferLocalBuild = true`.
-rw-r--r-- | src/libstore/parsed-derivations.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstore/parsed-derivations.cc b/src/libstore/parsed-derivations.cc index e7b7202d4..c5c3ae3dc 100644 --- a/src/libstore/parsed-derivations.cc +++ b/src/libstore/parsed-derivations.cc @@ -101,6 +101,10 @@ bool ParsedDerivation::canBuildLocally(Store & localStore) const && !drv.isBuiltin()) return false; + if (settings.maxBuildJobs.get() == 0 + && !drv.isBuiltin()) + return false; + for (auto & feature : getRequiredSystemFeatures()) if (!localStore.systemFeatures.get().count(feature)) return false; |