Using pg_ctl status is more reliable than relying checking an open port via netcat.
pg_ctl status
DL7F4E4CV5RYRH7AT2NXOEGZGI4GI43NZSKSTXJ6MRJKPVJFL3LQC
LEQWZ3IJUNYXLBLYGRS5MJMXLSM5YHTMC2GJLVLHVLQGXMKUHADAC
RXJZO7EV5JTZHFIVF7Y3B5A3NIGOPOQQHBWMVFSJFLBDS6MJL6HAC
RWNXH3H26EQHKJNMP4DUJCJKUYQBMV347234ZLE26SIFTVLSUWXQC
KPWMZFHZXW5CEWXXTB4JDAJLOX42UNGKFULA3FAGQJAPSTSTFNKAC
buildInputs = old.buildInputs ++ [ pkgs.foreman pkgs.netcat ];
buildInputs = old.buildInputs ++ [ pkgs.foreman ];
{ foreman, mkShell, hydra, netcat, postgresql95 }:
{ foreman, mkShell, hydra, postgresql95 }:
foreman (hydra.overrideAttrs (_: { inherit doCheck; })) netcat postgresql95
foreman (hydra.overrideAttrs (_: { inherit doCheck; })) postgresql95
# wait for postgresql to listenwhile ! nc -z localhost 64444; do sleep 1; done
# wait for postgresql to listen
while ! nc -z localhost 64444; do sleep 1; done
# wait for postgresql to be upwhile ! pg_ctl -D $(pwd)/.hydra-data/postgres status; do sleep 1; done
# wait for postgresql to be up
while ! pg_ctl -D $(pwd)/.hydra-data/postgres status; do sleep 1; done