1{ lib
2, stdenv
3, buildPythonPackage
4, fetchPypi
5, pathtools
6, pyyaml
7, flaky
8, pytest-timeout
9, pytestCheckHook
10, CoreServices
11}:
12
13buildPythonPackage rec {
14 pname = "watchdog";
15 version = "2.1.6";
16
17 src = fetchPypi {
18 inherit pname version;
19 sha256 = "sha256-o25132x2fL9G9hqRxws7pxgR36CspKMk2UB6Bqi3ouc=";
20 };
21
22 buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];
23
24 propagatedBuildInputs = [
25 pathtools
26 pyyaml
27 ];
28
29 checkInputs = [
30 flaky
31 pytest-timeout
32 pytestCheckHook
33 ];
34
35 postPatch = ''
36 substituteInPlace setup.cfg \
37 --replace "--cov=watchdog" "" \
38 --replace "--cov-report=term-missing" ""
39 '';
40
41 pythonImportsCheck = [ "watchdog" ];
42
43 meta = with lib; {
44 description = "Python API and shell utilities to monitor file system events";
45 homepage = "https://github.com/gorakhargosh/watchdog";
46 license = licenses.asl20;
47 maintainers = with maintainers; [ goibhniu ];
48 # error: use of undeclared identifier 'kFSEventStreamEventFlagItemCloned'
49 broken = stdenv.isDarwin;
50 };
51}