Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nix
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b71e1fb342b2
Choose a base ref
...
head repository: NixOS/nix
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5886bc599653
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Mar 6, 2019

  1. canBuildLocally: check for features

    It could happen that the local builder match the system but lacks some features.
    Now it results a failure.
    The fix gracefully excludes the local builder from the set of available builders for derivation which requires the feature, so the derivation is built on remote builders only (as though it has incompatible system, like ```aarch64-linux``` when local is x86)
    volth authored Mar 6, 2019
    Copy the full SHA
    fff8db2 View commit details
  2. Merge pull request #2710 from volth/patch-6

    canBuildLocally: check for features
    edolstra authored Mar 6, 2019
    Copy the full SHA
    5886bc5 View commit details
Showing with 10 additions and 3 deletions.
  1. +10 −3 src/build-remote/build-remote.cc
13 changes: 10 additions & 3 deletions src/build-remote/build-remote.cc
Original file line number Diff line number Diff line change
@@ -38,6 +38,12 @@ static AutoCloseFD openSlotLock(const Machine & m, unsigned long long slot)
return openLockFile(fmt("%s/%s-%d", currentLoad, escapeUri(m.storeUri), slot), true);
}

static bool allSupportedLocally(const std::set<std::string>& requiredFeatures) {
for (auto & feature : requiredFeatures)
if (!settings.systemFeatures.get().count(feature)) return false;
return true;
}

static int _main(int argc, char * * argv)
{
{
@@ -97,9 +103,10 @@ static int _main(int argc, char * * argv)
source >> drvPath;
auto requiredFeatures = readStrings<std::set<std::string>>(source);

auto canBuildLocally = amWilling
&& ( neededSystem == settings.thisSystem
|| settings.extraPlatforms.get().count(neededSystem) > 0);
auto canBuildLocally = amWilling
&& ( neededSystem == settings.thisSystem
|| settings.extraPlatforms.get().count(neededSystem) > 0)
&& allSupportedLocally(requiredFeatures);

/* Error ignored here, will be caught later */
mkdir(currentLoad.c_str(), 0777);