Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / watchdog / default.nix
blobef80dedeb98d5204c21b63a7e5b8b1360e2a4ebd
1 { lib
2 , stdenv
3 , buildPythonPackage
4 , fetchPypi
5 , fetchpatch
6 , argh
7 , pathtools
8 , pyyaml
9 , pytest-cov
10 , pytestCheckHook
11 , CoreServices
14 buildPythonPackage rec {
15   pname = "watchdog";
16   version = "2.0.2";
18   src = fetchPypi {
19     inherit pname version;
20     sha256 = "sha256-Uy/t2ZPnVVRnH6o2zQTFgM7T+uCEJUp3mvu9iq8AVms=";
21   };
23   patches = [
24     (fetchpatch {
25       # Fix test flakiness on Apple Silicon, remove after upgrade to 2.0.6.
26       url = "https://github.com/gorakhargosh/watchdog/commit/331fd7c2c819663be39bc146e78ce67553f265fa.patch";
27       sha256 = "sha256-pLkZmbPN3qRNHs53OP0HIyDxqYCPPo6yOcBLD3aO2YE=";
28     })
29   ];
31   buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];
33   propagatedBuildInputs = [
34     argh
35     pathtools
36     pyyaml
37   ];
39   checkInputs = [
40     pytest-cov
41     pytestCheckHook
42   ];
44   pythonImportsCheck = [ "watchdog" ];
46   meta = with lib; {
47     description = "Python API and shell utilities to monitor file system events";
48     homepage = "https://github.com/gorakhargosh/watchdog";
49     license = licenses.asl20;
50     maintainers = with maintainers; [ goibhniu ];
51     # error: use of undeclared identifier 'kFSEventStreamEventFlagItemCloned'
52     broken = stdenv.isDarwin;
53   };