2021-03-12 07:09:13 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pathtools
|
|
|
|
, pyyaml
|
2021-06-28 23:13:55 +00:00
|
|
|
, flaky
|
2021-06-01 10:57:12 +00:00
|
|
|
, pytest-timeout
|
2021-02-05 17:12:51 +00:00
|
|
|
, pytestCheckHook
|
2021-03-12 07:09:13 +00:00
|
|
|
, CoreServices
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "watchdog";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "2.1.9";
|
2021-12-26 17:43:05 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-Q84g67NqUfIfo3b3bR1GkkUrJSfM1gGVDWntNrniFgk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
patches = lib.optionals (stdenv.isDarwin && !stdenv.isAarch64) [
|
|
|
|
./force-kqueue.patch
|
|
|
|
];
|
|
|
|
|
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 = [
|
|
|
|
pathtools
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
flaky
|
2021-06-01 10:57:12 +00:00
|
|
|
pytest-timeout
|
2021-02-05 17:12:51 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "--cov=watchdog" "" \
|
|
|
|
--replace "--cov-report=term-missing" ""
|
|
|
|
'';
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
disabledTests = [
|
|
|
|
# probably failing because of an encoding related issue
|
|
|
|
"test_create_wrong_encoding"
|
2022-06-26 10:26:21 +00:00
|
|
|
] ++ lib.optionals (stdenv.isDarwin && !stdenv.isAarch64) [
|
|
|
|
"test_delete"
|
2022-04-15 01:41:22 +00:00
|
|
|
];
|
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Tests are flaky
|
|
|
|
"tests/test_inotify_buffer.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|