Skip to content

Commit

Permalink
Fix building against nix master
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Oct 30, 2018
1 parent e0f204f commit 8d26144
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion release.nix
@@ -1,5 +1,5 @@
{ hydraSrc ? builtins.fetchGit ./.
, nixpkgs ? builtins.fetchGit { url = https://github.com/NixOS/nixpkgs-channels.git; ref = "nixos-18.03-small"; }
, nixpkgs ? builtins.fetchGit { url = https://github.com/NixOS/nixpkgs-channels.git; ref = "nixos-18.09-small"; }
, officialRelease ? false
, shell ? false
}:
Expand Down Expand Up @@ -111,6 +111,7 @@ rec {
perlDeps perl nix
postgresql95 # for running the tests
boost
nlohmann_json
];

hydraPath = lib.makeBinPath (
Expand Down
3 changes: 2 additions & 1 deletion src/hydra-queue-runner/queue-monitor.cc
Expand Up @@ -428,8 +428,9 @@ Step::ptr State::createStep(ref<Store> destStore,
it's not runnable yet, and other threads won't make it
runnable while step->created == false. */
step->drv = readDerivation(drvPath);
step->parsedDrv = std::make_unique<ParsedDerivation>(drvPath, step->drv);

step->preferLocalBuild = step->drv.willBuildLocally();
step->preferLocalBuild = step->parsedDrv->willBuildLocally();
step->isDeterministic = get(step->drv.env, "isDetermistic", "0") == "1";

step->systemType = step->drv.platform;
Expand Down
3 changes: 2 additions & 1 deletion src/hydra-queue-runner/state.hh
Expand Up @@ -10,7 +10,7 @@
#include "db.hh"
#include "token-server.hh"

#include "derivations.hh"
#include "parsed-derivations.hh"
#include "pathlocks.hh"
#include "pool.hh"
#include "store-api.hh"
Expand Down Expand Up @@ -152,6 +152,7 @@ struct Step

nix::Path drvPath;
nix::Derivation drv;
std::unique_ptr<nix::ParsedDerivation> parsedDrv;
std::set<std::string> requiredSystemFeatures;
bool preferLocalBuild;
bool isDeterministic;
Expand Down

0 comments on commit 8d26144

Please sign in to comment.