Merge pull request #1461 from NixOS/nix-2.28

Nix 2.28
This commit is contained in:
John Ericson 2025-04-07 11:52:45 -04:00 committed by GitHub
commit 1d2d3ae6b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
18 changed files with 92 additions and 101 deletions

15
flake.lock generated
View File

@ -12,16 +12,16 @@
"nixpkgs-regression": [] "nixpkgs-regression": []
}, },
"locked": { "locked": {
"lastModified": 1744029599, "lastModified": 1744030329,
"narHash": "sha256-u6RhBWQ1XohTZ4Ub5ml1PTcaxQgtqFNng6Sohy1rojw=", "narHash": "sha256-r+psCOW77vTSTNbxTVrYHeh6OgB0QukbnyUVDwg8s4I=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nix", "repo": "nix",
"rev": "d0f98c76f962147610489e84c10033ca92e9c532", "rev": "a4962f73b5fc874d4b16baef47921daf349addfc",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "2.27-maintenance", "ref": "2.28-maintenance",
"repo": "nix", "repo": "nix",
"type": "github" "type": "github"
} }
@ -29,16 +29,15 @@
"nix-eval-jobs": { "nix-eval-jobs": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1744009874, "lastModified": 1744018595,
"narHash": "sha256-PypQspB7h7EENe4RQQUQj2Ay8J1+O49AKNO9JbAU4Ek=", "narHash": "sha256-v5n6t49X7MOpqS9j0FtI6TWOXvxuZMmGsp2OfUK5QfA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-eval-jobs", "repo": "nix-eval-jobs",
"rev": "62f9c9e8d00d2ff6ab27a6197ab459a8e0808e59", "rev": "cba718bafe5dc1607c2b6761ecf53c641a6f3b21",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "v2.27.0",
"repo": "nix-eval-jobs", "repo": "nix-eval-jobs",
"type": "github" "type": "github"
} }

View File

