1{
2 lib,
3 python,
4 buildPythonPackage,
5 fetchFromGitHub,
6 mock,
7 pytestCheckHook,
8}:
9
10buildPythonPackage rec {
11 pname = "cron_descriptor";
12 version = "1.4";
13
14 src = fetchFromGitHub {
15 owner = "Salamek";
16 repo = "cron-descriptor";
17 rev = "refs/tags/${version}";
18 hash = "sha256-r5TMatjNYaPhPxhJbBGGshQf6VxKyBV6Za1lQoblxYA=";
19 };
20
21 # remove tests_require, as we don't do linting anyways
22 postPatch = ''
23 sed -i "/'pep8\|flake8\|pep8-naming',/d" setup.py
24 '';
25
26 checkInputs = [ mock ];
27
28 checkPhase = ''
29 ${python.interpreter} setup.py test
30 '';
31
32 pythonImportsCheck = [ "cron_descriptor" ];
33
34 meta = with lib; {
35 description = "Library that converts cron expressions into human readable strings";
36 homepage = "https://github.com/Salamek/cron-descriptor";
37 license = licenses.mit;
38 maintainers = with maintainers; [ phaer ];
39 };
40}