pyscreeze: Run the checkPhase only for Linux

scrot, xlib and xvfb-run only supports Linux, so current checks does not
support other platforms. Disable checks for platforms other than Linux.

Changed files
+4 -2
pkgs
development
python-modules
pyscreeze
+4 -2
pkgs/development/python-modules/pyscreeze/default.nix
···
{
lib,
+
stdenv,
buildPythonPackage,
fetchFromGitHub,
pillow,
···
};
pythonImportsCheck = [ "pyscreeze" ];
-
nativeCheckInputs = [
+
doCheck = stdenv.hostPlatform.isLinux;
+
nativeCheckInputs = lib.optionals stdenv.hostPlatform.isLinux [
scrot
xlib
xvfb-run
];
-
checkPhase = ''
+
checkPhase = lib.optionalString stdenv.hostPlatform.isLinux ''
python -m unittest tests.test_pillow_unavailable
xvfb-run python -m unittest tests.test_pyscreeze
'';