about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/watchdog/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/watchdog/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/watchdog/default.nix24
1 files changed, 17 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/watchdog/default.nix b/nixpkgs/pkgs/development/python-modules/watchdog/default.nix
index 693cfcce9260..ef80dedeb98d 100644
--- a/nixpkgs/pkgs/development/python-modules/watchdog/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/watchdog/default.nix
@@ -1,25 +1,34 @@
-{ lib, stdenv
+{ lib
+, stdenv
 , buildPythonPackage
 , fetchPypi
+, fetchpatch
 , argh
 , pathtools
 , pyyaml
-, pkgs
 , pytest-cov
 , pytestCheckHook
+, CoreServices
 }:
 
 buildPythonPackage rec {
   pname = "watchdog";
-  version = "1.0.2";
+  version = "2.0.2";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-N2y8KjXAOSsP5/8W+8GzA/2Z1N2ZEatVge6daa3IiYI=";
+    sha256 = "sha256-Uy/t2ZPnVVRnH6o2zQTFgM7T+uCEJUp3mvu9iq8AVms=";
   };
 
-  buildInputs = lib.optionals stdenv.isDarwin
-    [ pkgs.darwin.apple_sdk.frameworks.CoreServices ];
+  patches = [
+    (fetchpatch {
+      # Fix test flakiness on Apple Silicon, remove after upgrade to 2.0.6.
+      url = "https://github.com/gorakhargosh/watchdog/commit/331fd7c2c819663be39bc146e78ce67553f265fa.patch";
+      sha256 = "sha256-pLkZmbPN3qRNHs53OP0HIyDxqYCPPo6yOcBLD3aO2YE=";
+    })
+  ];
+
+  buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];
 
   propagatedBuildInputs = [
     argh
@@ -39,6 +48,7 @@ buildPythonPackage rec {
     homepage = "https://github.com/gorakhargosh/watchdog";
     license = licenses.asl20;
     maintainers = with maintainers; [ goibhniu ];
+    # error: use of undeclared identifier 'kFSEventStreamEventFlagItemCloned'
+    broken = stdenv.isDarwin;
   };
-
 }