2021-03-09 08:34:39 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2018-10-16 18:11:47 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, argh
|
|
|
|
, pathtools
|
|
|
|
, pyyaml
|
2021-02-01 22:32:12 +00:00
|
|
|
, pytestCheckHook
|
2021-03-09 08:34:39 +00:00
|
|
|
, CoreServices
|
2018-10-16 18:11:47 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "watchdog";
|
2021-04-23 22:27:11 +01:00
|
|
|
version = "2.0.3";
|
2018-10-16 18:11:47 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-04-23 22:27:11 +01:00
|
|
|
sha256 = "sha256-QojTqYQyTbSS5XqhaWZiOKJXjwr1oIFoVSZgj7n2vWE=";
|
2018-10-16 18:11:47 +01:00
|
|
|
};
|
|
|
|
|
2021-03-09 08:34:39 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];
|
2018-10-16 18:11:47 +01:00
|
|
|
|
2021-02-01 22:32:12 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
argh
|
|
|
|
pathtools
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-04-23 22:27:11 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "--cov=watchdog" "" \
|
|
|
|
--replace "--cov-report=term-missing" ""
|
|
|
|
'';
|
|
|
|
|
2021-02-01 22:32:12 +00:00
|
|
|
pythonImportsCheck = [ "watchdog" ];
|
2018-10-16 18:11:47 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-10-16 18:11:47 +01:00
|
|
|
description = "Python API and shell utilities to monitor file system events";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/gorakhargosh/watchdog";
|
2018-10-16 18:11:47 +01:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ goibhniu ];
|
2021-03-09 08:34:39 +00:00
|
|
|
# error: use of undeclared identifier 'kFSEventStreamEventFlagItemCloned'
|
|
|
|
broken = stdenv.isDarwin;
|
2018-10-16 18:11:47 +01:00
|
|
|
};
|
|
|
|
}
|