From f7bf8f2095c82cb9c3c558af129d06121f5c8b3a Mon Sep 17 00:00:00 2001 From: 06kellyjac Date: Thu, 16 Oct 2025 11:26:52 +0100 Subject: [PATCH] maintainers/scripts/check-hydra-by-maintainer: use hydra-check already in path No need to use nix-shell too Also reuse built command for echo and run. Not using `set -x` so on exit/failure it doesn't continue to print excessive output. --- .../scripts/check-hydra-by-maintainer.nix | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/maintainers/scripts/check-hydra-by-maintainer.nix b/maintainers/scripts/check-hydra-by-maintainer.nix index fb57a31a5197..5107220820e5 100644 --- a/maintainers/scripts/check-hydra-by-maintainer.nix +++ b/maintainers/scripts/check-hydra-by-maintainer.nix @@ -58,11 +58,14 @@ pkgs.stdenvNoCC.mkDerivation { echo "----------------------------------------------------------------" exit 1 ''; - shellHook = '' - unset shellHook # do not contaminate nested shells - echo "Please stand by" - echo nix-shell -p hydra-check --run "hydra-check ${builtins.concatStringsSep " " packages}" - nix-shell -p hydra-check --run "hydra-check ${builtins.concatStringsSep " " packages}" - exit $? - ''; + shellHook = + let + command = "hydra-check ${lib.escapeShellArgs packages}"; + in + '' + echo "Please stand by" + echo "${command}" + ${command} + exit $? + ''; }