1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 unittestCheckHook,
6 setuptools,
7 python-dateutil,
8 python,
9}:
10buildPythonPackage rec {
11 pname = "cron-converter";
12 version = "1.2.2";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "Sonic0";
17 repo = pname;
18 rev = "v${version}";
19 hash = "sha256-XpkpEMurRrhq1S4XnhPRW5CCBk+HzljOSQfZ98VJ7UE=";
20 };
21
22 build-system = [ setuptools ];
23
24 propagatedBuildInputs = [ python-dateutil ];
25
26 checkPhase = ''
27 ${python.interpreter} -m unittest discover -s tests/unit -v
28 ${python.interpreter} -m unittest discover -s tests/integration -v
29 '';
30
31 pythonImportsCheck = [ "cron_converter" ];
32
33 meta = with lib; {
34 description = "Cron string parser and iteration for the datetime object with a cron like format";
35 homepage = "https://github.com/Sonic0/cron-converter";
36 changelog = "https://github.com/Sonic0/cron-converter/releases/tag/v${version}";
37 license = licenses.mit;
38 maintainers = with maintainers; [ b4dm4n ];
39 };
40}