@ -4,7 +4,7 @@
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11-small"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11-small";
inputs.nix = { inputs.nix = {
url = "github:NixOS/nix/2.27-maintenance"; url = "github:NixOS/nix/2.28-maintenance";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
# hide nix dev tooling from our lock file # hide nix dev tooling from our lock file
@ -16,7 +16,7 @@
}; };
inputs.nix-eval-jobs = { 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 # We want to control the deps precisely
flake = false; flake = false;
}; };
@ -34,7 +34,6 @@
hydra = final.callPackage ./package.nix { hydra = final.callPackage ./package.nix {
inherit (nixpkgs.lib) fileset; inherit (nixpkgs.lib) fileset;
rawSrc = self; rawSrc = self;
nix-perl-bindings = final.nixComponents.nix-perl-bindings;
}; };
}; };
@ -73,21 +72,29 @@
validate-openapi = hydraJobs.tests.validate-openapi.${system}; validate-openapi = hydraJobs.tests.validate-openapi.${system};
}); });
packages = forEachSystem (system: { packages = forEachSystem (system: let
nix-eval-jobs = nixpkgs.legacyPackages.${system}.callPackage nix-eval-jobs { nixComponents = {
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;
inherit (nix.packages.${system}) inherit (nix.packages.${system})
nix-util nix-util
nix-store nix-store
nix-expr
nix-fetchers
nix-flake
nix-main nix-main
nix-cmd
nix-cli 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; default = self.packages.${system}.hydra;
}); });

View File

@ -12,20 +12,6 @@ nix_util_dep = dependency('nix-util', required: true)
nix_store_dep = dependency('nix-store', required: true) nix_store_dep = dependency('nix-store', required: true)
nix_main_dep = dependency('nix-main', 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) pqxx_dep = dependency('libpqxx', required: true)
prom_cpp_core_dep = dependency('prometheus-cpp-core', required: true) prom_cpp_core_dep = dependency('prometheus-cpp-core', required: true)

View File

@ -8,11 +8,7 @@
, perlPackages , perlPackages
, nix-util , nixComponents
, nix-store
, nix-main
, nix-cli
, nix-perl-bindings
, git , git
, makeWrapper , makeWrapper
@ -65,7 +61,7 @@ let
name = "hydra-perl-deps"; name = "hydra-perl-deps";
paths = lib.closePropagation paths = lib.closePropagation
([ ([
nix-perl-bindings nixComponents.nix-perl-bindings
git git
] ++ (with perlPackages; [ ] ++ (with perlPackages; [
AuthenSASL AuthenSASL
@ -165,7 +161,7 @@ stdenv.mkDerivation (finalAttrs: {
nukeReferences nukeReferences
pkg-config pkg-config
mdbook mdbook
nix-cli nixComponents.nix-cli
perlDeps perlDeps
perl perl
unzip unzip
@ -175,9 +171,9 @@ stdenv.mkDerivation (finalAttrs: {
libpqxx libpqxx
openssl openssl
libxslt libxslt
nix-util nixComponents.nix-util
nix-store nixComponents.nix-store
nix-main nixComponents.nix-main
perlDeps perlDeps
perl perl
boost boost
@ -204,14 +200,14 @@ stdenv.mkDerivation (finalAttrs: {
glibcLocales glibcLocales
libressl.nc libressl.nc
python3 python3
nix-cli nixComponents.nix-cli
]; ];
hydraPath = lib.makeBinPath ( hydraPath = lib.makeBinPath (
[ [
subversion subversion
openssh openssh
nix-cli nixComponents.nix-cli
coreutils coreutils
findutils findutils
pixz pixz
@ -272,7 +268,7 @@ stdenv.mkDerivation (finalAttrs: {
--prefix PATH ':' $out/bin:$hydraPath \ --prefix PATH ':' $out/bin:$hydraPath \
--set HYDRA_RELEASE ${version} \ --set HYDRA_RELEASE ${version} \
--set HYDRA_HOME $out/libexec/hydra \ --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"} --set NIX_EVAL_JOBS_RELEASE ${nix-eval-jobs.name or "unknown"}
done done
''; '';

View File

@ -1,8 +1,8 @@
#include "db.hh" #include "db.hh"
#include "hydra-config.hh" #include "hydra-config.hh"
#include "pool.hh" #include <nix/util/pool.hh>
#include "shared.hh" #include <nix/main/shared.hh>
#include "signals.hh" #include <nix/util/signals.hh>
#include <algorithm> #include <algorithm>
#include <thread> #include <thread>

View File

@ -2,7 +2,8 @@ hydra_evaluator = executable('hydra-evaluator',
'hydra-evaluator.cc', 'hydra-evaluator.cc',
dependencies: [ dependencies: [
libhydra_dep, libhydra_dep,
nix_dep, nix_util_dep,
nix_main_dep,
pqxx_dep, pqxx_dep,
], ],
install: true, install: true,

View File

@ -5,20 +5,20 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include "build-result.hh" #include <nix/store/build-result.hh>
#include "path.hh" #include <nix/store/path.hh>
#include "legacy-ssh-store.hh" #include <nix/store/legacy-ssh-store.hh>
#include "serve-protocol.hh" #include <nix/store/serve-protocol.hh>
#include "serve-protocol-impl.hh" #include <nix/store/serve-protocol-impl.hh>
#include "state.hh" #include "state.hh"
#include "current-process.hh" #include <nix/util/current-process.hh>
#include "processes.hh" #include <nix/util/processes.hh>
#include "util.hh" #include <nix/util/util.hh>
#include "serve-protocol.hh" #include <nix/store/serve-protocol.hh>
#include "serve-protocol-impl.hh" #include <nix/store/serve-protocol-impl.hh>
#include "ssh.hh" #include <nix/store/ssh.hh>
#include "finally.hh" #include <nix/util/finally.hh>
#include "url.hh" #include <nix/util/url.hh>
using namespace nix; using namespace nix;

View File

@ -1,7 +1,7 @@
#include "hydra-build-result.hh" #include "hydra-build-result.hh"
#include "store-api.hh" #include <nix/store/store-api.hh>
#include "util.hh" #include <nix/util/util.hh>
#include "source-accessor.hh" #include <nix/util/source-accessor.hh>
#include <regex> #include <regex>

View File

@ -2,8 +2,8 @@
#include "state.hh" #include "state.hh"
#include "hydra-build-result.hh" #include "hydra-build-result.hh"
#include "finally.hh" #include <nix/util/finally.hh>
#include "binary-cache-store.hh" #include <nix/store/binary-cache-store.hh>
using namespace nix; using namespace nix;

View File

@ -2,9 +2,9 @@
#include <memory> #include <memory>
#include "hash.hh" #include <nix/util/hash.hh>
#include "derivations.hh" #include <nix/store/derivations.hh>
#include "store-api.hh" #include <nix/store/store-api.hh>
#include "nar-extractor.hh" #include "nar-extractor.hh"
struct BuildProduct struct BuildProduct

View File

@ -11,16 +11,16 @@
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
#include "signals.hh" #include <nix/util/signals.hh>
#include "state.hh" #include "state.hh"
#include "hydra-build-result.hh" #include "hydra-build-result.hh"
#include "store-api.hh" #include <nix/store/store-api.hh>
#include "remote-store.hh" #include <nix/store/remote-store.hh>
#include "globals.hh" #include <nix/store/globals.hh>
#include "hydra-config.hh" #include "hydra-config.hh"
#include "s3-binary-cache-store.hh" #include <nix/store/s3-binary-cache-store.hh>
#include "shared.hh" #include <nix/main/shared.hh>
using namespace nix; using namespace nix;
using nlohmann::json; using nlohmann::json;

View File

@ -13,7 +13,9 @@ hydra_queue_runner = executable('hydra-queue-runner',
srcs, srcs,
dependencies: [ dependencies: [
libhydra_dep, libhydra_dep,
nix_dep, nix_util_dep,
nix_store_dep,
nix_main_dep,
pqxx_dep, pqxx_dep,
prom_cpp_core_dep, prom_cpp_core_dep,
prom_cpp_pull_dep, prom_cpp_pull_dep,

View File

@ -1,6 +1,6 @@
#include "nar-extractor.hh" #include "nar-extractor.hh"
#include "archive.hh" #include <nix/util/archive.hh>
#include <unordered_set> #include <unordered_set>

View File

@ -1,9 +1,9 @@
#pragma once #pragma once
#include "source-accessor.hh" #include <nix/util/source-accessor.hh>
#include "types.hh" #include <nix/util/types.hh>
#include "serialise.hh" #include <nix/util/serialise.hh>
#include "hash.hh" #include <nix/util/hash.hh>
struct NarMemberData struct NarMemberData
{ {

View File

@ -1,7 +1,7 @@
#include "state.hh" #include "state.hh"
#include "hydra-build-result.hh" #include "hydra-build-result.hh"
#include "globals.hh" #include <nix/store/globals.hh>
#include "parsed-derivations.hh" #include <nix/store/parsed-derivations.hh>
#include <cstring> #include <cstring>

View File

@ -13,18 +13,18 @@
#include "db.hh" #include "db.hh"
#include "derivations.hh" #include <nix/store/derivations.hh>
#include "derivation-options.hh" #include <nix/store/derivation-options.hh>
#include "pathlocks.hh" #include <nix/store/pathlocks.hh>
#include "pool.hh" #include <nix/util/pool.hh>
#include "build-result.hh" #include <nix/store/build-result.hh>
#include "store-api.hh" #include <nix/store/store-api.hh>
#include "sync.hh" #include <nix/util/sync.hh>
#include "nar-extractor.hh" #include "nar-extractor.hh"
#include "serve-protocol.hh" #include <nix/store/serve-protocol.hh>
#include "serve-protocol-impl.hh" #include <nix/store/serve-protocol-impl.hh>
#include "serve-protocol-connection.hh" #include <nix/store/serve-protocol-connection.hh>
#include "machines.hh" #include <nix/store/machines.hh>
typedef unsigned int BuildID; typedef unsigned int BuildID;

View File

@ -2,8 +2,8 @@
#include <pqxx/pqxx> #include <pqxx/pqxx>
#include "environment-variables.hh" #include <nix/util/environment-variables.hh>
#include "util.hh" #include <nix/util/util.hh>
struct Connection : pqxx::connection struct Connection : pqxx::connection

View File

@ -2,8 +2,8 @@
#include <map> #include <map>
#include "file-system.hh" #include <nix/util/file-system.hh>
#include "util.hh" #include <nix/util/util.hh>
struct HydraConfig struct HydraConfig
{ {