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