Skip to content

Commit

Permalink
hydra-eval-jobs: fix build against nix 2.24
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Sep 20, 2024
1 parent ae787e5 commit 0231453
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/hydra-eval-jobs/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bin_PROGRAMS = hydra-eval-jobs

hydra_eval_jobs_SOURCES = hydra-eval-jobs.cc
hydra_eval_jobs_LDADD = $(NIX_LIBS) -lnixcmd
hydra_eval_jobs_LDADD = $(NIX_LIBS) -lnixcmd -lnixflake
hydra_eval_jobs_CXXFLAGS = $(NIX_CFLAGS) -I ../libhydra
14 changes: 11 additions & 3 deletions src/hydra-eval-jobs/hydra-eval-jobs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "shared.hh"
#include "store-api.hh"
#include "eval.hh"
#include "eval-gc.hh"
#include "eval-inline.hh"
#include "eval-settings.hh"
#include "signals.hh"
Expand Down Expand Up @@ -125,11 +126,14 @@ static void worker(
if (myArgs.flake) {
using namespace flake;

auto flakeRef = parseFlakeRef(myArgs.releaseExpr);
auto [flakeRef, fragment, outputSpec] = parseFlakeRefWithFragmentAndExtendedOutputsSpec(fetchSettings, myArgs.releaseExpr, absPath("."));

auto vFlake = state.allocValue();

auto lockedFlake = lockFlake(state, flakeRef,
auto lockedFlake = lockFlake(
flakeSettings,
state,
flakeRef,
LockFlags {
.updateLockFile = false,
.useRegistries = false,
Expand Down Expand Up @@ -368,7 +372,11 @@ int main(int argc, char * * argv)
]()
{
try {
EvalState state(myArgs.lookupPath, openStore());
auto evalStore = myArgs.evalStoreUrl
? openStore(*myArgs.evalStoreUrl)
: openStore();
EvalState state(myArgs.lookupPath,
evalStore, fetchSettings, evalSettings);
Bindings & autoArgs = *myArgs.getAutoArgs(state);
worker(state, autoArgs, *to, *from);
} catch (Error & e) {
Expand Down

0 comments on commit 0231453

Please sign in to comment.