about summary refs log tree commit diff
path: root/pkgs/development/python-modules/arrow/default.nix
blob: 4fdf55bc2bd3fcc6e69cb14e437a656829251115 (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
{ stdenv, lib, buildPythonPackage, fetchPypi, isPy27
, nose, chai, simplejson, backports_functools_lru_cache
, python-dateutil, pytz, pytest-mock, sphinx, dateparser, pytestcov, pytest
}:

buildPythonPackage rec {
  pname = "arrow";
  version = "0.15.6";

  src = fetchPypi {
    inherit pname version;
    sha256 = "eb5d339f00072cc297d7de252a2e75f272085d1231a3723f1026d1fa91367118";
  };

  propagatedBuildInputs = [ python-dateutil ]
    ++ lib.optionals isPy27 [ backports_functools_lru_cache ];

  checkInputs = [
    dateparser
    pytest
    pytestcov
    pytest-mock
    pytz
    simplejson
    sphinx
  ];

  checkPhase = ''
    pytest
  '';

  meta = with lib; {
    description = "Python library for date manipulation";
    homepage = "https://github.com/crsmithdev/arrow";
    license = licenses.asl20;
    maintainers = with maintainers; [ thoughtpolice ];
  };
}