at master 1.1 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 pillow, 7 xlib, 8 xvfb-run, 9 scrot, 10}: 11buildPythonPackage { 12 pname = "pyscreeze"; 13 version = "0.1.26"; 14 format = "setuptools"; 15 16 src = fetchFromGitHub { 17 owner = "asweigart"; 18 repo = "pyscreeze"; 19 rev = "28ab707dceecbdd135a9491c3f8effd3a69680af"; 20 hash = "sha256-gn3ydjf/msdhIhngGlhK+jhEyFy0qGeDr58E7kM2YZs="; 21 }; 22 23 pythonImportsCheck = [ "pyscreeze" ]; 24 doCheck = stdenv.hostPlatform.isLinux; 25 nativeCheckInputs = lib.optionals stdenv.hostPlatform.isLinux [ 26 scrot 27 xlib 28 xvfb-run 29 ]; 30 checkPhase = lib.optionalString stdenv.hostPlatform.isLinux '' 31 python -m unittest tests.test_pillow_unavailable 32 xvfb-run python -m unittest tests.test_pyscreeze 33 ''; 34 35 propagatedBuildInputs = [ pillow ]; 36 37 meta = with lib; { 38 description = "PyScreeze is a simple, cross-platform screenshot module for Python 2 and 3"; 39 homepage = "https://github.com/asweigart/pyscreeze"; 40 license = licenses.bsd3; 41 maintainers = with maintainers; [ lucasew ]; 42 }; 43}