From c3ed183c64dc098c668c5b68dc0ddf1adf2b46dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 14 Jan 2026 21:58:40 +0100 Subject: [PATCH 1/2] bump to nix v2.33 --- flake.lock | 22 +++++++++++----------- flake.nix | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/flake.lock b/flake.lock index 45f5ea21..a5d1ed8c 100644 --- a/flake.lock +++ b/flake.lock @@ -3,16 +3,16 @@ "nix": { "flake": false, "locked": { - "lastModified": 1768160359, - "narHash": "sha256-XDCQIrHNJKMYoL8hcUgzEbBHzINofkcsLRDr7tYa7Ac=", + "lastModified": 1768160797, + "narHash": "sha256-TVKn52SoKq8mMyW/x3NPPskGVurFdnGGV0DGvnL0gak=", "owner": "NixOS", "repo": "nix", - "rev": "b601b44de51f8d46530a99659f889027e1e7d670", + "rev": "fb562abba93fb15f66a71a9fc1d94bb1ea21a2d4", "type": "github" }, "original": { "owner": "NixOS", - "ref": "2.32-maintenance", + "ref": "2.33-maintenance", "repo": "nix", "type": "github" } @@ -20,27 +20,27 @@ "nix-eval-jobs": { "flake": false, "locked": { - "lastModified": 1760478325, - "narHash": "sha256-hA+NOH8KDcsuvH7vJqSwk74PyZP3MtvI/l+CggZcnTc=", + "lastModified": 1767025318, + "narHash": "sha256-i68miKHGdueWggcDAF+Kca9g6S3ipkW629XbMpQYfn0=", "owner": "nix-community", "repo": "nix-eval-jobs", - "rev": "daa42f9e9c84aeff1e325dd50fda321f53dfd02c", + "rev": "79dd7adbb5f75b08fb4b9bddd712ebc52baa46bc", "type": "github" }, "original": { "owner": "nix-community", - "ref": "v2.32.1", + "ref": "v2.33.0", "repo": "nix-eval-jobs", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1768129980, - "narHash": "sha256-QJ4xDnLGWTz6r844qXcfBYE14FX00PU7+BJthwJpiQQ=", + "lastModified": 1768332487, + "narHash": "sha256-Q0bSMhDIhb/S7r+XRyuPy58kEXa0rmpw5j99ubJzovg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3bb0067937fe6c1adec9068b9ba24b1adc8defae", + "rev": "6b0609442afc4ce51ff1466e7db555c2e2fc28d4", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 537a18b4..e6d6126e 100644 --- a/flake.nix +++ b/flake.nix @@ -4,13 +4,13 @@ inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11-small"; inputs.nix = { - url = "github:NixOS/nix/2.32-maintenance"; + url = "github:NixOS/nix/2.33-maintenance"; # We want to control the deps precisely flake = false; }; inputs.nix-eval-jobs = { - url = "github:nix-community/nix-eval-jobs/v2.32.1"; + url = "github:nix-community/nix-eval-jobs/v2.33.0"; # We want to control the deps precisely flake = false; }; From 82cd5e0e236fa30fbeca50a42e51b454082d2685 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Fri, 23 Jan 2026 18:46:45 -0500 Subject: [PATCH 2/2] Fix build after Nix bump --- src/hydra-queue-runner/build-remote.cc | 2 +- src/hydra-queue-runner/hydra-queue-runner.cc | 6 ++--- src/hydra-queue-runner/queue-monitor.cc | 25 ++++++++++---------- src/hydra-queue-runner/state.hh | 1 - 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/hydra-queue-runner/build-remote.cc b/src/hydra-queue-runner/build-remote.cc index 4111a8fb..09e87133 100644 --- a/src/hydra-queue-runner/build-remote.cc +++ b/src/hydra-queue-runner/build-remote.cc @@ -273,7 +273,7 @@ static BuildResult performBuild( auto drvOutput = DrvOutput { outputHash, outputName }; successP->builtOutputs.insert_or_assign( std::move(outputName), - Realisation { drvOutput, *outputPath }); + Realisation { {.outPath = *outputPath}, drvOutput }); } } } diff --git a/src/hydra-queue-runner/hydra-queue-runner.cc b/src/hydra-queue-runner/hydra-queue-runner.cc index 7cdc04b3..1dada304 100644 --- a/src/hydra-queue-runner/hydra-queue-runner.cc +++ b/src/hydra-queue-runner/hydra-queue-runner.cc @@ -537,12 +537,12 @@ void State::notifyBuildFinished(pqxx::work & txn, BuildID buildId, std::shared_ptr State::acquireGlobalLock() { - Path lockPath = hydraData + "/queue-runner/lock"; + auto lockPath = std::filesystem::path(hydraData) / "queue-runner/lock"; - createDirs(dirOf(lockPath)); + createDirs(lockPath.parent_path()); auto lock = std::make_shared(); - if (!lock->lockPaths(PathSet({lockPath}), "", false)) return 0; + if (!lock->lockPaths({lockPath}, "", false)) return 0; return lock; } diff --git a/src/hydra-queue-runner/queue-monitor.cc b/src/hydra-queue-runner/queue-monitor.cc index 7630230c..1a7c7898 100644 --- a/src/hydra-queue-runner/queue-monitor.cc +++ b/src/hydra-queue-runner/queue-monitor.cc @@ -1,5 +1,6 @@ #include "state.hh" #include "hydra-build-result.hh" +#include #include #include #include @@ -487,24 +488,24 @@ Step::ptr State::createStep(ref destStore, it's not runnable yet, and other threads won't make it runnable while step->created == false. */ step->drv = std::make_unique(localStore->readDerivation(drvPath)); - { - try { - step->drvOptions = std::make_unique( - DerivationOptions::fromStructuredAttrs( - step->drv->env, - step->drv->structuredAttrs ? &*step->drv->structuredAttrs : nullptr)); - } catch (Error & e) { - e.addTrace({}, "while parsing derivation '%s'", localStore->printStorePath(drvPath)); - throw; - } + DerivationOptions drvOptions; + try { + drvOptions = derivationOptionsFromStructuredAttrs( + *localStore, + step->drv->inputDrvs, + step->drv->env, + get(step->drv->structuredAttrs)); + } catch (Error & e) { + e.addTrace({}, "while parsing derivation '%s'", localStore->printStorePath(drvPath)); + throw; } - step->preferLocalBuild = step->drvOptions->willBuildLocally(*localStore, *step->drv); + step->preferLocalBuild = drvOptions.willBuildLocally(*localStore, *step->drv); step->isDeterministic = getOr(step->drv->env, "isDetermistic", "0") == "1"; step->systemType = step->drv->platform; { - StringSet features = step->requiredSystemFeatures = step->drvOptions->getRequiredSystemFeatures(*step->drv); + StringSet features = step->requiredSystemFeatures = drvOptions.getRequiredSystemFeatures(*step->drv); if (step->preferLocalBuild) features.insert("local"); if (!features.empty()) { diff --git a/src/hydra-queue-runner/state.hh b/src/hydra-queue-runner/state.hh index eee042e2..054d989b 100644 --- a/src/hydra-queue-runner/state.hh +++ b/src/hydra-queue-runner/state.hh @@ -172,7 +172,6 @@ struct Step nix::StorePath drvPath; std::unique_ptr drv; - std::unique_ptr drvOptions; nix::StringSet requiredSystemFeatures; bool preferLocalBuild; bool isDeterministic;