depot/third_party/nixpkgs/pkgs/development/python-modules/pyscreeze/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

40 lines
894 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pillow,
xlib,
xvfb-run,
scrot,
}:
buildPythonPackage rec {
pname = "pyscreeze";
version = "0.1.26";
src = fetchFromGitHub {
owner = "asweigart";
repo = "pyscreeze";
rev = "28ab707dceecbdd135a9491c3f8effd3a69680af";
hash = "sha256-gn3ydjf/msdhIhngGlhK+jhEyFy0qGeDr58E7kM2YZs=";
};
pythonImportsCheck = [ "pyscreeze" ];
nativeCheckInputs = [
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 ];
};
}