summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/tempora/default.nix
blob: bd8a74797d1c4c2f337496c926fba1b729e67395 (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
46
47
48
49
50
51
52
53
54
55
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  jaraco-functools,
  pytest-freezer,
  pytestCheckHook,
  python-dateutil,
  setuptools-scm,
}:

buildPythonPackage rec {
  pname = "tempora";
  version = "5.8.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "jaraco";
    repo = "tempora";
    tag = "v${version}";
    hash = "sha256-1Zeo8bUCHKPZ6I0HGT7bIh7IgbRL4j9Cv3t9FFiZ72s=";
  };

  postPatch = ''
    sed -i "/coherent\.licensed/d" pyproject.toml
  '';

  build-system = [ setuptools-scm ];

  dependencies = [
    jaraco-functools
    python-dateutil
  ];

  nativeCheckInputs = [
    pytest-freezer
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "tempora"
    "tempora.schedule"
    "tempora.timing"
    "tempora.utc"
  ];

  meta = {
    description = "Objects and routines pertaining to date and time";
    mainProgram = "calc-prorate";
    homepage = "https://github.com/jaraco/tempora";
    changelog = "https://github.com/jaraco/tempora/blob/${src.tag}/NEWS.rst";
    license = lib.licenses.mit;
    maintainers = [ ];
  };
}