1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 dateutils,
6}:
7
8buildPythonPackage rec {
9 pname = "pytimeparse2";
10 version = "1.7.1";
11 format = "setuptools";
12
13 src = fetchFromGitHub {
14 owner = "onegreyonewhite";
15 repo = "pytimeparse2";
16 tag = version;
17 hash = "sha256-zWRbSohTvbVd3GcRRoxH/UReVGYHC0YmbNgbt8N0X48=";
18 };
19
20 propagatedBuildInputs = [ dateutils ];
21
22 # custom checks, see
23 # https://github.com/onegreyonewhite/pytimeparse2/blob/e00df7506b6925f2c6a5783e89e9f239d128271a/tox.ini#L36C20-L36C78
24 checkPhase = ''
25 runHook preCheck
26 python tests.py -vv --failfast
27 runHook postCheck
28 '';
29
30 pythonImportsCheck = [ "pytimeparse2" ];
31
32 meta = with lib; {
33 description = "Pytimeparse based project with the aim of optimizing functionality and providing stable support";
34 homepage = "https://github.com/onegreyonewhite/pytimeparse2";
35 license = licenses.mit;
36 maintainers = with maintainers; [ gador ];
37 };
38}