otadump: init at 0.1.2 (#329129)
[NixPkgs.git] / pkgs / development / python-modules / maya / default.nix
blob05b5367517d7f2632c2aaff0f9be3ea56bb22946
2   lib,
3   buildPythonPackage,
4   dateparser,
5   fetchFromGitHub,
6   freezegun,
7   humanize,
8   pendulum,
9   pytest-mock,
10   pytestCheckHook,
11   pythonOlder,
12   pytz,
13   setuptools,
14   snaptime,
15   tzlocal,
18 buildPythonPackage rec {
19   pname = "maya";
20   version = "0.6.1";
21   pyproject = true;
23   disabled = pythonOlder "3.7";
25   src = fetchFromGitHub {
26     owner = "timofurrer";
27     repo = "maya";
28     rev = "refs/tags/v${version}";
29     hash = "sha256-4fUyUqVQk/AcQL3xMnU1cQlF5yiD/N9NPAsUPuDTTNY=";
30   };
32   postPatch = ''
33     # function was made private in humanize
34     substituteInPlace maya/core.py \
35       --replace-fail "humanize.time.abs_timedelta" "humanize.time._abs_timedelta"
36   '';
38   nativeBuildInputs = [ setuptools ];
40   propagatedBuildInputs = [
41     dateparser
42     humanize
43     pendulum
44     pytz
45     snaptime
46     tzlocal
47   ];
49   nativeCheckInputs = [
50     freezegun
51     pytest-mock
52     pytestCheckHook
53   ];
55   pythonImportsCheck = [ "maya" ];
57   disabledTests = [
58     # https://github.com/timofurrer/maya/issues/202
59     "test_parse_iso8601"
60   ];
62   meta = with lib; {
63     description = "Datetimes for Humans";
64     homepage = "https://github.com/timofurrer/maya";
65     changelog = "https://github.com/timofurrer/maya/releases/tag/v${version}";
66     license = licenses.mit;
67     maintainers = [ ];
68   };