nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 gevent,
6 pytestCheckHook,
7 setuptools,
8 watchdog,
9}:
10
11buildPythonPackage rec {
12 pname = "watchdog-gevent";
13 version = "0.2.1";
14 pyproject = true;
15
16 src = fetchPypi {
17 pname = "watchdog_gevent";
18 inherit version;
19 hash = "sha256-rmuU0PjIzhxZVs2GX2ErYfRWzxmAF0S7olo0n+jowzc=";
20 };
21
22 postPatch = ''
23 sed -i setup.cfg \
24 -e 's:--cov watchdog_gevent::' \
25 -e 's:--cov-report html::'
26
27 substituteInPlace tests/test_observer.py \
28 --replace-fail 'events == [FileModifiedEvent(__file__)]' 'FileModifiedEvent(__file__) in events'
29 '';
30
31 build-system = [ setuptools ];
32
33 dependencies = [
34 gevent
35 watchdog
36 ];
37
38 nativeCheckInputs = [ pytestCheckHook ];
39
40 pythonImportsCheck = [ "watchdog_gevent" ];
41
42 meta = {
43 description = "Gevent-based observer for watchdog";
44 homepage = "https://github.com/Bogdanp/watchdog_gevent";
45 license = lib.licenses.asl20;
46 maintainers = with lib.maintainers; [ traxys ];
47 };
48}