Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / maya / default.nix
blobe96d66826583365e8e204822c2fa5be07163efee
1 { lib
2 , fetchFromGitHub
3 , buildPythonPackage
5 # build-system
6 , setuptools
8 # dependencies
9 , dateparser
10 , humanize
11 , tzlocal
12 , pendulum
13 , snaptime
14 , pytz
16 # tests
17 , freezegun
18 , pytestCheckHook
21 buildPythonPackage rec {
22   pname = "maya";
23   version = "0.6.1";
24   format = "pyproject";
26   src = fetchFromGitHub {
27     owner = "kennethreitz";
28     repo = "maya";
29     rev = "refs/tags/v${version}";
30     hash = "sha256-4fUyUqVQk/AcQL3xMnU1cQlF5yiD/N9NPAsUPuDTTNY=";
31   };
33   postPatch = ''
34     # function was made private in humanize
35     substituteInPlace maya/core.py \
36       --replace "humanize.time.abs_timedelta" "humanize.time._abs_timedelta"
37   '';
39   nativeBuildInputs = [
40     setuptools
41   ];
43   propagatedBuildInputs = [
44     dateparser
45     humanize
46     pendulum
47     pytz
48     snaptime
49     tzlocal
50   ];
52   nativeCheckInputs = [
53     freezegun
54     pytestCheckHook
55   ];
57   meta = with lib; {
58     description = "Datetimes for Humans";
59     homepage = "https://github.com/kennethreitz/maya";
60     license = licenses.mit;
61   };