From cbe527a3ee6256de0c5bde5b10821f5095b60e22 Mon Sep 17 00:00:00 2001 From: leo60228 Date: Tue, 11 Jun 2024 11:27:43 -0400 Subject: [PATCH] util.hh split --- flake.lock | 37 ++++++++++++++++++------- src/hydra-eval-jobs/hydra-eval-jobs.cc | 2 +- src/hydra-evaluator/hydra-evaluator.cc | 1 + src/hydra-queue-runner/build-remote.cc | 2 +- src/hydra-queue-runner/build-result.cc | 1 - src/hydra-queue-runner/queue-monitor.cc | 1 + src/libhydra/db.hh | 3 +- src/libhydra/hydra-config.hh | 4 ++- 8 files changed, 36 insertions(+), 15 deletions(-) diff --git a/flake.lock b/flake.lock index 5f975b8e..0963b0c2 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "owner": "edolstra", "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "type": "github" }, "original": { @@ -19,6 +19,7 @@ "nix": { "inputs": { "flake-compat": "flake-compat", + "nix2container": "nix2container", "nixpkgs": [ "nixpkgs" ], @@ -26,11 +27,11 @@ "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "lastModified": 1716890497, - "narHash": "sha256-NH7keFO8/FpGZp5OLmmP5wPGRYZ+MtWfdZNa1HPmqUA=", + "lastModified": 1718081112, + "narHash": "sha256-3cpIVHuyo6yz9n7U/7U/p2Lmwjj1xHdTJR2RkT5JntY=", "ref": "refs/heads/main", - "rev": "71b32bb87cd48dbbd672c8ca6b041ed36f3bae11", - "revCount": 15662, + "rev": "8a3d063a494c4b8c767190a5ce3e4075a75f9d07", + "revCount": 15756, "type": "git", "url": "https://git@git.lix.systems/lix-project/lix" }, @@ -39,6 +40,22 @@ "url": "https://git@git.lix.systems/lix-project/lix" } }, + "nix2container": { + "flake": false, + "locked": { + "lastModified": 1712990762, + "narHash": "sha256-hO9W3w7NcnYeX8u8cleHiSpK2YJo7ecarFTUlbybl7k=", + "owner": "nlewo", + "repo": "nix2container", + "rev": "20aad300c925639d5d6cbe30013c8357ce9f2a2e", + "type": "github" + }, + "original": { + "owner": "nlewo", + "repo": "nix2container", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1715218190, @@ -74,11 +91,11 @@ "pre-commit-hooks": { "flake": false, "locked": { - "lastModified": 1714478972, - "narHash": "sha256-q//cgb52vv81uOuwz1LaXElp3XAe1TqrABXODAEF6Sk=", + "lastModified": 1712055707, + "narHash": "sha256-4XLvuSIDZJGS17xEwSrNuJLL7UjDYKGJSbK1WWX2AK8=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "2849da033884f54822af194400f8dff435ada242", + "rev": "e35aed5fda3cc79f88ed7f1795021e559582093a", "type": "github" }, "original": { diff --git a/src/hydra-eval-jobs/hydra-eval-jobs.cc b/src/hydra-eval-jobs/hydra-eval-jobs.cc index 3505af00..eb63e0f7 100644 --- a/src/hydra-eval-jobs/hydra-eval-jobs.cc +++ b/src/hydra-eval-jobs/hydra-eval-jobs.cc @@ -9,7 +9,7 @@ #include "eval-inline.hh" #include "eval-settings.hh" #include "signals.hh" -#include "util.hh" +#include "terminal.hh" #include "get-drvs.hh" #include "globals.hh" #include "lix/libcmd/common-eval-args.hh" diff --git a/src/hydra-evaluator/hydra-evaluator.cc b/src/hydra-evaluator/hydra-evaluator.cc index d99a826b..a99def2a 100644 --- a/src/hydra-evaluator/hydra-evaluator.cc +++ b/src/hydra-evaluator/hydra-evaluator.cc @@ -1,5 +1,6 @@ #include "db.hh" #include "hydra-config.hh" +#include "logging.hh" #include "pool.hh" #include "shared.hh" #include "signals.hh" diff --git a/src/hydra-queue-runner/build-remote.cc b/src/hydra-queue-runner/build-remote.cc index 459beed9..0902700c 100644 --- a/src/hydra-queue-runner/build-remote.cc +++ b/src/hydra-queue-runner/build-remote.cc @@ -6,10 +6,10 @@ #include #include "build-result.hh" +#include "current-process.hh" #include "path.hh" #include "serve-protocol.hh" #include "state.hh" -#include "util.hh" #include "serve-protocol.hh" #include "serve-protocol-impl.hh" #include "ssh.hh" diff --git a/src/hydra-queue-runner/build-result.cc b/src/hydra-queue-runner/build-result.cc index b5c99317..08c099f3 100644 --- a/src/hydra-queue-runner/build-result.cc +++ b/src/hydra-queue-runner/build-result.cc @@ -1,6 +1,5 @@ #include "hydra-build-result.hh" #include "store-api.hh" -#include "util.hh" #include "fs-accessor.hh" #include diff --git a/src/hydra-queue-runner/queue-monitor.cc b/src/hydra-queue-runner/queue-monitor.cc index a40cff17..bc58a8d0 100644 --- a/src/hydra-queue-runner/queue-monitor.cc +++ b/src/hydra-queue-runner/queue-monitor.cc @@ -4,6 +4,7 @@ #include "thread-pool.hh" #include +#include using namespace nix; diff --git a/src/libhydra/db.hh b/src/libhydra/db.hh index 7e28c3a7..44e08d4c 100644 --- a/src/libhydra/db.hh +++ b/src/libhydra/db.hh @@ -2,7 +2,8 @@ #include -#include "util.hh" +#include "strings.hh" +#include "environment-variables.hh" struct Connection : pqxx::connection diff --git a/src/libhydra/hydra-config.hh b/src/libhydra/hydra-config.hh index 1688c278..cd4c2330 100644 --- a/src/libhydra/hydra-config.hh +++ b/src/libhydra/hydra-config.hh @@ -2,7 +2,9 @@ #include -#include "util.hh" +#include "environment-variables.hh" +#include "file-system.hh" +#include "strings.hh" struct HydraConfig {