blob: c8ea6bf124736d1c48fe647c28544ddc9efbc35b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
{
lib,
fetchFromGitHub,
buildPythonPackage,
setuptools,
python-dateutil,
python,
}:
buildPythonPackage rec {
pname = "cron-converter";
version = "1.3.1";
pyproject = true;
src = fetchFromGitHub {
owner = "Sonic0";
repo = pname;
rev = "v${version}";
hash = "sha256-zNDEBckvSwnqBfNyh5Gv7ICOsPaSx2NKl92ZlyDfukw=";
};
postPatch = ''
# Timezone does not match
substituteInPlace tests/integration/tests_cron_seeker.py \
--replace-fail "test_timezone" "dont_test_timezone"
'';
build-system = [ setuptools ];
dependencies = [ python-dateutil ];
checkPhase = ''
runHook preCheck
${python.interpreter} -m unittest discover -s tests/unit -v
${python.interpreter} -m unittest discover -s tests/integration -v
runHook postCheck
'';
pythonImportsCheck = [ "cron_converter" ];
meta = {
description = "Cron string parser and iteration for the datetime object with a cron like format";
homepage = "https://github.com/Sonic0/cron-converter";
changelog = "https://github.com/Sonic0/cron-converter/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ b4dm4n ];
};
}
|