2021-03-12 07:09:13 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2021-03-09 03:18:52 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, argh
|
|
|
|
, pathtools
|
|
|
|
, pyyaml
|
2021-02-05 17:12:51 +00:00
|
|
|
, pytest-cov
|
|
|
|
, pytestCheckHook
|
2021-03-12 07:09:13 +00:00
|
|
|
, CoreServices
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "watchdog";
|
2021-03-09 03:18:52 +00:00
|
|
|
version = "2.0.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-03-09 03:18:52 +00:00
|
|
|
sha256 = "sha256-Uy/t2ZPnVVRnH6o2zQTFgM7T+uCEJUp3mvu9iq8AVms=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
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=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-03-12 07:09:13 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
argh
|
|
|
|
pathtools
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest-cov
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "watchdog" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python API and shell utilities to monitor file system events";
|
|
|
|
homepage = "https://github.com/gorakhargosh/watchdog";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ goibhniu ];
|
2021-03-12 07:09:13 +00:00
|
|
|
# error: use of undeclared identifier 'kFSEventStreamEventFlagItemCloned'
|
|
|
|
broken = stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|