1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, gevent
5, pytestCheckHook
6, watchdog
7}:
8
9buildPythonPackage rec {
10 pname = "watchdog-gevent";
11 version = "0.1.1";
12 format = "setuptools";
13
14 # Need to fetch from github because tests are not present in pypi
15 src = fetchFromGitHub {
16 owner = "Bogdanp";
17 repo = "watchdog_gevent";
18 rev = "v${version}";
19 hash = "sha256-FESm3fNuLmOg2ilI/x8U9LuAimHLnahcTHYzW/nzOVY=";
20 };
21
22 propagatedBuildInputs = [ watchdog gevent ];
23
24 postPatch = ''
25 sed -i setup.cfg \
26 -e 's:--cov watchdog_gevent::' \
27 -e 's:--cov-report html::'
28 '';
29
30 nativeCheckInputs = [ pytestCheckHook ];
31
32 pythonImportsCheck = [ "watchdog_gevent" ];
33
34 meta = with lib; {
35 description = "A gevent-based observer for watchdog";
36 homepage = "https://github.com/Bogdanp/watchdog_gevent";
37 license = licenses.asl20;
38 maintainers = with maintainers; [ traxys ];
39 };
40}