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: f32fbf952d8e
Choose a base ref
...
head repository: NixOS/nix
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 41ba5135e0a2
Choose a head ref
  • 3 commits
  • 4 files changed
  • 1 contributor

Commits on Apr 1, 2019

  1. Use Nixpkgs 19.03

    edolstra committed Apr 1, 2019
    Copy the full SHA
    2f59b30 View commit details
  2. getMachines(): Cache result

    edolstra committed Apr 1, 2019
    Copy the full SHA
    2bc6304 View commit details
  3. Copy the full SHA
    41ba513 View commit details
Showing with 13 additions and 6 deletions.
  1. +1 −1 release.nix
  2. +1 −1 shell.nix
  3. +6 −0 src/libstore/build.cc
  4. +5 −4 src/libstore/machines.cc
2 changes: 1 addition & 1 deletion release.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ nix ? builtins.fetchGit ./.
, nixpkgs ? builtins.fetchGit { url = https://github.com/NixOS/nixpkgs-channels.git; ref = "nixos-18.09"; }
, nixpkgs ? builtins.fetchGit { url = https://github.com/NixOS/nixpkgs-channels.git; ref = "nixos-19.03"; }
, officialRelease ? false
, systems ? [ "x86_64-linux" "i686-linux" "x86_64-darwin" "aarch64-linux" ]
}:
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ useClang ? false }:

with import (builtins.fetchGit { url = https://github.com/NixOS/nixpkgs-channels.git; ref = "nixos-18.09"; }) {};
with import (builtins.fetchGit { url = https://github.com/NixOS/nixpkgs-channels.git; ref = "nixos-19.03"; }) {};

with import ./release-common.nix { inherit pkgs; };

6 changes: 6 additions & 0 deletions src/libstore/build.cc
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@
#include "json.hh"
#include "nar-info.hh"
#include "parsed-derivations.hh"
#include "machines.hh"

#include <algorithm>
#include <iostream>
@@ -4411,6 +4412,11 @@ static void primeCache(Store & store, const PathSet & paths)
PathSet willBuild, willSubstitute, unknown;
unsigned long long downloadSize, narSize;
store.queryMissing(paths, willBuild, willSubstitute, unknown, downloadSize, narSize);

if (!willBuild.empty() && 0 == settings.maxBuildJobs && getMachines().empty())
throw Error(
"%d derivations need to be built, but neither local builds ('--max-jobs') "
"nor remote builds ('--builders') are enabled", willBuild.size());
}


9 changes: 5 additions & 4 deletions src/libstore/machines.cc
Original file line number Diff line number Diff line change
@@ -89,10 +89,11 @@ void parseMachines(const std::string & s, Machines & machines)

Machines getMachines()
{
Machines machines;

parseMachines(settings.builders, machines);

static auto machines = [&]() {
Machines machines;
parseMachines(settings.builders, machines);
return machines;
}();
return machines;
}