diff --git a/pkgs/development/python-modules/watchdog/default.nix b/pkgs/development/python-modules/watchdog/default.nix index dd17bcefa39f8..25c7cff87c363 100644 --- a/pkgs/development/python-modules/watchdog/default.nix +++ b/pkgs/development/python-modules/watchdog/default.nix @@ -2,7 +2,6 @@ lib, stdenv, buildPythonPackage, - CoreServices, eventlet, fetchPypi, flaky, @@ -11,6 +10,8 @@ pytestCheckHook, pythonOlder, pyyaml, + apple-sdk, + apple-sdk_11, }: buildPythonPackage rec { @@ -25,13 +26,9 @@ buildPythonPackage rec { hash = "sha256-tN+7bEkiG+RTViPqRHSk1u4KnO9KgLIMKNtNhYtk4nA="; }; - # force kqueue on x86_64-darwin, because our api version does - # not support fsevents - patches = lib.optionals (stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isAarch64) [ - ./force-kqueue.patch - ]; - - buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ]; + buildInputs = lib.optionals ( + stdenv.hostPlatform.isDarwin && lib.versionOlder apple-sdk.version "11" + ) [ apple-sdk_11 ]; optional-dependencies.watchmedo = [ pyyaml ]; diff --git a/pkgs/development/python-modules/watchdog/force-kqueue.patch b/pkgs/development/python-modules/watchdog/force-kqueue.patch deleted file mode 100644 index d4a0f4e6a00ee..0000000000000 --- a/pkgs/development/python-modules/watchdog/force-kqueue.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/setup.py b/setup.py -index 337e4be..55ef9a6 100644 ---- a/setup.py -+++ b/setup.py -@@ -38,7 +38,7 @@ _apple_devices = ("appletv", "iphone", "ipod", "ipad", "watch") - is_macos = sys.platform == "darwin" and not machine().lower().startswith(_apple_devices) - - ext_modules = [] --if is_macos or os.getenv("FORCE_MACOS_MACHINE", "0") == "1": -+if False: - ext_modules = [ - Extension( - name="_watchdog_fsevents", -diff --git a/tests/utils.py b/tests/utils.py -index 00dcf40..9fbc42a 100644 ---- a/tests/utils.py -+++ b/tests/utils.py -@@ -15,8 +15,6 @@ Emitter: Type[EventEmitter] - if sys.platform.startswith("linux"): - from watchdog.observers.inotify import InotifyEmitter as Emitter - from watchdog.observers.inotify import InotifyFullEmitter --elif sys.platform.startswith("darwin"): -- from watchdog.observers.fsevents import FSEventsEmitter as Emitter - elif sys.platform.startswith("win"): - from watchdog.observers.read_directory_changes import WindowsApiEmitter as Emitter - elif sys.platform.startswith(("dragonfly", "freebsd", "netbsd", "openbsd", "bsd")): diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 96d7f210d0b95..ccdd1a1ca30ec 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -17406,9 +17406,7 @@ self: super: with self; { wat = callPackage ../development/python-modules/wat { }; - watchdog = callPackage ../development/python-modules/watchdog { - inherit (pkgs.darwin.apple_sdk.frameworks) CoreServices; - }; + watchdog = callPackage ../development/python-modules/watchdog { }; watchdog-gevent = callPackage ../development/python-modules/watchdog-gevent { };