diff --git a/flake.lock b/flake.lock index f1744039..3a7a1672 100644 --- a/flake.lock +++ b/flake.lock @@ -12,16 +12,16 @@ "nixpkgs-regression": [] }, "locked": { - "lastModified": 1744029599, - "narHash": "sha256-u6RhBWQ1XohTZ4Ub5ml1PTcaxQgtqFNng6Sohy1rojw=", + "lastModified": 1744030329, + "narHash": "sha256-r+psCOW77vTSTNbxTVrYHeh6OgB0QukbnyUVDwg8s4I=", "owner": "NixOS", "repo": "nix", - "rev": "d0f98c76f962147610489e84c10033ca92e9c532", + "rev": "a4962f73b5fc874d4b16baef47921daf349addfc", "type": "github" }, "original": { "owner": "NixOS", - "ref": "2.27-maintenance", + "ref": "2.28-maintenance", "repo": "nix", "type": "github" } @@ -29,16 +29,15 @@ "nix-eval-jobs": { "flake": false, "locked": { - "lastModified": 1744009874, - "narHash": "sha256-PypQspB7h7EENe4RQQUQj2Ay8J1+O49AKNO9JbAU4Ek=", + "lastModified": 1744018595, + "narHash": "sha256-v5n6t49X7MOpqS9j0FtI6TWOXvxuZMmGsp2OfUK5QfA=", "owner": "nix-community", "repo": "nix-eval-jobs", - "rev": "62f9c9e8d00d2ff6ab27a6197ab459a8e0808e59", + "rev": "cba718bafe5dc1607c2b6761ecf53c641a6f3b21", "type": "github" }, "original": { "owner": "nix-community", - "ref": "v2.27.0", "repo": "nix-eval-jobs", "type": "github" } diff --git a/flake.nix b/flake.nix index 5a305ca0..dc1d1b8a 100644 --- a/flake.nix +++ b/flake.nix @@ -4,7 +4,7 @@ inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11-small"; inputs.nix = { - url = "github:NixOS/nix/2.27-maintenance"; + url = "github:NixOS/nix/2.28-maintenance"; inputs.nixpkgs.follows = "nixpkgs"; # hide nix dev tooling from our lock file @@ -16,7 +16,7 @@ }; inputs.nix-eval-jobs = { - url = "github:nix-community/nix-eval-jobs/v2.27.0"; + url = "github:nix-community/nix-eval-jobs"; # We want to control the deps precisely flake = false; }; @@ -34,7 +34,6 @@ hydra = final.callPackage ./package.nix { inherit (nixpkgs.lib) fileset; rawSrc = self; - nix-perl-bindings = final.nixComponents.nix-perl-bindings; }; }; @@ -73,21 +72,29 @@ validate-openapi = hydraJobs.tests.validate-openapi.${system}; }); - 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; - inherit (self.packages.${system}) nix-eval-jobs; - rawSrc = self; + packages = forEachSystem (system: let + nixComponents = { inherit (nix.packages.${system}) nix-util nix-store + nix-expr + nix-fetchers + nix-flake nix-main + nix-cmd nix-cli + nix-perl-bindings ; - nix-perl-bindings = nix.hydraJobs.perlBindings.${system}; + }; + in { + nix-eval-jobs = nixpkgs.legacyPackages.${system}.callPackage nix-eval-jobs { + inherit nixComponents; + }; + hydra = nixpkgs.legacyPackages.${system}.callPackage ./package.nix { + inherit (nixpkgs.lib) fileset; + inherit nixComponents; + inherit (self.packages.${system}) nix-eval-jobs; + rawSrc = self; }; default = self.packages.${system}.hydra; }); diff --git a/meson.build b/meson.build index 9c9c09a1..c1eb577b 100644 --- a/meson.build +++ b/meson.build @@ -12,20 +12,6 @@ nix_util_dep = dependency('nix-util', required: true) nix_store_dep = dependency('nix-store', required: true) nix_main_dep = dependency('nix-main', required: true) -# Nix need extra flags not provided in its pkg-config files. -nix_dep = declare_dependency( - dependencies: [ - nix_util_dep, - nix_store_dep, - nix_main_dep, - ], - compile_args: [ - '-include', 'nix/config-util.hh', - '-include', 'nix/config-store.hh', - '-include', 'nix/config-main.hh', - ], -) - pqxx_dep = dependency('libpqxx', required: true) prom_cpp_core_dep = dependency('prometheus-cpp-core', required: true) diff --git a/package.nix b/package.nix index 07701bc9..8bf6a199 100644 --- a/package.nix +++ b/package.nix @@ -8,11 +8,7 @@ , perlPackages -, nix-util -, nix-store -, nix-main -, nix-cli -, nix-perl-bindings +, nixComponents , git , makeWrapper @@ -65,7 +61,7 @@ let name = "hydra-perl-deps"; paths = lib.closePropagation ([ - nix-perl-bindings + nixComponents.nix-perl-bindings git ] ++ (with perlPackages; [ AuthenSASL @@ -165,7 +161,7 @@ stdenv.mkDerivation (finalAttrs: { nukeReferences pkg-config mdbook - nix-cli + nixComponents.nix-cli perlDeps perl unzip @@ -175,9 +171,9 @@ stdenv.mkDerivation (finalAttrs: { libpqxx openssl libxslt - nix-util - nix-store - nix-main + nixComponents.nix-util + nixComponents.nix-store + nixComponents.nix-main perlDeps perl boost @@ -204,14 +200,14 @@ stdenv.mkDerivation (finalAttrs: { glibcLocales libressl.nc python3 - nix-cli + nixComponents.nix-cli ]; hydraPath = lib.makeBinPath ( [ subversion openssh - nix-cli + nixComponents.nix-cli coreutils findutils pixz @@ -272,7 +268,7 @@ stdenv.mkDerivation (finalAttrs: { --prefix PATH ':' $out/bin:$hydraPath \ --set HYDRA_RELEASE ${version} \ --set HYDRA_HOME $out/libexec/hydra \ - --set NIX_RELEASE ${nix-cli.name or "unknown"} \ + --set NIX_RELEASE ${nixComponents.nix-cli.name or "unknown"} \ --set NIX_EVAL_JOBS_RELEASE ${nix-eval-jobs.name or "unknown"} done ''; diff --git a/src/hydra-evaluator/hydra-evaluator.cc b/src/hydra-evaluator/hydra-evaluator.cc index 9312d085..52664188 100644 --- a/src/hydra-evaluator/hydra-evaluator.cc +++ b/src/hydra-evaluator/hydra-evaluator.cc @@ -1,8 +1,8 @@ #include "db.hh" #include "hydra-config.hh" -#include "pool.hh" -#include "shared.hh" -#include "signals.hh" +#include +#include +#include #include #include diff --git a/src/hydra-evaluator/meson.build b/src/hydra-evaluator/meson.build index b3dc542e..53ddc354 100644 --- a/src/hydra-evaluator/meson.build +++ b/src/hydra-evaluator/meson.build @@ -2,7 +2,8 @@ hydra_evaluator = executable('hydra-evaluator', 'hydra-evaluator.cc', dependencies: [ libhydra_dep, - nix_dep, + nix_util_dep, + nix_main_dep, pqxx_dep, ], install: true, diff --git a/src/hydra-queue-runner/build-remote.cc b/src/hydra-queue-runner/build-remote.cc index 77bde2c4..79c32d46 100644 --- a/src/hydra-queue-runner/build-remote.cc +++ b/src/hydra-queue-runner/build-remote.cc @@ -5,20 +5,20 @@ #include #include -#include "build-result.hh" -#include "path.hh" -#include "legacy-ssh-store.hh" -#include "serve-protocol.hh" -#include "serve-protocol-impl.hh" +#include +#include +#include +#include +#include #include "state.hh" -#include "current-process.hh" -#include "processes.hh" -#include "util.hh" -#include "serve-protocol.hh" -#include "serve-protocol-impl.hh" -#include "ssh.hh" -#include "finally.hh" -#include "url.hh" +#include +#include +#include +#include +#include +#include +#include +#include using namespace nix; diff --git a/src/hydra-queue-runner/build-result.cc b/src/hydra-queue-runner/build-result.cc index ffdc37b7..b0695e8b 100644 --- a/src/hydra-queue-runner/build-result.cc +++ b/src/hydra-queue-runner/build-result.cc @@ -1,7 +1,7 @@ #include "hydra-build-result.hh" -#include "store-api.hh" -#include "util.hh" -#include "source-accessor.hh" +#include +#include +#include #include diff --git a/src/hydra-queue-runner/builder.cc b/src/hydra-queue-runner/builder.cc index 4bc00f0c..018215a5 100644 --- a/src/hydra-queue-runner/builder.cc +++ b/src/hydra-queue-runner/builder.cc @@ -2,8 +2,8 @@ #include "state.hh" #include "hydra-build-result.hh" -#include "finally.hh" -#include "binary-cache-store.hh" +#include +#include using namespace nix; diff --git a/src/hydra-queue-runner/hydra-build-result.hh b/src/hydra-queue-runner/hydra-build-result.hh index 7d47f67c..654bf1be 100644 --- a/src/hydra-queue-runner/hydra-build-result.hh +++ b/src/hydra-queue-runner/hydra-build-result.hh @@ -2,9 +2,9 @@ #include -#include "hash.hh" -#include "derivations.hh" -#include "store-api.hh" +#include +#include +#include #include "nar-extractor.hh" struct BuildProduct diff --git a/src/hydra-queue-runner/hydra-queue-runner.cc b/src/hydra-queue-runner/hydra-queue-runner.cc index 99411f9f..64a98797 100644 --- a/src/hydra-queue-runner/hydra-queue-runner.cc +++ b/src/hydra-queue-runner/hydra-queue-runner.cc @@ -11,16 +11,16 @@ #include -#include "signals.hh" +#include #include "state.hh" #include "hydra-build-result.hh" -#include "store-api.hh" -#include "remote-store.hh" +#include +#include -#include "globals.hh" +#include #include "hydra-config.hh" -#include "s3-binary-cache-store.hh" -#include "shared.hh" +#include +#include using namespace nix; using nlohmann::json; diff --git a/src/hydra-queue-runner/meson.build b/src/hydra-queue-runner/meson.build index 1c20299f..27dad2c0 100644 --- a/src/hydra-queue-runner/meson.build +++ b/src/hydra-queue-runner/meson.build @@ -13,7 +13,9 @@ hydra_queue_runner = executable('hydra-queue-runner', srcs, dependencies: [ libhydra_dep, - nix_dep, + nix_util_dep, + nix_store_dep, + nix_main_dep, pqxx_dep, prom_cpp_core_dep, prom_cpp_pull_dep, diff --git a/src/hydra-queue-runner/nar-extractor.cc b/src/hydra-queue-runner/nar-extractor.cc index 8729dd39..3bf06ef3 100644 --- a/src/hydra-queue-runner/nar-extractor.cc +++ b/src/hydra-queue-runner/nar-extractor.cc @@ -1,6 +1,6 @@ #include "nar-extractor.hh" -#include "archive.hh" +#include #include diff --git a/src/hydra-queue-runner/nar-extractor.hh b/src/hydra-queue-runner/nar-extractor.hh index 2634135b..0060efe2 100644 --- a/src/hydra-queue-runner/nar-extractor.hh +++ b/src/hydra-queue-runner/nar-extractor.hh @@ -1,9 +1,9 @@ #pragma once -#include "source-accessor.hh" -#include "types.hh" -#include "serialise.hh" -#include "hash.hh" +#include +#include +#include +#include struct NarMemberData { diff --git a/src/hydra-queue-runner/queue-monitor.cc b/src/hydra-queue-runner/queue-monitor.cc index 7d747d3e..81bda873 100644 --- a/src/hydra-queue-runner/queue-monitor.cc +++ b/src/hydra-queue-runner/queue-monitor.cc @@ -1,7 +1,7 @@ #include "state.hh" #include "hydra-build-result.hh" -#include "globals.hh" -#include "parsed-derivations.hh" +#include +#include #include diff --git a/src/hydra-queue-runner/state.hh b/src/hydra-queue-runner/state.hh index e6c5f7df..8933720d 100644 --- a/src/hydra-queue-runner/state.hh +++ b/src/hydra-queue-runner/state.hh @@ -13,18 +13,18 @@ #include "db.hh" -#include "derivations.hh" -#include "derivation-options.hh" -#include "pathlocks.hh" -#include "pool.hh" -#include "build-result.hh" -#include "store-api.hh" -#include "sync.hh" +#include +#include +#include +#include +#include +#include +#include #include "nar-extractor.hh" -#include "serve-protocol.hh" -#include "serve-protocol-impl.hh" -#include "serve-protocol-connection.hh" -#include "machines.hh" +#include +#include +#include +#include typedef unsigned int BuildID; diff --git a/src/libhydra/db.hh b/src/libhydra/db.hh index 1e927573..c664a01d 100644 --- a/src/libhydra/db.hh +++ b/src/libhydra/db.hh @@ -2,8 +2,8 @@ #include -#include "environment-variables.hh" -#include "util.hh" +#include +#include struct Connection : pqxx::connection diff --git a/src/libhydra/hydra-config.hh b/src/libhydra/hydra-config.hh index b1275896..85c58746 100644 --- a/src/libhydra/hydra-config.hh +++ b/src/libhydra/hydra-config.hh @@ -2,8 +2,8 @@ #include -#include "file-system.hh" -#include "util.hh" +#include +#include struct HydraConfig {