From 4182634002188c3c35aa2da2ab1102445010c030 Mon Sep 17 00:00:00 2001 From: Morgan Jones Date: Thu, 12 Mar 2026 23:38:49 -0700 Subject: [PATCH] yubihsm-shell: fix checkPhase race condition This passed locally but failed on hydra, guess my machine was too fast. --- pkgs/by-name/yu/yubihsm-shell/package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/by-name/yu/yubihsm-shell/package.nix b/pkgs/by-name/yu/yubihsm-shell/package.nix index 3cec92b5d7b7..f9214e5c4231 100644 --- a/pkgs/by-name/yu/yubihsm-shell/package.nix +++ b/pkgs/by-name/yu/yubihsm-shell/package.nix @@ -94,6 +94,12 @@ stdenv.mkDerivation (finalAttrs: { # so we expect a failure here, but it should at least try to connect yubihsm-connector -d &2 2>connector.log & yubihsm_pid=$! + idx=0 + while ! grep takeoff connector.log >/dev/null && [ $idx -lt 10 ]; do + idx=$((idx+1)) + echo "Waiting for yubihsm-connector startup (try: $idx)" >&2 + sleep 1 + done $out/bin/yubihsm-shell -Pv1 &2