Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11-small";

inputs.nix = {
url = "github:NixOS/nix/2.26-maintenance";
url = "github:NixOS/nix/2.27-maintenance";
inputs.nixpkgs.follows = "nixpkgs";

# hide nix dev tooling from our lock file
Expand All @@ -16,7 +16,7 @@
};

inputs.nix-eval-jobs = {
url = "github:nix-community/nix-eval-jobs";
url = "github:nix-community/nix-eval-jobs/v2.27.0";
# We want to control the deps precisely
flake = false;
};
Expand Down
10 changes: 7 additions & 3 deletions src/hydra-queue-runner/queue-monitor.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "state.hh"
#include "hydra-build-result.hh"
#include "globals.hh"
#include "parsed-derivations.hh"

#include <cstring>

Expand Down Expand Up @@ -463,14 +464,17 @@ 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 = std::make_unique<Derivation>(localStore->readDerivation(drvPath));
step->parsedDrv = std::make_unique<ParsedDerivation>(drvPath, *step->drv);
{
auto parsedDrv = ParsedDerivation{drvPath, *step->drv};
step->drvOptions = std::make_unique<DerivationOptions>(DerivationOptions::fromParsedDerivation(parsedDrv));
}

step->preferLocalBuild = step->parsedDrv->willBuildLocally(*localStore);
step->preferLocalBuild = step->drvOptions->willBuildLocally(*localStore, *step->drv);
step->isDeterministic = getOr(step->drv->env, "isDetermistic", "0") == "1";

step->systemType = step->drv->platform;
{
StringSet features = step->requiredSystemFeatures = step->parsedDrv->getRequiredSystemFeatures();
StringSet features = step->requiredSystemFeatures = step->drvOptions->getRequiredSystemFeatures(*step->drv);
if (step->preferLocalBuild)
features.insert("local");
if (!features.empty()) {
Expand Down
5 changes: 3 additions & 2 deletions src/hydra-queue-runner/state.hh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@

#include "db.hh"

#include "parsed-derivations.hh"
#include "derivations.hh"
#include "derivation-options.hh"
#include "pathlocks.hh"
#include "pool.hh"
#include "build-result.hh"
Expand Down Expand Up @@ -167,7 +168,7 @@ struct Step

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