diff --git a/flake.nix b/flake.nix index da753c5f..dc3aaf5c 100644 --- a/flake.nix +++ b/flake.nix @@ -81,7 +81,12 @@ inherit (nixpkgs.lib) fileset; inherit (self.packages.${system}) nix-eval-jobs; rawSrc = self; - nix = nix.packages.${system}.nix; + inherit (nix.packages.${system}) + nix-util + nix-store + nix-main + nix-cli + ; nix-perl-bindings = nix.hydraJobs.perlBindings.${system}; }; default = self.packages.${system}.hydra; diff --git a/meson.build b/meson.build index b9327d51..9c9c09a1 100644 --- a/meson.build +++ b/meson.build @@ -8,22 +8,22 @@ project('hydra', 'cpp', ], ) +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_expr_dep = dependency('nix-expr', required: true) -nix_flake_dep = dependency('nix-flake', required: true) -nix_cmd_dep = dependency('nix-cmd', 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, - nix_expr_dep, - nix_flake_dep, - nix_cmd_dep, ], - compile_args: ['-include', 'nix/config.h'], + compile_args: [ + '-include', 'nix/config-util.hh', + '-include', 'nix/config-store.hh', + '-include', 'nix/config-main.hh', + ], ) pqxx_dep = dependency('libpqxx', required: true) diff --git a/package.nix b/package.nix index e0046024..12fac1d8 100644 --- a/package.nix +++ b/package.nix @@ -8,7 +8,10 @@ , perlPackages -, nix +, nix-util +, nix-store +, nix-main +, nix-cli , nix-perl-bindings , git @@ -162,7 +165,7 @@ stdenv.mkDerivation (finalAttrs: { nukeReferences pkg-config mdbook - nix + nix-cli perlDeps perl unzip @@ -172,7 +175,9 @@ stdenv.mkDerivation (finalAttrs: { libpqxx openssl libxslt - nix + nix-util + nix-store + nix-main perlDeps perl boost @@ -199,13 +204,14 @@ stdenv.mkDerivation (finalAttrs: { glibcLocales libressl.nc python3 + nix-cli ]; hydraPath = lib.makeBinPath ( [ subversion openssh - nix + nix-cli coreutils findutils pixz @@ -266,7 +272,7 @@ stdenv.mkDerivation (finalAttrs: { --prefix PATH ':' $out/bin:$hydraPath \ --set HYDRA_RELEASE ${version} \ --set HYDRA_HOME $out/libexec/hydra \ - --set NIX_RELEASE ${nix.name or "unknown"} \ + --set NIX_RELEASE ${nix-cli.name or "unknown"} \ --set NIX_EVAL_JOBS_RELEASE ${nix-eval-jobs.name or "unknown"} done ''; @@ -274,5 +280,5 @@ stdenv.mkDerivation (finalAttrs: { dontStrip = true; meta.description = "Build of Hydra on ${stdenv.system}"; - passthru = { inherit perlDeps nix; }; + passthru = { inherit perlDeps; }; }) diff --git a/t/meson.build b/t/meson.build index c3c58458..dd930dbd 100644 --- a/t/meson.build +++ b/t/meson.build @@ -27,6 +27,7 @@ testenv.prepend('PERL5LIB', separator: ':' ) testenv.prepend('PATH', + fs.parent(find_program('nix').full_path()), fs.parent(hydra_evaluator.full_path()), fs.parent(hydra_queue_runner.full_path()), meson.project_source_root() / 'src/script',