2022-07-14 12:49:19 +00:00
|
|
|
{ lib
|
|
|
|
, python
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-05-24 13:37:59 +00:00
|
|
|
, mock
|
2022-07-14 12:49:19 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cron_descriptor";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "1.4";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Salamek";
|
|
|
|
repo = "cron-descriptor";
|
|
|
|
rev = "refs/tags/${version}";
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-r5TMatjNYaPhPxhJbBGGshQf6VxKyBV6Za1lQoblxYA=";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# remove tests_require, as we don't do linting anyways
|
|
|
|
postPatch = ''
|
|
|
|
sed -i "/'pep8\|flake8\|pep8-naming',/d" setup.py
|
|
|
|
'';
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
checkInputs = [
|
|
|
|
mock
|
|
|
|
];
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} setup.py test
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "cron_descriptor" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library that converts cron expressions into human readable strings";
|
|
|
|
homepage = "https://github.com/Salamek/cron-descriptor";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ phaer ];
|
|
|
|
};
|
|
|
|
}
|