`/dev/tty` not available in `checkPhase` when writing my first derivation

I now opened a pull request for this:
https://github.com/NixOS/nixpkgs/pull/107057