2021-03-09 08:34:39 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2018-10-16 17:11:47 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pathtools
|
|
|
|
, pyyaml
|
2021-06-19 12:47:56 +00:00
|
|
|
, flaky
|
2021-05-29 14:29:24 +00:00
|
|
|
, pytest-timeout
|
2021-02-01 22:32:12 +00:00
|
|
|
, pytestCheckHook
|
2021-03-09 08:34:39 +00:00
|
|
|
, CoreServices
|
2018-10-16 17:11:47 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "watchdog";
|
2021-10-02 19:09:39 +00:00
|
|
|
version = "2.1.6";
|
2021-11-28 17:42:55 +00:00
|
|
|
format = "setuptools";
|
2018-10-16 17:11:47 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-10-02 19:09:39 +00:00
|
|
|
sha256 = "sha256-o25132x2fL9G9hqRxws7pxgR36CspKMk2UB6Bqi3ouc=";
|
2018-10-16 17:11:47 +00:00
|
|
|
};
|
|
|
|
|
2021-03-09 08:34:39 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];
|
2018-10-16 17:11:47 +00:00
|
|
|
|
2021-02-01 22:32:12 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
pathtools
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2021-06-19 12:47:56 +00:00
|
|
|
flaky
|
2021-05-29 14:29:24 +00:00
|
|
|
pytest-timeout
|
2021-02-01 22:32:12 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-04-23 21:27:11 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "--cov=watchdog" "" \
|
|
|
|
--replace "--cov-report=term-missing" ""
|
|
|
|
'';
|
|
|
|
|
2021-11-28 17:42:55 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Tests are flaky
|
|
|
|
"tests/test_inotify_buffer.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"watchdog"
|
|
|
|
];
|
2018-10-16 17:11:47 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-10-16 17:11:47 +00:00
|
|
|
description = "Python API and shell utilities to monitor file system events";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/gorakhargosh/watchdog";
|
2018-10-16 17:11:47 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ goibhniu ];
|
2021-03-09 08:34:39 +00:00
|
|
|
# error: use of undeclared identifier 'kFSEventStreamEventFlagItemCloned'
|
2021-11-24 05:31:25 +00:00
|
|
|
# builds fine on aarch64-darwin
|
|
|
|
broken = stdenv.isDarwin && !stdenv.isAarch64;
|
2018-10-16 17:11:47 +00:00
|
|
|
};
|
|
|
|
}
|