summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/python-datemath/default.nix
blob: b13b600121aebd5c8818fee6adb4a05b827cc7d8 (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
39
40
41
42
43
44
45
{
  lib,
  arrow,
  buildPythonPackage,
  fetchFromGitHub,
  freezegun,
  pytestCheckHook,
  pytz,
  setuptools,
}:

buildPythonPackage rec {
  pname = "python-datemath";
  version = "3.0.3";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "nickmaccarthy";
    repo = "python-datemath";
    tag = "v${version}";
    hash = "sha256-VwdY6Gmbmoy7EKZjUlWj56uSiE0OdegPiQv+rmigkq8=";
  };

  build-system = [ setuptools ];

  dependencies = [ arrow ];

  nativeCheckInputs = [
    freezegun
    pytestCheckHook
    pytz
  ];

  enabledTestPaths = [ "tests.py" ];

  pythonImportsCheck = [ "datemath" ];

  meta = {
    description = "Python module to emulate the date math used in SOLR and Elasticsearch";
    homepage = "https://github.com/nickmaccarthy/python-datemath";
    changelog = "https://github.com/nickmaccarthy/python-datemath/blob/v${version}/CHANGELOG.md";
    license = with lib.licenses; [ asl20 ];
    maintainers = with lib.maintainers; [ fab ];
  };
}