Skip to content

Commit 8bc95a9

Browse files
authored
Merge pull request #1559 from NixOS/bump-nix
bump to nix v2.33
2 parents b45f0d1 + 82cd5e0 commit 8bc95a9

File tree

6 files changed

+30
-30
lines changed

6 files changed

+30
-30
lines changed

flake.lock

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11-small";
55

66
inputs.nix = {
7-
url = "github:NixOS/nix/2.32-maintenance";
7+
url = "github:NixOS/nix/2.33-maintenance";
88
# We want to control the deps precisely
99
flake = false;
1010
};
1111

1212
inputs.nix-eval-jobs = {
13-
url = "github:nix-community/nix-eval-jobs/v2.32.1";
13+
url = "github:nix-community/nix-eval-jobs/v2.33.0";
1414
# We want to control the deps precisely
1515
flake = false;
1616
};

src/hydra-queue-runner/build-remote.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ static BuildResult performBuild(
273273
auto drvOutput = DrvOutput { outputHash, outputName };
274274
successP->builtOutputs.insert_or_assign(
275275
std::move(outputName),
276-
Realisation { drvOutput, *outputPath });
276+
Realisation { {.outPath = *outputPath}, drvOutput });
277277
}
278278
}
279279
}

src/hydra-queue-runner/hydra-queue-runner.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -537,12 +537,12 @@ void State::notifyBuildFinished(pqxx::work & txn, BuildID buildId,
537537

538538
std::shared_ptr<PathLocks> State::acquireGlobalLock()
539539
{
540-
Path lockPath = hydraData + "/queue-runner/lock";
540+
auto lockPath = std::filesystem::path(hydraData) / "queue-runner/lock";
541541

542-
createDirs(dirOf(lockPath));
542+
createDirs(lockPath.parent_path());
543543

544544
auto lock = std::make_shared<PathLocks>();
545-
if (!lock->lockPaths(PathSet({lockPath}), "", false)) return 0;
545+
if (!lock->lockPaths({lockPath}, "", false)) return 0;
546546

547547
return lock;
548548
}

src/hydra-queue-runner/queue-monitor.cc

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "state.hh"
22
#include "hydra-build-result.hh"
3+
#include <nix/store/derived-path.hh>
34
#include <nix/store/globals.hh>
45
#include <nix/store/parsed-derivations.hh>
56
#include <nix/util/thread-pool.hh>
@@ -487,24 +488,24 @@ Step::ptr State::createStep(ref<Store> destStore,
487488
it's not runnable yet, and other threads won't make it
488489
runnable while step->created == false. */
489490
step->drv = std::make_unique<Derivation>(localStore->readDerivation(drvPath));
490-
{
491-
try {
492-
step->drvOptions = std::make_unique<DerivationOptions>(
493-
DerivationOptions::fromStructuredAttrs(
494-
step->drv->env,
495-
step->drv->structuredAttrs ? &*step->drv->structuredAttrs : nullptr));
496-
} catch (Error & e) {
497-
e.addTrace({}, "while parsing derivation '%s'", localStore->printStorePath(drvPath));
498-
throw;
499-
}
491+
DerivationOptions<nix::SingleDerivedPath> drvOptions;
492+
try {
493+
drvOptions = derivationOptionsFromStructuredAttrs(
494+
*localStore,
495+
step->drv->inputDrvs,
496+
step->drv->env,
497+
get(step->drv->structuredAttrs));
498+
} catch (Error & e) {
499+
e.addTrace({}, "while parsing derivation '%s'", localStore->printStorePath(drvPath));
500+
throw;
500501
}
501502

502-
step->preferLocalBuild = step->drvOptions->willBuildLocally(*localStore, *step->drv);
503+
step->preferLocalBuild = drvOptions.willBuildLocally(*localStore, *step->drv);
503504
step->isDeterministic = getOr(step->drv->env, "isDetermistic", "0") == "1";
504505

505506
step->systemType = step->drv->platform;
506507
{
507-
StringSet features = step->requiredSystemFeatures = step->drvOptions->getRequiredSystemFeatures(*step->drv);
508+
StringSet features = step->requiredSystemFeatures = drvOptions.getRequiredSystemFeatures(*step->drv);
508509
if (step->preferLocalBuild)
509510
features.insert("local");
510511
if (!features.empty()) {

src/hydra-queue-runner/state.hh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ struct Step
172172

173173
nix::StorePath drvPath;
174174
std::unique_ptr<nix::Derivation> drv;
175-
std::unique_ptr<nix::DerivationOptions> drvOptions;
176175
nix::StringSet requiredSystemFeatures;
177176
bool preferLocalBuild;
178177
bool isDeterministic;

0 commit comments

Comments
 (0)