From e52be73c2dbd7bf50f44a7e9902dec2f6d257780 Mon Sep 17 00:00:00 2001 From: lucasew Date: Sat, 4 Dec 2021 07:34:15 -0300 Subject: [PATCH] pyscreeze: init at 0.1.26 Signed-off-by: lucasew --- .../python-modules/pyscreeze/default.nix | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pkgs/development/python-modules/pyscreeze/default.nix diff --git a/pkgs/development/python-modules/pyscreeze/default.nix b/pkgs/development/python-modules/pyscreeze/default.nix new file mode 100644 index 000000000000..ddca8e72c23f --- /dev/null +++ b/pkgs/development/python-modules/pyscreeze/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pillow +, xlib +, xvfb-run +, scrot +}: +buildPythonPackage rec { + pname = "PyScreeze"; + version = "0.1.26"; + + src = fetchFromGitHub { + owner = "asweigart"; + repo = "pyscreeze"; + rev = "28ab707dceecbdd135a9491c3f8effd3a69680af"; + sha256 = "sha256-gn3ydjf/msdhIhngGlhK+jhEyFy0qGeDr58E7kM2YZs="; + }; + + pythonImportsCheck = [ "pyscreeze" ]; + checkInputs = [ scrot xlib xvfb-run ]; + checkPhase = '' + python -m unittest tests.test_pillow_unavailable + xvfb-run python -m unittest tests.test_pyscreeze + ''; + + propagatedBuildInputs = [ + pillow + ]; + + meta = with lib; { + description = "PyScreeze is a simple, cross-platform screenshot module for Python 2 and 3."; + homepage = "https://github.com/asweigart/pyscreeze"; + license = licenses.bsd3; + maintainers = with maintainers; [ lucasew ]; + }; +}