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