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";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "2.1.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "sha256-o25132x2fL9G9hqRxws7pxgR36CspKMk2UB6Bqi3ouc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
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" ""
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
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'
|
2021-12-06 16:07:01 +00:00
|
|
|
# builds fine on aarch64-darwin
|
|
|
|
broken = stdenv.isDarwin && !stdenv.isAarch64;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|