diff --git a/hydra-module.nix b/hydra-module.nix index 21e19f78..82edd5df 100644 --- a/hydra-module.nix +++ b/hydra-module.nix @@ -341,7 +341,7 @@ in { wantedBy = [ "multi-user.target" ]; requires = [ "hydra-init.service" ]; after = [ "hydra-init.service" "network.target" ]; - path = [ pkgs.nettools cfg.package ]; + path = with pkgs; [ nettools cfg.package jq ]; environment = env; serviceConfig = { ExecStart = "@${cfg.package}/bin/hydra-evaluator hydra-evaluator"; diff --git a/src/lib/Hydra/Plugin/GithubPulls.pm b/src/lib/Hydra/Plugin/GithubPulls.pm index 01b0d4f7..be3ae53b 100644 --- a/src/lib/Hydra/Plugin/GithubPulls.pm +++ b/src/lib/Hydra/Plugin/GithubPulls.pm @@ -55,7 +55,8 @@ sub fetchInput { open(my $fh, ">", $filename) or die "Cannot open $filename for writing: $!"; print $fh encode_json \%pulls; close $fh; - my $storePath = `nix-store --add "$filename"` + system("jq -S . < $filename > $tempdir/github-pulls-sorted.json"); + my $storePath = `nix-store --add "$tempdir/github-pulls-sorted.json"` or die "cannot copy path $filename to the Nix store.\n"; my $timestamp = time; return { storePath => $storePath, revision => strftime "%Y%m%d%H%M%S", gmtime($timestamp) };