As in Nixpkgs, and from some reason, e.g pytest is not available for the builder’s python. Nixpkgs’ build succeeds, so I conclude that no such issue is present there. The full Nix code is here:
You are checking for pytest in configurePhase but since it is in checkInputs it will only be available in the checkPhase because strictDeps for all python building functions is enabled.
Your flake is locked to a commit beforenativeCheckInputs existed. (named just checkInputs at that point) Such renames are hard to deal with, unfortunately.