Use nix::willBuildLocally()

[?]
Oct 21, 2015, 1:44 PM
H7SZRHUBSEDJ3PQ3VOV4ZEEFUWTBPGZN53G6W26HHXPJDO7MSHJAC

Dependencies

  • [2] O3NM62IZ Support multiple machines files
  • [3] EJJCY263 Account steps with preferLocalBuild as a separate system type
  • [4] VQISTKOP hydra-queue-runner: Use substitutes
  • [5] 5AIYUMTB Basic remote building
  • [6] RQUAATWB Add status dump facility
  • [7] HJOEIMLR Refactor
  • [8] OG3Z3QGC Namespace cleanup
  • [9] MHVIT4JY Split hydra-queue-runner.cc more
  • [10] SK6WHODM Support preferLocalBuild
  • [11] 24BMQDZA Start of single-process hydra-queue-runner
  • [12] SODOV2CM Automatically reload $NIX_REMOTE_SYSTEMS when it changes
  • [13] 5N7LVAJN Keep track of requiredSystemFeatures in the machine stats

Change contents

  • edit in src/hydra-queue-runner/hydra-queue-runner.cc at line 24
    [5.7892][5.686:687](),[5.245][5.245:381]()
    localPlatforms = {settings.thisSystem};
    if (settings.thisSystem == "x86_64-linux")
    localPlatforms.insert("i686-linux");
  • replacement in src/hydra-queue-runner/hydra-queue-runner.cc at line 96
    [2.309][2.309:384]()
    parseMachines("localhost " + concatStringsSep(",", localPlatforms)
    [2.309]
    [2.384]
    parseMachines("localhost " + settings.thisSystem
  • edit in src/hydra-queue-runner/queue-monitor.cc at line 4
    [4.1279]
    [5.20115]
    #include "misc.hh"
  • replacement in src/hydra-queue-runner/queue-monitor.cc at line 362
    [3.1][3.1:197]()
    auto attr = step->drv.env.find("preferLocalBuild");
    step->preferLocalBuild =
    attr != step->drv.env.end() && attr->second == "1"
    && has(localPlatforms, step->drv.platform);
    [3.1]
    [3.197]
    step->preferLocalBuild = willBuildLocally(step->drv);
  • edit in src/hydra-queue-runner/state.hh at line 261
    [5.437][5.4385:4386](),[5.4385][5.4385:4386](),[5.4386][5.438:473]()
    nix::StringSet localPlatforms;