depot/third_party/nixpkgs/pkgs/development/python-modules/cron-descriptor/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

40 lines
876 B
Nix

{
lib,
python,
buildPythonPackage,
fetchFromGitHub,
mock,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "cron_descriptor";
version = "1.4";
src = fetchFromGitHub {
owner = "Salamek";
repo = "cron-descriptor";
rev = "refs/tags/${version}";
hash = "sha256-r5TMatjNYaPhPxhJbBGGshQf6VxKyBV6Za1lQoblxYA=";
};
# remove tests_require, as we don't do linting anyways
postPatch = ''
sed -i "/'pep8\|flake8\|pep8-naming',/d" setup.py
'';
checkInputs = [ mock ];
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 ];
};
}