diff --git a/flake.lock b/flake.lock index 8055275b..1d78e0c1 100644 --- a/flake.lock +++ b/flake.lock @@ -1,26 +1,5 @@ { "nodes": { - "flake-parts": { - "inputs": { - "nixpkgs-lib": [ - "nix-eval-jobs", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1722555600, - "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, "libgit2": { "flake": false, "locked": { @@ -53,40 +32,32 @@ "nixpkgs-regression": [] }, "locked": { - "lastModified": 1726787955, - "narHash": "sha256-XFznzb8L4SdUm9u+w3DPpMWJhffuv+/6+aiVl00slns=", + "lastModified": 1739390454, + "narHash": "sha256-mIpJgIwPS4o4xYhN1B+/fHESEXoxpu6nVoZTzZ0MfTg=", "owner": "NixOS", "repo": "nix", - "rev": "a7fdef6858dd45b9d7bda7c92324c63faee7f509", + "rev": "d652513e4519ed4eb48c92f8670e5a71c7793fc3", "type": "github" }, "original": { "owner": "NixOS", - "ref": "2.24-maintenance", + "ref": "2.25-maintenance", "repo": "nix", "type": "github" } }, "nix-eval-jobs": { - "inputs": { - "flake-parts": "flake-parts", - "nix-github-actions": [], - "nixpkgs": [ - "nixpkgs" - ], - "treefmt-nix": "treefmt-nix" - }, + "flake": false, "locked": { - "lastModified": 1733814344, - "narHash": "sha256-3wwtKpS5tUBdjaGeSia7CotonbiRB6K5Kp0dsUt3nzU=", + "lastModified": 1739426028, + "narHash": "sha256-1dZLPw+nlFQzzswfyTxW+8VF1AJ4ZvoYvLTjlHiz1SA=", "owner": "nix-community", "repo": "nix-eval-jobs", - "rev": "889ea1406736b53cf165b6c28398aae3969418d1", + "rev": "6d4fd5a93d7bc953ffa4dcd6d53ad7056a71eff7", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-2.24", "repo": "nix-eval-jobs", "type": "github" } @@ -114,27 +85,6 @@ "nix-eval-jobs": "nix-eval-jobs", "nixpkgs": "nixpkgs" } - }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "nix-eval-jobs", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1723303070, - "narHash": "sha256-krGNVA30yptyRonohQ+i9cnK+CfCpedg6z3qzqVJcTs=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "14c092e0326de759e16b37535161b3cb9770cea3", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index f12b8c2f..6e2d51a2 100644 --- a/flake.nix +++ b/flake.nix @@ -3,23 +3,29 @@ inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05-small"; - inputs.libgit2 = { url = "github:libgit2/libgit2/v1.8.1"; flake = false; }; - inputs.nix.url = "github:NixOS/nix/2.24-maintenance"; - inputs.nix.inputs.nixpkgs.follows = "nixpkgs"; - inputs.nix.inputs.libgit2.follows = "libgit2"; + inputs.libgit2 = { + url = "github:libgit2/libgit2/v1.8.1"; + flake = false; + }; - inputs.nix-eval-jobs.url = "github:nix-community/nix-eval-jobs/release-2.24"; - inputs.nix-eval-jobs.inputs.nixpkgs.follows = "nixpkgs"; + inputs.nix = { + url = "github:NixOS/nix/2.25-maintenance"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.libgit2.follows = "libgit2"; - # hide nix dev tooling from our lock file - inputs.nix.inputs.flake-parts.follows = ""; - inputs.nix.inputs.git-hooks-nix.follows = ""; - inputs.nix.inputs.nixpkgs-regression.follows = ""; - inputs.nix.inputs.nixpkgs-23-11.follows = ""; - inputs.nix.inputs.flake-compat.follows = ""; + # hide nix dev tooling from our lock file + inputs.flake-parts.follows = ""; + inputs.git-hooks-nix.follows = ""; + inputs.nixpkgs-regression.follows = ""; + inputs.nixpkgs-23-11.follows = ""; + inputs.flake-compat.follows = ""; + }; - # hide nix-eval-jobs dev tooling from our lock file - inputs.nix-eval-jobs.inputs.nix-github-actions.follows = ""; + inputs.nix-eval-jobs = { + url = "github:nix-community/nix-eval-jobs"; + # We want to control the deps precisely + flake = false; + }; outputs = { self, nixpkgs, nix, nix-eval-jobs, ... }: let @@ -30,9 +36,9 @@ # A Nixpkgs overlay that provides a 'hydra' package. overlays.default = final: prev: { + nix-eval-jobs = final.callPackage nix-eval-jobs {}; hydra = final.callPackage ./package.nix { inherit (nixpkgs.lib) fileset; - nix-eval-jobs = nix-eval-jobs.packages.${final.system}.default; rawSrc = self; nix-perl-bindings = final.nixComponents.nix-perl-bindings; }; @@ -74,9 +80,12 @@ }); packages = forEachSystem (system: { + nix-eval-jobs = nixpkgs.legacyPackages.${system}.callPackage nix-eval-jobs { + nix = nix.packages.${system}.nix; + }; hydra = nixpkgs.legacyPackages.${system}.callPackage ./package.nix { inherit (nixpkgs.lib) fileset; - nix-eval-jobs = nix-eval-jobs.packages.${system}.default; + inherit (self.packages.${system}) nix-eval-jobs; rawSrc = self; nix = nix.packages.${system}.nix; nix-perl-bindings = nix.hydraJobs.perlBindings.${system}; diff --git a/src/hydra-queue-runner/build-remote.cc b/src/hydra-queue-runner/build-remote.cc index 6fda96e6..27de0496 100644 --- a/src/hydra-queue-runner/build-remote.cc +++ b/src/hydra-queue-runner/build-remote.cc @@ -1,3 +1,5 @@ +#include + #include "build-result.hh" #include "serve-protocol.hh" #include "serve-protocol-impl.hh" diff --git a/src/hydra-queue-runner/builder.cc b/src/hydra-queue-runner/builder.cc index 4db84d69..742093ae 100644 --- a/src/hydra-queue-runner/builder.cc +++ b/src/hydra-queue-runner/builder.cc @@ -179,7 +179,7 @@ State::StepResult State::doBuildStep(nix::ref destStore, unlink(result.logFile.c_str()); } } catch (...) { - ignoreException(); + ignoreExceptionInDestructor(); } } });