blob: 15e619558016d9f84f70779eee261129e24e20d6 (
plain) (
blame)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
{ lib
, fetchFromGitHub
, fetchpatch
, buildPythonPackage
, dateparser
, humanize
, pendulum
, pytz
, snaptime
, tzlocal
, pytestCheckHook
, freezegun
, pytest-mock
}:
buildPythonPackage rec {
pname = "maya";
version = "0.6.1";
src = fetchFromGitHub {
owner = "kennethreitz";
repo = "maya";
rev = "refs/tags/v${version}";
hash = "sha256-4fUyUqVQk/AcQL3xMnU1cQlF5yiD/N9NPAsUPuDTTNY=";
};
# fix humanize incompatibility
# https://github.com/timofurrer/maya/commit/d9cd563d1b1ba16bcff4dacb4ef49edd4e32fd1d.patch
# ^ does not apply on 0.6.1
postPatch = ''
substituteInPlace maya/core.py \
--replace \
"humanize.time.abs_timedelta" \
"humanize.time._abs_timedelta"
'';
propagatedBuildInputs = [
dateparser
humanize
pendulum
pytz
snaptime
tzlocal
];
nativeCheckInputs = [
pytestCheckHook
freezegun
pytest-mock
];
meta = with lib; {
description = "Datetimes for Humans";
homepage = "https://github.com/kennethreitz/maya";
license = licenses.mit;
maintainers = with maintainers; [ pbsds ];
};
}
|