summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pytimeparse2/default.nix
blob: 6becb99ef495cc6e6983890b9548b393c6abeba5 (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
{
  lib,
  fetchFromGitHub,
  buildPythonPackage,
  dateutils,
}:

buildPythonPackage rec {
  pname = "pytimeparse2";
  version = "1.7.1";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "onegreyonewhite";
    repo = "pytimeparse2";
    tag = version;
    hash = "sha256-zWRbSohTvbVd3GcRRoxH/UReVGYHC0YmbNgbt8N0X48=";
  };

  propagatedBuildInputs = [ dateutils ];

  # custom checks, see
  # https://github.com/onegreyonewhite/pytimeparse2/blob/e00df7506b6925f2c6a5783e89e9f239d128271a/tox.ini#L36C20-L36C78
  checkPhase = ''
    runHook preCheck
    python tests.py -vv --failfast
    runHook postCheck
  '';

  pythonImportsCheck = [ "pytimeparse2" ];

  meta = {
    description = "Pytimeparse based project with the aim of optimizing functionality and providing stable support";
    homepage = "https://github.com/onegreyonewhite/pytimeparse2";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ gador ];
  };
}